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: Sat, 22 Dec 2018 09:21:34 +0100 Message-ID: <87k1k2ynsh.fsf@nicolasgoaziou.fr> References: <87h8g2kv81.fsf@gmail.com> <87lg5ershk.fsf@nicolasgoaziou.fr> <87d0qpsc4g.fsf@nicolasgoaziou.fr> <87woo5xkgf.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gacXV-0006pR-Qe for emacs-orgmode@gnu.org; Sat, 22 Dec 2018 03:21:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gacXS-0003Y5-Nj for emacs-orgmode@gnu.org; Sat, 22 Dec 2018 03:21:41 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:45211) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gacXS-0003Wv-Ho for emacs-orgmode@gnu.org; Sat, 22 Dec 2018 03:21:38 -0500 In-Reply-To: (Carlos Pita's message of "Fri, 21 Dec 2018 23:38:35 -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: > I still believe that explicitly extending the region is a saner > approach, it's the documented one at least. The only sane approach for fontification is to use the parser. Any solution relying to regexps is bound to fail somewhere, because Org syntax cannot be parsed by regexps only. This would require to rewrite the fontification process completely. > Maybe you could rewrite my function in a better way using the > precomputed latex regexps and augmenting them with #+BEGIN/END > counterparts. Per above, I'm not really interested in writing yet another workaround for something that is going to fail anyway. For the time being, I just accept that fontification is not perfect. Regards, -- Nicolas Goaziou