From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carlos Pita 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: Fri, 21 Dec 2018 21:42:17 -0300 Message-ID: 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; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaVNe-00011y-UJ for emacs-orgmode@gnu.org; Fri, 21 Dec 2018 19:43:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gaVNa-0008Gz-Bk for emacs-orgmode@gnu.org; Fri, 21 Dec 2018 19:43:00 -0500 Received: from mail-yb1-xb2c.google.com ([2607:f8b0:4864:20::b2c]:42586) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gaVNY-0007cO-8H for emacs-orgmode@gnu.org; Fri, 21 Dec 2018 19:42:56 -0500 Received: by mail-yb1-xb2c.google.com with SMTP id q145so1257351ybq.9 for ; Fri, 21 Dec 2018 16:42:30 -0800 (PST) In-Reply-To: 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: emacs-orgmode@gnu.org One problem I found after uninstalling my extension function is with #+BEGIN/END blocks. For example, enable fontification for python, elisp or whatever and write a long block like this: #+BEGIN_XXX python def xxx(x): pass def xxx(x): pass ... #+END_XXX python Now scroll down to the end and change python to pyton and back. Even when the delimiter is restored fontification isn't. I see that, for latex blocks, you have added a case for searching backwards for an opening delimiter. But org-fontify-meta-lines-and-blocks-1 lacks a similar logic.