emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* The Perl color style
@ 2009-10-12  8:27 Water Lin
  2009-10-12  8:58 ` Mikael Fornius
  0 siblings, 1 reply; 7+ messages in thread
From: Water Lin @ 2009-10-12  8:27 UTC (permalink / raw)
  To: emacs-orgmode


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 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The Perl color style
  2009-10-12  8:27 The Perl color style Water Lin
@ 2009-10-12  8:58 ` Mikael Fornius
  2009-10-12  9:19   ` Water Lin
  0 siblings, 1 reply; 7+ messages in thread
From: Mikael Fornius @ 2009-10-12  8:58 UTC (permalink / raw)
  To: Water Lin; +Cc: emacs-orgmode

Water Lin <WaterLin@ymail.com> writes:

> #+BEGIN_SRC perl-mode

For me:

#+BEGIN_SRC perl

is more colorful.

-- 
Mikael Fornius

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The Perl color style
  2009-10-12  8:58 ` Mikael Fornius
@ 2009-10-12  9:19   ` Water Lin
  2009-10-12 13:33     ` Carsten Dominik
  0 siblings, 1 reply; 7+ messages in thread
From: Water Lin @ 2009-10-12  9:19 UTC (permalink / raw)
  To: Mikael Fornius; +Cc: emacs-orgmode

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 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The Perl color style
  2009-10-12  9:19   ` Water Lin
@ 2009-10-12 13:33     ` Carsten Dominik
  2009-10-13  8:51       ` Water Lin
  0 siblings, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2009-10-12 13:33 UTC (permalink / raw)
  To: Water Lin; +Cc: emacs-orgmode


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The Perl color style
  2009-10-12 13:33     ` Carsten Dominik
@ 2009-10-13  8:51       ` Water Lin
  2009-10-13  9:26         ` Mikael Fornius
  0 siblings, 1 reply; 7+ messages in thread
From: Water Lin @ 2009-10-13  8:51 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

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 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The Perl color style
  2009-10-13  8:51       ` Water Lin
@ 2009-10-13  9:26         ` Mikael Fornius
  2009-10-13  9:37           ` Water Lin
  0 siblings, 1 reply; 7+ messages in thread
From: Mikael Fornius @ 2009-10-13  9:26 UTC (permalink / raw)
  To: Water Lin; +Cc: emacs-orgmode, Carsten Dominik

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: The Perl color style
  2009-10-13  9:26         ` Mikael Fornius
@ 2009-10-13  9:37           ` Water Lin
  0 siblings, 0 replies; 7+ messages in thread
From: Water Lin @ 2009-10-13  9:37 UTC (permalink / raw)
  To: Mikael Fornius; +Cc: emacs-orgmode, Carsten Dominik

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 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-10-13  9:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-12  8:27 The Perl color style Water Lin
2009-10-12  8:58 ` Mikael Fornius
2009-10-12  9:19   ` Water Lin
2009-10-12 13:33     ` Carsten Dominik
2009-10-13  8:51       ` Water Lin
2009-10-13  9:26         ` Mikael Fornius
2009-10-13  9:37           ` Water Lin

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).