emacs-htmlize
emacs-htmlize copied to clipboard
All colouring lost.
If I run htmlize-{buffer,file}
on any of my files, the result has no syntax highlighting.
Additionally, if I turn on debug-on-error
I find the following
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("[\11\n]" nil 0)
htmlize-untabify-string(nil 0)
htmlize-extract-text(1 2 nil)
...
htmlize-buffer-1()
htmlize-region(1 1817)
org-html-htmlize-region-for-paste(1 1817)
Here's an example output: colophon.zip
I use Emacs27.1 with Doom, which uses the latest version of Htmlize, and does not appear to modify the settings/behaviour.
Thanks for the report. Here are some steps to debug the issue:
- Does htmlize work for you outside of org mode? For example, if you visit a file and type
M-x htmlize-buffer RET
? - If you get the same error, does it work if you use
emacs -q
? - What is the output of
M-: (htmlize-buffer-substring-no-invisible 1 2) RET
in the buffer where htmlize doesn't work?
Sorry for the delay, I'll try doing emacs -Q
shortly.
- Calling
htmlize-file
on a non-org file produces the same result (see below) -
(htmlize-buffer-substring-no-invisible 1 2)
gives"["
In Emacs
Htmlized
I am getting an output of non-formatted code after htmlize-file, while htmlize-buffer delivers the desired output with different text colours.