emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Source blocks for tiny snippets


From: Eric Schulte
Subject: Re: [O] Source blocks for tiny snippets
Date: Sat, 22 Oct 2011 10:08:36 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

suvayu ali <address@hidden> writes:

> Hi everyone,
>
> I was wondering what people do when they need to put a few (1 or 2)
> lines of code snippets in org files? I like the syntax highlighting one
> gets in an org buffer and in HTML export with code blocks. Is there some
> work around other than have code blocks for every line I want to
> include?
>
> As an example consider this paragraph:
>
> Edit job options for number of events and other configurations
> : $ $EDITOR $GAUSSOPTS/<options_files>.py
> The number of events in a job can be customised with the option
> : LHCbApp().EvtMax = nEvts
> To run the generator only, set the property below.
> : Gauss().Phases = ["Generator"]
> To turn on full monitoring and dump an ntuple to a root file, include
> the opts files as below. It can be customised further to suit the needs.
> : importOptions('$GAUSSOPTS/<some>.opts')
>
> In the above example you have a mix of bash and python snippets.
>

Currently there is no more concise way to specify code blocks other than
the normal code block format.  Although it doesn't currently exist maybe
an option could be added to hide the #+BEGIN/END_SRC lines so that they
don't appear in the buffer.  That combined with a helper for specifying
code blocks (I use yasnippets for this) should serve.

Best -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]