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: Wed, 28 Nov 2018 14:28:37 -0300 Message-ID: References: <87h8g2kv81.fsf@gmail.com> <87lg5ershk.fsf@nicolasgoaziou.fr> <87d0qpsc4g.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]:37322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gS3e9-0003Ls-Gc for emacs-orgmode@gnu.org; Wed, 28 Nov 2018 12:29:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gS3dz-0008Bt-Ax for emacs-orgmode@gnu.org; Wed, 28 Nov 2018 12:29:09 -0500 Received: from mail-yb1-xb33.google.com ([2607:f8b0:4864:20::b33]:46826) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gS3dv-0007aE-VA for emacs-orgmode@gnu.org; Wed, 28 Nov 2018 12:28:57 -0500 Received: by mail-yb1-xb33.google.com with SMTP id i17-v6so10929633ybp.13 for ; Wed, 28 Nov 2018 09:28:51 -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 > (lambda (start end &rest args) > (org-src-font-lock-fontify-block "latex" start end)))) Or a safer version: (lambda (start end prop face) (when (eq face 'org-latex-and-related) (org-src-font-lock-fontify-block "latex" start end))))) Also note that the advice doesn't avoid the double setting of (font-lock-multiline t). This is harmless but it's unnecessary nevertheless. It's just intended as a workaround and to show that it's pretty simple to extend native fontification to inline snippets.