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: Sat, 22 Dec 2018 10:16:54 -0300 Message-ID: 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: multipart/alternative; boundary="00000000000020396d057d9c2e2d" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gah9P-0006nX-Sb for emacs-orgmode@gnu.org; Sat, 22 Dec 2018 08:17:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gah9O-0003Vs-Ue for emacs-orgmode@gnu.org; Sat, 22 Dec 2018 08:17:07 -0500 Received: from mail-yw1-xc43.google.com ([2607:f8b0:4864:20::c43]:44948) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gah9O-0003VR-Py for emacs-orgmode@gnu.org; Sat, 22 Dec 2018 08:17:06 -0500 Received: by mail-yw1-xc43.google.com with SMTP id b63so1964147ywc.11 for ; Sat, 22 Dec 2018 05:17:06 -0800 (PST) In-Reply-To: <87k1k2ynsh.fsf@nicolasgoaziou.fr> 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 --00000000000020396d057d9c2e2d Content-Type: text/plain; charset="UTF-8" > > > > 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. > Hi Nicolas, I understand this. It's just that I have been using an extension function for editing complex documents with lots of blocks (latex and org) and I've not yet seen any problem, while I quickly spot rough edges otherwise. It's not like writing yet another workaround in an accumulative fashion, since the fontification functions just work forward as always and the extension function is the one taking care of finding the opposite end, plus it's just one function for all types of blocks. I've no problem in contributing a patch if you're not inclined to work in this anymore. It will have to move the end searching logic out of org-do-latex-and-related though. All in all I don't think there would be more lines of code or complexity and all block types would be given the same treatment, moreover it would be a bit more by the book. Give it a chance :) Anyway, thank you for your work. Best regards -- Carlos --00000000000020396d057d9c2e2d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

> 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<= br> for something that is going to fail anyway. For the time being, I just
accept that fontification is not perfect.

Hi Nicolas, I understand this. It&= #39;s just that I have been using an extension function for editing complex= documents with lots of blocks (latex and org) and I've not yet seen an= y problem, while I quickly spot rough edges otherwise. It's not like wr= iting yet another workaround in an accumulative fashion, since the fontific= ation functions just work forward as always and the extension function is t= he one taking care of finding the opposite end, plus it's just one func= tion for all types of blocks.

I've no problem in contributing a patch if you're not incline= d to work in this anymore. It will have to move the end searching logic out= of org-do-latex-and-related though. All in all I don't think there wou= ld be more lines of code or complexity and all block types would be given t= he same treatment, moreover it would be a bit more by the book. Give it a c= hance :) Anyway, thank you for your work.

=
Best regards
--
Carlos
--00000000000020396d057d9c2e2d--