In my previous message I forgot to mention the subject of the initial bug report:

Bug: org-src-font-lock-fontify-block should be wrapped with save-match-data [9.3.7 (9.3.7-4-gba6ca7-elpaplus @ mixed installation! /mnt/c/Users/toz/Weiterbildung/Soft/Emacs/ and /mnt/c/Users/toz/.emacs.d/elpa/org-plus-contrib-20200615/)

Notice "mixed installation!". Often it is source of obscure errors.
https://orgmode.org/worg/org-faq.html#mixed-install

Maybe link to FAQ item should be added to bug report template when mixed installation is detected. Since mixed installation can be detected, I would consider issuing a message during loading of Org mode.

On 24/08/2021 23:57, Maxim Nikulin wrote:
On 23/08/2021 14:45, Timothy wrote:

Thanks for your efforts. I have prepared a patch accordingly that wraps
org-src-font-lock-fontify-block’s body with save-match-data (attached).
>
The following question may be dumb since I am not familiar how font lock works in Emacs. Is it necessary to wrap whole function? I do not see explicit operation with regexps. The only suspecting line is

   (org-font-lock-ensure)

I think, now it is irrelevant, so just for completeness: initialization of major mode might affect match data as well

    (unless (eq major-mode lang-mode) (funcall lang-mode))


Reply via email to