emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Javascript syntax highlighting?
@ 2015-05-25 14:25 Peter Davis
  2015-05-25 14:44 ` David Engster
  2015-05-25 14:48 ` Tory S. Anderson
  0 siblings, 2 replies; 6+ messages in thread
From: Peter Davis @ 2015-05-25 14:25 UTC (permalink / raw)
  To: emacs-orgmode

If I edit a JavaScript file in emacs, I get beautiful syntax 
highlighting. However, if I put the same code in a .org file between

#+BEGIN_SRC Javascript
...
#+END_SRC

I get nothing but plain black text. Is there any way to get the syntax 
highlighting in HTML output, so I can use it in a blog post?

Thanks,
-pd

-- 
--------
Peter Davis
The Tech Curmudgeon
http://www.techcurmudgeon.com

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

* Re: Javascript syntax highlighting?
  2015-05-25 14:25 Javascript syntax highlighting? Peter Davis
@ 2015-05-25 14:44 ` David Engster
  2015-05-25 14:50   ` Peter Davis
  2015-05-25 14:48 ` Tory S. Anderson
  1 sibling, 1 reply; 6+ messages in thread
From: David Engster @ 2015-05-25 14:44 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

Peter Davis writes:
> #+BEGIN_SRC Javascript

Don't capitalize, use 'javascript'.

-David

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

* Re: Javascript syntax highlighting?
  2015-05-25 14:25 Javascript syntax highlighting? Peter Davis
  2015-05-25 14:44 ` David Engster
@ 2015-05-25 14:48 ` Tory S. Anderson
  1 sibling, 0 replies; 6+ messages in thread
From: Tory S. Anderson @ 2015-05-25 14:48 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

I use somethign similar for blogs I write in orgmode. In my case, it depends on having a server-side library for syntax highlighting: I use google-code-prettify[1] on the server side and then just paste the exported code from orgmode, and it works for me. 

Peter Davis <pfd@pfdstudio.com> writes:

> If I edit a JavaScript file in emacs, I get beautiful syntax 
> highlighting. However, if I put the same code in a .org file between
>
> #+BEGIN_SRC Javascript
> ...
> #+END_SRC
>
> I get nothing but plain black text. Is there any way to get the syntax 
> highlighting in HTML output, so I can use it in a blog post?
>
> Thanks,
> -pd

Footnotes: 
[1]  https://code.google.com/p/google-code-prettify/

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

* Re: Javascript syntax highlighting?
  2015-05-25 14:44 ` David Engster
@ 2015-05-25 14:50   ` Peter Davis
  2015-05-25 16:13     ` David Engster
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Davis @ 2015-05-25 14:50 UTC (permalink / raw)
  To: emacs-orgmode



On 5/25/15 10:44 AM, David Engster wrote:
> Peter Davis writes:
>> #+BEGIN_SRC Javascript
> Don't capitalize, use 'javascript'.
Thanks, David.

That doesn't appear to make any difference. Neither does "js".

Thanks,
-pd

-- 
--------
Peter Davis
The Tech Curmudgeon
http://www.techcurmudgeon.com

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

* Re: Javascript syntax highlighting?
  2015-05-25 14:50   ` Peter Davis
@ 2015-05-25 16:13     ` David Engster
  2015-05-25 16:26       ` Peter Davis
  0 siblings, 1 reply; 6+ messages in thread
From: David Engster @ 2015-05-25 16:13 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

Peter Davis writes:
> On 5/25/15 10:44 AM, David Engster wrote:
>> Peter Davis writes:
>>> #+BEGIN_SRC Javascript
>> Don't capitalize, use 'javascript'.
> Thanks, David.
>
> That doesn't appear to make any difference. Neither does "js".

Do you mean you don't see any highlighting in Emacs, or only in the
export?

What does 'C-h v major-mode RET' say when you are editing a Javascript
file?

-David

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

* Re: Javascript syntax highlighting?
  2015-05-25 16:13     ` David Engster
@ 2015-05-25 16:26       ` Peter Davis
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Davis @ 2015-05-25 16:26 UTC (permalink / raw)
  To: emacs-orgmode

David Engster <deng@randomsample.de> writes:

> Peter Davis writes:
>> On 5/25/15 10:44 AM, David Engster wrote:
>>> Peter Davis writes:
>>>> #+BEGIN_SRC Javascript
>>> Don't capitalize, use 'javascript'.
>> Thanks, David.
>>
>> That doesn't appear to make any difference. Neither does "js".
>
> Do you mean you don't see any highlighting in Emacs, or only in the
> export?

Either one.

> What does 'C-h v major-mode RET' say when you are editing a Javascript
> file?

I've tried both js-mode and js2-mode. It doesn't seem to make any
difference.

Thanks!

-pd

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

end of thread, other threads:[~2015-05-25 16:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-25 14:25 Javascript syntax highlighting? Peter Davis
2015-05-25 14:44 ` David Engster
2015-05-25 14:50   ` Peter Davis
2015-05-25 16:13     ` David Engster
2015-05-25 16:26       ` Peter Davis
2015-05-25 14:48 ` Tory S. Anderson

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).