Closed hanjianwei closed 12 years ago
Thanks for reporting this. The programming language name should be normalized so that it matches the way we use it in org-mode, I will patch this soon.
I gave a quick look both of the lists, and it seems that for most cases Pygments and Org use similar language identifiers overall, but Pygments does not support directly emacs-lisp, common-lisp and other lisp dialects.
In the meantime, I will make emacs-lisp
and common-lisp
identifiers default to use the scheme lexer from Pygments.
Also one question, how did you get the ClassNotFound
error? When I test using a non-supported lexer from Pygments, it defaults on using the 'text' lexer for the block.
https://github.com/bdewey/org-ruby/blob/master/lib/org-ruby/html_output_buffer.rb#L117
I can reproduce the error just by the following command:
org-ruby -d test.org
test.org is a simple file you can find in this gist.
See the error message here
Thanks for your help!
Edit: the error message may be misleading. Sometimes I can get correct result. I'll check the file again and report later.
Ok! I added a special case for lisp dialects so that they use the scheme parser from Pygments: https://github.com/bdewey/org-ruby/commit/180d995bd7ae3b8dab99bcf0bcafd9455bfc33fc
Thanks a lot!
Difference between Org and Pygments leads to some errors. For example:
Pygments will complain:
It's ok if I change
emacs-lisp
toscheme
.