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?

  • What happens if you edit the second block, will that make it highlighted? May 15, 2018 at 9:24
  • If I edit it with org-edit-special, it gets highlighted
    – Florian
    May 15, 2018 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, 2018 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, 2018 at 9:54
  • @Florian, and if you edit it in the org file itself, i.e. not using org-edit-special. May 15, 2018 at 19:52

1 Answer 1


Updating to Emacs 26.1 fixed the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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