1

I write my emacs configuration file in org mode, which works fine, only that org-mode does not highlight some source blocks.

I set (setq org-src-fontify-natively t), but this only seems to take effect for some blocks, while others are not highlighted.

enter image description here

Anyone has an idea what might cause this?

9
  • What happens if you edit the second block, will that make it highlighted? May 15 '18 at 9:24
  • If I edit it with org-edit-special, it gets highlighted
    – Florian
    May 15 '18 at 9:28
  • It is not only that the source block is not natively highlighted also #+BEGIN_SRC and #+END_SRC are not fontified. Maybe that indicates that something near the header Hydras breaks font-locking. Search your message buffer for error.
    – Tobias
    May 15 '18 at 9:47
  • Thank for the hint, the message buffer prints one error: Error during redisplay: (jit-lock-function 31409) signaled (args-out-of-range #<buffer config.org> 0 2)
    – Florian
    May 15 '18 at 9:54
  • @Florian, and if you edit it in the org file itself, i.e. not using org-edit-special. May 15 '18 at 19:52
0

Updating to Emacs 26.1 fixed the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.