emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: david wen riccardi-zhu <dwrz@dwrz.net>
To: emacs-orgmode@gnu.org
Subject: Can I use a custom mode for org-src-lang-modes and still get syntax highlighting?
Date: Sat, 07 Oct 2017 12:57:20 +0000	[thread overview]
Message-ID: <87vajrjetr.fsf@dwrz.net> (raw)

I'm trying to get syntax highlighting with org-mode source blocks 
using a custom language mode for editing JavaScript. I use 
js2-mode with a bunch of minor modes, rather than js-mode, which 
is what org-mode uses by default.

I was able to get org-mode to use js2-mode for editing code by 
customizing org-src-lang-modes, where I set the Cons-cell for 
javacript to js2.

However, syntax highlighting has stopped working in the org buffer 
(it works fine in the source buffer). This is with 
org-src-fontify-natively set to true, which the documentation 
suggests is the only requirement.

Is there anything I'm missing?

Thank you,
David

-- 
dwrz|朱为文

             reply	other threads:[~2017-10-07 13:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-07 12:57 david wen riccardi-zhu [this message]
2017-10-07 15:02 ` Can I use a custom mode for org-src-lang-modes and still get syntax highlighting? Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vajrjetr.fsf@dwrz.net \
    --to=dwrz@dwrz.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).