From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: Add option to fontify latex blocks [9.1.9 (release_9.1.9-65-g5e4542 @ /home/carlos/local/stow/emacs-26/share/emacs/26.1.50/lisp/org/)] Date: Tue, 01 Jan 2019 17:46:26 +0100 Message-ID: <87a7kkz5p9.fsf@nicolasgoaziou.fr> References: <87h8g2kv81.fsf@gmail.com> <87lg5ershk.fsf@nicolasgoaziou.fr> <87d0qpsc4g.fsf@nicolasgoaziou.fr> <87woo5xkgf.fsf@nicolasgoaziou.fr> <87k1k2ynsh.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1geNBh-0005Xy-Eu for emacs-orgmode@gnu.org; Tue, 01 Jan 2019 11:46:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1geNBe-0008QP-Ar for emacs-orgmode@gnu.org; Tue, 01 Jan 2019 11:46:41 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:47995) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1geNBe-0008Lq-4w for emacs-orgmode@gnu.org; Tue, 01 Jan 2019 11:46:38 -0500 In-Reply-To: (Carlos Pita's message of "Sat, 22 Dec 2018 12:07:08 -0300") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Carlos Pita Cc: emacs-orgmode@gnu.org Hello, Carlos Pita writes: > Here is a patch on top of latest revision. It just adds an extension > function while initializing font locking, as documented in [1]. It > indeed reduces lines of code to some extent by moving the dirty stuff > out of the fontification function (but I tried to keep the code > formatting of your last commit, since it was rather different than the > one shipped with emacs). The approach is more robust AFAICS since the > font locking framework is correctly informed of which blocks should be > refontified before fontification itself happens. It covers all types > of blocks: #+BEGIN/#+END, \begin\end, \[\]. It's not a full parser but > at least it matches corresponding delimiters by type by using a simple > heuristic. I still think it is not a good long-term solution for fontification. I'd rather see work to integrate fontification with the parser. Meanwhile, I applied your patch in master. I also added a commit message. Thank you. Regards, -- Nicolas Goaziou