emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* babel "language" for conf-mode?
@ 2014-10-07  5:38 Eric Abrahamsen
  2014-10-07  6:09 ` Thomas S. Dye
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Abrahamsen @ 2014-10-07  5:38 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* Re: babel "language" for conf-mode?
  2014-10-07  5:38 babel "language" for conf-mode? Eric Abrahamsen
@ 2014-10-07  6:09 ` Thomas S. Dye
  2014-10-07  7:07   ` Eric Abrahamsen
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas S. Dye @ 2014-10-07  6:09 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode

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

All the best,
Tom

Eric Abrahamsen <eric@ericabrahamsen.net> 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
>
>
>

-- 
Thomas S. Dye
http://www.tsdye.com

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

* Re: babel "language" for conf-mode?
  2014-10-07  6:09 ` Thomas S. Dye
@ 2014-10-07  7:07   ` Eric Abrahamsen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Abrahamsen @ 2014-10-07  7:07 UTC (permalink / raw)
  To: emacs-orgmode

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 <eric@ericabrahamsen.net> 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
>>
>>
>>

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

end of thread, other threads:[~2014-10-07  7:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-07  5:38 babel "language" for conf-mode? Eric Abrahamsen
2014-10-07  6:09 ` Thomas S. Dye
2014-10-07  7:07   ` Eric Abrahamsen

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