GNU bug report logs - #22399
org-mode fontification

Previous Next

Packages: org-mode, emacs;

Reported by: phillip.lord <at> russet.org.uk (Phillip Lord)

Date: Mon, 18 Jan 2016 14:00:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 22399 <at> debbugs.gnu.org (full text, mbox):

From: phillip.lord <at> russet.org.uk (Phillip Lord)
To: Rasmus <rasmus <at> gmx.us>
Cc: 22399 <at> debbugs.gnu.org
Subject: Re: bug#22399: org-mode fontification
Date: Mon, 18 Jan 2016 18:05:25 +0000
Rasmus <rasmus <at> gmx.us> writes:

> Hi Phillip,
>
> Thanks for your report.
>
> phillip.lord <at> russet.org.uk (Phillip Lord) writes:
>
>> On emacs-25 ox-html, line 1847, org-html-fontify-code does this...
>>
>> (setq code (with-temp-buffer
>> 		       ;; Switch to language-specific mode.
>> 		       (funcall lang-mode)
>> 		       (insert code)
>> 		       ;; Fontify buffer.
>> 		       (org-font-lock-ensure)
>>
>>
>> But `org-font-lock-ensure' is defined like so....
>>
>> (defalias 'org-font-lock-ensure
>>   (if (fboundp 'org-font-lock-ensure)
>>       #'font-lock-ensure
>>     (lambda (_beg _end) (font-lock-fontify-buffer))))
>>
>>
>> which takes two args, causing crashes when exporting to code to HTML.
>
> This is fixed in the most recent stable version of Org, i.e. 8.3.3¹ ,
> which, I guess, will be part of if Emacs 25.2 or 26.1 (whichever comes
> first and allow new features).  It’s also fixed in 8.2.10².  I guess
> Emacs-25 should switch v8.2.10.  [Honestly, when v8.3 couldn’t be merged I
> did not cross my mind to upgrade to v8.2.10].  In case v8.2.10 it too
> radical, a "local fix" must be applied to the version of Org in emacs.git.


Well, the fix on emacs-25 appears to be trivial i.e.

(org-font-lock-ensure (point-min) (point-max))

But I don't know what the protocol is for org-mode as it's upstream.
AFAICT, this is a regression from emacs-24.5, so it would be a shame if
the bug gets into 25.1.

Let me know if you want me to do anything!

Phil




This bug report was last modified 9 years and 159 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.