From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: bug#22399: org-mode fontification Date: Wed, 20 Jan 2016 19:44:58 -0500 Message-ID: <87oacf92wl.fsf@kyleam.com> References: <87oacjng36.fsf@russet.org.uk> <87ziw36khb.fsf@gmx.us> <87a8o2zrtm.fsf@russet.org.uk> <87bn8i7mha.fsf@gmx.us> <87d1syvgc7.fsf@kyleam.com> <8737tu13la.fsf__5430.1016768024$1453185240$gmane$org@kyleam.com> <87d1sy54vt.fsf@gmx.us> <87wpr5zirr.fsf@kyleam.com> <871t9d4cg3.fsf@gmx.us> <874me8pjii.fsf__7050.42196573249$1453290031$gmane$org@russet.org.uk> <87ziw0goel.fsf_-_@kyleam.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aM3O2-0002Af-2L for emacs-orgmode@gnu.org; Wed, 20 Jan 2016 19:46:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aM3Ny-0003kV-S4 for emacs-orgmode@gnu.org; Wed, 20 Jan 2016 19:46:06 -0500 In-Reply-To: <87oacjng36.fsf@russet.org.uk> Sender: "Debbugs-submit" Resent-Message-ID: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Stefan Monnier Cc: 22399@debbugs.gnu.org, Rasmus , Phillip Lord Thanks for having a look. Stefan Monnier writes: >> (unless (eq major-mode lang-mode) (funcall lang-mode)) >> - (org-font-lock-ensure) >> + ;; Avoid `font-lock-ensure', which does not display fonts in >> + ;; source block. >> + (font-lock-fontify-buffer) > > Intuitively, this looks like a wrong fix. Do you have a reproducible > recipe showing the problem that you're trying to fix? Sure. With --8<---------------cut here---------------start------------->8--- #+BEGIN_SRC elisp (require 'cl-lib) (message "test") #+END_SRC --8<---------------cut here---------------end--------------->8--- in /tmp/scratch.org, run emacs -Q --eval "(setq org-src-fontify-natively t)" --visit /tmp/scratch.org Go to the code block and hit C-c ' (org-edit-special), and then exit with another C-c '. Without this change, the source block is no longer highlighted as elisp code when I return to the buffer. I don't think it's just something odd on my end because, when we backported 6711a21, a user reported that he lost highlighting in source blocks. http://thread.gmane.org/gmane.emacs.orgmode/99495 -- Kyle