From mboxrd@z Thu Jan 1 00:00:00 1970 From: david wen riccardi-zhu 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 Message-ID: <87vajrjetr.fsf@dwrz.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0oi9-0000zY-DM for emacs-orgmode@gnu.org; Sat, 07 Oct 2017 09:00:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0oi3-0007sl-Nd for emacs-orgmode@gnu.org; Sat, 07 Oct 2017 09:00:09 -0400 Received: from smtprelay0097.b.hostedemail.com ([64.98.42.97]:39385 helo=smtprelay.b.hostedemail.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e0oi3-0007rE-KQ for emacs-orgmode@gnu.org; Sat, 07 Oct 2017 09:00:03 -0400 Received: from filter.hostedemail.com (10.5.19.248.rfc1918.com [10.5.19.248]) by smtprelay03.b.hostedemail.com (Postfix) with ESMTP id 9D21F1A7392 for ; Sat, 7 Oct 2017 13:00:00 +0000 (UTC) Received: from localhost (unknown [98.7.87.13]) (Authenticated sender: dwrz@dwrz.net) by omf14.b.hostedemail.com (Postfix) with ESMTPA for ; Sat, 7 Oct 2017 12:59:59 +0000 (UTC) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org I'm trying to get syntax highlighting with org-mode source blocks=20 using a custom language mode for editing JavaScript. I use=20 js2-mode with a bunch of minor modes, rather than js-mode, which=20 is what org-mode uses by default. I was able to get org-mode to use js2-mode for editing code by=20 customizing org-src-lang-modes, where I set the Cons-cell for=20 javacript to js2. However, syntax highlighting has stopped working in the org buffer=20 (it works fine in the source buffer). This is with=20 org-src-fontify-natively set to true, which the documentation=20 suggests is the only requirement. Is there anything I'm missing? Thank you, David --=20 dwrz|=E6=9C=B1=E4=B8=BA=E6=96=87