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 19:17:15 +0100 Message-ID: <87wonoxmxg.fsf@nicolasgoaziou.fr> References: <87h8g2kv81.fsf@gmail.com> <87d0qpsc4g.fsf@nicolasgoaziou.fr> <87woo5xkgf.fsf@nicolasgoaziou.fr> <87k1k2ynsh.fsf@nicolasgoaziou.fr> <87a7kkz5p9.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1geObY-0000Lu-GP for emacs-orgmode@gnu.org; Tue, 01 Jan 2019 13:17:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1geObU-0004wo-JV for emacs-orgmode@gnu.org; Tue, 01 Jan 2019 13:17:28 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:58347) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1geObP-0004tH-Ti for emacs-orgmode@gnu.org; Tue, 01 Jan 2019 13:17:21 -0500 In-Reply-To: (Carlos Pita's message of "Tue, 1 Jan 2019 14:11:55 -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 Carlos Pita writes: > 2. If the parser identifies a block how is it in a better position to flag > it as outdated regarding fontification? Do you mean completely > circumventing the search based font lock mechanism with its multiline > property and region extensions? That is, directly setting face related > properties and forcing a refresh of the region? Indeed. Barring headlines, info lines and properties drawers, I suggest to have Font lock delegate fontification to a function that would parse an appropriate region and apply faces according to the AST. One subtle problem is to determine the region to parse according to the changes, but this is not specific to fontification. I.e., this function needs to be written for proper parser caching anyway.