Issuing M-x org-html-htmlize-generate-css gives the error

Invalid face: font-lock-string

What does this error mean and how can I correct it?

Issuing $ grep -r "font-lock-string[^-]" ~/.emacs.d/ returns

~/.emacs.d/elpa/solarized-theme-20160106.15/solarized.el: `(kite-string((,class (:inherit font-lock-string))))
  • 2
    I don't know, but forcing it to print the stack trace might help to investigate. To get the stack trace do M-x toggle-debug-on-error.
    – wvxvw
    Jan 12, 2016 at 12:32
  • I guess you have a source block in your org-file and this source code block uses some wired programming major mode. Try to open a file with that major mode. Does this work or do you get the same error message? Please give a minimal example for error reconstruction. Try with emacs -Q only loading the modes you really need for the reconstruction of the problem.
    – Tobias
    Jan 12, 2016 at 14:06
  • 1
    Beyond turning on debug-on-error (@wvxvw's good suggestion), you can follow the evaluation to see exactly what goes wrong, by: (1) loading the source file that defines function org-html-htmlize-generate-css, (2) M-x debug-on-entry RET org-html-htmlize-generate-css, (3) use d to step through the evaluation (or c sometimes, to skip through uninteresting parts). Keep the source code open in another frame, so you can follow better.
    – Drew
    Jan 12, 2016 at 15:03
  • You can also check what the current definition of font-lock-string is, using M-x customize-face RET font-lock-string RET. If it says mismatch then look for what is wrong, or try customizing it again, starting with the original value.
    – Drew
    Jan 12, 2016 at 15:05
  • 1
    @Dew When I try completion with M-x customize-face on font-lock-string I only get font-lock-string-face that makes me suspicious that there is some source code block in the OP's org file with a major mode that wrongly uses font-lock-string instead of font-lock-string-face.
    – Tobias
    Jan 12, 2016 at 15:10


Your Answer

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

Browse other questions tagged or ask your own question.