[Top][All Lists]

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

Re: [O] Literate Programming - Continue a Source Block?

From: Neeum Zawan
Subject: Re: [O] Literate Programming - Continue a Source Block?
Date: Thu, 16 Jun 2011 21:30:15 -0700

Eric Schulte <address@hidden> writes:

> How about the following solution, which is based on a new :noweb-ref
> header argument.
> When expanding ``noweb'' style references the bodies of all code block
> with /either/ a block name matching the reference name /or/ a :noweb-ref
> header argument matching the reference name will be concatenated
> together to form the replacement text.
> By setting this header argument at the sub-tree or file level, simple
> code block concatenation may be achieved.  For example, when tangling
> the following Org-mode file, the bodies of code blocks will be
> concatenated into the resulting pure code file.


Your example is not completely clear. I noticed you didn't put any names
for the source blocks that use the noweb-ref. Is it necessary not to
name them, or can one name them but their names will still have to be
unique and are orthogonal to concatenation (i.e. they have names, but
the concatenation is due to whatever the argument of noweb-ref is)?

I think either way, this solution serves my purpose. My original
suggestion was to have a header whose value would be "append" to allow
for concatenation if the name matches a previous source block. It seems
your solution above is the same except instead of looking at the name of
the source block, it looks at the argument of noweb-ref.

Overwriting is still not supported, but I don't know if that's all that
important (I don't have an immediate need for it). And noweb by default
did not have it either, so perhaps it's not needed for most tasks (OTOH,
you may want to think about what the best solution is if later on you
decide to add overwriting capability).

Thanks. Hope to see this or something like it soon.

reply via email to

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