I like to use the htmlize file in emacs to convert clojure source files to html.
I want to use it from the linux command line or programmatically from clojure itself.
I tried
$ emacs --eval "(htmlize-file \"/home/john/file.clj\" ) (kill-emacs)"
and
$ emacs -batch --eval "(htmlize-file \"/home/john/file.clj\" )"
Both work with reservations.
First, an X window opens, which seems a little inelegant, but it makes the same selection that I see in the buffer, and that is what I want.
The second works in batch mode, but the only syntax highlighting it does is italic strings. I assume that it does not load the clojure mod or my favorite color scheme.
Can someone find a way to get the second version to give the same results as the first? It seems like they both upload my .emacs file before guessing the bit (htmli ....).
Also, is there a way to send commands to emacs already running? And thus save startup time?
emacs clojure
John lawrence aspden
source share