Quick summary: I'm now able to generate the css, but I don't understand how it can change the colors.
Rick Frankel <r...@rickster.com> writes: > Which version of emacs are you using? FWIW, I just had this problem > yesterday (although it choked on a different face) in emacs trunk > (24.4.x). But on my machine @work on (24.3.8) it is working fine. I'm on 24.3.1. > It seems that htmlize is choking on invalid face definitions. > Somewhere you have a reference to a face "font-lock-comment" which > does not exist (the correct definition in this case is > "font-lock-comment-face"), so if you can find the customization that > refers to "font-lock-comment" and fix it you should be able to > generate the CSS. Thank you for the suggestion. I had a quick look at what org-html-htmlize-generate-css is doing, and it starts by building a face-list which is used in my case. I thought the problem was that I had been using this instance of emacs for too long (thus many faces where loaded), but with a fresh emacs, I still have an error (this time for `font-lock-pseudo-keyword-face`). Loading an emacs with no configuration (except for org and htmlize), I'm now able to generate the CSS. After loading the mode of interest, I now know the names of the classes I should work with. However, I still find there is a problem. Here is the html source generated from a snippet of the file: #+BEGIN_SRC html <div class="org-src-container"> <pre class="src src-coq">Inductive expr := | expr_this : expr | expr_identifier : string -> expr | expr_literal : literal -> expr | expr_object : list (propname * propbody) -> expr | expr_function : option string -> list string -> funcbody -> expr | expr_access : expr -> expr -> expr | expr_member : expr -> string -> expr | expr_new : expr -> list expr -> expr | expr_call : expr -> list expr -> expr | expr_unary_op : unary_op -> expr -> expr | expr_binary_op : expr -> binary_op -> expr -> expr | expr_conditional : expr -> expr -> expr -> expr | expr_assign : expr -> option binary_op -> expr -> expr </pre> </div> #+END_SRC I don't understand how things are supposed to be colorized, as there is no mention in the html of span elements to put color on. For instance, "Inductive" is a keyword, and in a coq buffer it has face "font-lock-keyword-face". Shouldn't it have class "org-keyword" in the generated html? Thanks, Alan