From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: babel "language" for conf-mode? Date: Tue, 07 Oct 2014 15:07:05 +0800 Message-ID: <87ppe4z7c6.fsf@ericabrahamsen.net> References: <8738b01lth.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbOn4-0006Lo-Ju for emacs-orgmode@gnu.org; Tue, 07 Oct 2014 03:02:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbOmz-0002Mw-3Q for emacs-orgmode@gnu.org; Tue, 07 Oct 2014 03:02:34 -0400 Received: from plane.gmane.org ([80.91.229.3]:38688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbOmy-0002Mm-Ty for emacs-orgmode@gnu.org; Tue, 07 Oct 2014 03:02:29 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XbOmu-0000cD-Qo for emacs-orgmode@gnu.org; Tue, 07 Oct 2014 09:02:27 +0200 Received: from 125.77.225.129 ([125.77.225.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Oct 2014 09:02:24 +0200 Received: from eric by 125.77.225.129 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Oct 2014 09:02:24 +0200 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org tsd@tsdye.com (Thomas S. Dye) writes: > Aloha Eric, > > My guess is that you'll need to define conf-unix as a language. It > might be easy since evaluation isn't needed. > > See, > http://orgmode.org/w/worg.git/blob/HEAD:/org-contrib/babel/ob-template.el Thanks! I looked through that, and it didn't quite seem to do what I wanted, but it was enough to lead me to `org-src-lang-modes', which I think is the right tree to bark up. I just added '("conf-unix" . conf-unix) to that option, and gave C-' a whirl on a source block, and it nearly worked! I think with a little futzing around it will turn out to be fairly simply. Thanks, Eric > All the best, > Tom > > Eric Abrahamsen writes: > >> I'm doing a blog post on various computer configuration stuff, including >> lengthy excerpts from configuration files. It would be kind of nice to >> export the HTML so that the :htmlize-source option also recognized these >> chunks, and highlighted them correctly. So instead of wrapping the >> excerpts in >> >> #+BEGIN_EXAMPLE >> >> I could wrap them in >> >> #+BEGIN_SOURCE conf-unix >> >> And get highlighting a la conf-unix-mode. >> >> It's not quite a babel "language", since evaluation wouldn't do >> anything, but is there a way to just get the highlighting? >> >> Thanks! >> Eric >> >> >>