emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* begin_src "generic source code"
@ 2010-04-30 18:18 Robert Klein
  2010-04-30 18:39 ` Jason McBrayer
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Klein @ 2010-04-30 18:18 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

is there a way to include generic source code in an org document?

I'm trying to put excerpts from configuration files into an org document.

However, if I leave the programming language out of the #+begin_src and
export to LaTeX or HTML, the text is rendered just like any other  
paragraph;
it is neither a <pre> block in HTML nor an lstlisting in LaTeX.

Currently I'm setting the programming language to sh. This gives some
funny colors in the HTML export, however.

Is there another way to get generic source excerpts into HTML <pre>-blocks
and LaTeX lstlistings?

Thanks a lot
Robert

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

* Re: begin_src "generic source code"
  2010-04-30 18:18 begin_src "generic source code" Robert Klein
@ 2010-04-30 18:39 ` Jason McBrayer
  2010-04-30 19:24   ` Stephan Schmitt
  2010-04-30 19:25   ` Robert Klein
  0 siblings, 2 replies; 5+ messages in thread
From: Jason McBrayer @ 2010-04-30 18:39 UTC (permalink / raw)
  To: Robert Klein; +Cc: emacs-orgmode

On Fri, Apr 30, 2010 at 2:18 PM, Robert Klein <RoKlein@roklein.de> wrote:
> is there a way to include generic source code in an org document?
>
> I'm trying to put excerpts from configuration files into an org document.

Have you tried #+begin_src conf ?

Conf-mode seems to reasonably support quite a few configuration file
modes, and I suppose it ought to handle your highlighting (etc) needs
in org-mode fairly well.


-- 
Jason F. McBrayer
http://jfm.carcosa.net/

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

* Re: begin_src "generic source code"
  2010-04-30 18:39 ` Jason McBrayer
@ 2010-04-30 19:24   ` Stephan Schmitt
  2010-04-30 19:44     ` Robert Klein
  2010-04-30 19:25   ` Robert Klein
  1 sibling, 1 reply; 5+ messages in thread
From: Stephan Schmitt @ 2010-04-30 19:24 UTC (permalink / raw)
  To: Jason McBrayer; +Cc: emacs-orgmode, Robert Klein

Maybe one of these fits your needs:

#+begin_example
#+begin_quote

hth,
Stephan

Also sprach Jason McBrayer:
> On Fri, Apr 30, 2010 at 2:18 PM, Robert Klein <RoKlein@roklein.de> wrote:
>> is there a way to include generic source code in an org document?
>>
>> I'm trying to put excerpts from configuration files into an org document.
> 
> Have you tried #+begin_src conf ?
> 
> Conf-mode seems to reasonably support quite a few configuration file
> modes, and I suppose it ought to handle your highlighting (etc) needs
> in org-mode fairly well.
> 
> 

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

* Re: begin_src "generic source code"
  2010-04-30 18:39 ` Jason McBrayer
  2010-04-30 19:24   ` Stephan Schmitt
@ 2010-04-30 19:25   ` Robert Klein
  1 sibling, 0 replies; 5+ messages in thread
From: Robert Klein @ 2010-04-30 19:25 UTC (permalink / raw)
  To: Jason McBrayer; +Cc: emacs-orgmode

On Fri, 30 Apr 2010 20:39:55 +0200, Jason McBrayer <jmcbray@carcosa.net>  
wrote:

> On Fri, Apr 30, 2010 at 2:18 PM, Robert Klein <RoKlein@roklein.de> wrote:
>> is there a way to include generic source code in an org document?
>>
>> I'm trying to put excerpts from configuration files into an org  
>> document.
>
> Have you tried #+begin_src conf ?
>
> Conf-mode seems to reasonably support quite a few configuration file
> modes, and I suppose it ought to handle your highlighting (etc) needs
> in org-mode fairly well.

Thank you very much.  I forgot there's emacs around org-mode...

Best regards
Robert

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

* Re: begin_src "generic source code"
  2010-04-30 19:24   ` Stephan Schmitt
@ 2010-04-30 19:44     ` Robert Klein
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Klein @ 2010-04-30 19:44 UTC (permalink / raw)
  To: Stephan Schmitt

On Fri, 30 Apr 2010 21:24:16 +0200, Stephan Schmitt
<drmabuse@cs.tu-berlin.de> wrote:

> Maybe one of these fits your needs:
>
> #+begin_example
> #+begin_quote
>
> hth,
> Stephan


Thanks, #+begin_example works and even uses lstlistings in LaTeX. (I
remember different from a couple of weeks ago.  Probably something
in my .emacs.)

Using both "#+begin_src conf" for real configuration files and
"#+begin_example" e.g. for a pxelinux message file will do the
job as I want.

Thank you very much
Robert


> Also sprach Jason McBrayer:
>> On Fri, Apr 30, 2010 at 2:18 PM, Robert Klein <RoKlein@roklein.de>  
>> wrote:
>>> is there a way to include generic source code in an org document?
>>>
>>> I'm trying to put excerpts from configuration files into an org  
>>> document.
>>  Have you tried #+begin_src conf ?
>>  Conf-mode seems to reasonably support quite a few configuration file
>> modes, and I suppose it ought to handle your highlighting (etc) needs
>> in org-mode fairly well.

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

end of thread, other threads:[~2010-04-30 19:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-30 18:18 begin_src "generic source code" Robert Klein
2010-04-30 18:39 ` Jason McBrayer
2010-04-30 19:24   ` Stephan Schmitt
2010-04-30 19:44     ` Robert Klein
2010-04-30 19:25   ` Robert Klein

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