org-html-export returns
Solution
Redefine function org-font-lock-ensure
. Add the following code snippet to init.el
and execute it to solve the problem:
Hack log
I find that if there is no source code blocks in the content, then org-html-export-as-html
works properly. So I guess the problem occurred during exporting source code blocks to HTML.
M-x toggle-debug-on-error
(to prints a backtrace when an error happens in Emacs). Then create a very simple org-mode file which only contains a python code block:
M-x org-html-export-as-html
, here is the Backtrace (unimportant parts are omitted):
The problem was in org-font-lock-ensure
Stop exploration here (it might just be a bug of org-mode), just redefine org-font-lock-ensure:
My site is free of ads and trackers. Was this post helpful to you? Why not
Disqus is great for comments/feedback but I had no idea it came with these gaudy ads.