I try to tag perl-mode to color the Perl code while I am publishing my org file to html. Here is the example: ----------------------- #+BEGIN_SRC perl-mode #!/usr/bin/perl # some comments; use warnings; use strict; print "hi"; #+END_SRC ----------------------- But after I convert the content to html, the Perl code is badly colored, just having some colors for content between "". So, is there a good way to color Perl code in org? What's the tag for Perl souce code? Thanks Water Lin -- Water Lin's notes and pencils: http://en.waterlin.org Email: WaterLin@ymail.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Water Lin <WaterLin@ymail.com> writes:
> #+BEGIN_SRC perl-mode
For me:
#+BEGIN_SRC perl
is more colorful.
--
Mikael Fornius
Mikael Fornius <mfo@abc.se> writes: > Water Lin <WaterLin@ymail.com> writes: > >> #+BEGIN_SRC perl-mode > > For me: > > #+BEGIN_SRC perl > > is more colorful. I don't know why, when I am using #+BEGIN_SRC perl , Emacs will tell me the error: ------------ face-attribute: Invalid face: quote Could not find config file "~/.tidyrc". Winging it. ------------ But if I use #+BEGIN_SRC Perl which has the capital P, it works but the output is not colorful enough I think. Water Lin -- Water Lin's notes and pencils: http://en.waterlin.org Email: WaterLin@ymail.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
On Oct 12, 2009, at 11:19 AM, Water Lin wrote: > Mikael Fornius <mfo@abc.se> writes: > >> Water Lin <WaterLin@ymail.com> writes: >> >>> #+BEGIN_SRC perl-mode >> >> For me: >> >> #+BEGIN_SRC perl >> >> is more colorful. > > I don't know why, when I am using > > #+BEGIN_SRC perl > > , Emacs will tell me the error: > ------------ > face-attribute: Invalid face: quote > Could not find config file "~/.tidyrc". Winging it. > ------------ Are you using htmlize.el as it comes distributed with Org in the contrib directory, or some other, older version? You need 1.36 at least. - Carsten > > But if I use > > #+BEGIN_SRC Perl > > which has the capital P, it works but the output is not colorful > enough > I think. > > Water Lin > > -- > Water Lin's notes and pencils: http://en.waterlin.org > Email: WaterLin@ymail.com > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten
Carsten Dominik <carsten.dominik@gmail.com> writes: > On Oct 12, 2009, at 11:19 AM, Water Lin wrote: > >> Mikael Fornius <mfo@abc.se> writes: >> >>> Water Lin <WaterLin@ymail.com> writes: >>> >>>> #+BEGIN_SRC perl-mode >>> >>> For me: >>> >>> #+BEGIN_SRC perl >>> >>> is more colorful. >> >> I don't know why, when I am using >> >> #+BEGIN_SRC perl >> >> , Emacs will tell me the error: >> ------------ >> face-attribute: Invalid face: quote >> Could not find config file "~/.tidyrc". Winging it. >> ------------ > > Are you using htmlize.el as it comes distributed with Org in the > contrib directory, or some other, older version? You need 1.36 at > least. > > - Carsten > I am sorry. I don't think I catch your idea. I have my own htmlize.el whoes version is 1.36. But I don't know whether Org is using this one. How can I find out this? Thanks Water Lin > >> >> But if I use >> >> #+BEGIN_SRC Perl >> >> which has the capital P, it works but the output is not colorful >> enough >> I think. >> >> Water Lin >> >> -- >> Water Lin's notes and pencils: http://en.waterlin.org >> Email: WaterLin@ymail.com >> __________________________________________________ >> Do You Yahoo!? >> Tired of spam? Yahoo! Mail has the best spam protection around >> http://mail.yahoo.com >> >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Remember: use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > - Carsten > > > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- Water Lin's notes and pencils: http://en.waterlin.org Email: WaterLin@ymail.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Water Lin <WaterLin@ymail.com> writes: >>> , Emacs will tell me the error: >>> ------------ >>> face-attribute: Invalid face: quote >>> Could not find config file "~/.tidyrc". Winging it. >>> ------------ This looks as a configuration typo or similar problem. Maybe you should try to enalble emacs "debug on error" feature: M-x toggle-debug-on-error RET , retry the org-export command and see if any information on why you have errors show up in the backtrace. If you have problem reading the backtrace you can post it here and I will give it a try. > I am sorry. I don't think I catch your idea. I have my own htmlize.el > whoes version is 1.36. But I don't know whether Org is using this one. > > How can I find out this? M-: htmlize-version RET can give an answer when htmlize-package is loaded. -- Mikael Fornius
Mikael Fornius <mfo@abc.se> writes: > Water Lin <WaterLin@ymail.com> writes: > >>>> , Emacs will tell me the error: >>>> ------------ >>>> face-attribute: Invalid face: quote >>>> Could not find config file "~/.tidyrc". Winging it. >>>> ------------ > > This looks as a configuration typo or similar problem. > > Maybe you should try to enalble emacs "debug on error" feature: > > M-x toggle-debug-on-error RET > > , retry the org-export command and see if any information on why you > have errors show up in the backtrace. > > If you have problem reading the backtrace you can post it here and I > will give it a try. > > >> I am sorry. I don't think I catch your idea. I have my own htmlize.el >> whoes version is 1.36. But I don't know whether Org is using this one. >> >> How can I find out this? > > M-: htmlize-version RET > > can give an answer when htmlize-package is loaded. I think I found the reason, there is something wrong with my Perl script, so htmlize can't parse it and add color. I changed a different script and tried htmlize, the Perl color is good. Thanks! Water Lin -- Water Lin's notes and pencils: http://en.waterlin.org Email: WaterLin@ymail.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com