[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Proposal to replace the prefix repetition with whitespace during
From: |
Charles Berry |
Subject: |
Re: [O] Proposal to replace the prefix repetition with whitespace during expansion of noweb references |
Date: |
Sat, 29 Mar 2014 15:30:40 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Pontus Michael <m.pontus <at> gmail.com> writes:
>
> I would like to propose a change to the behavior of noweb expansion in
> relation to prefix handling.
[snip]
> I recommend to introduce a change that will replace the inserted prefix
> with whitespace of equal length.
[snip]
The behavior you desire can be obtained by using the
<<code-block-name(optional arguments)>>
idiom for noweb. For example, with a suitably crafted block called
'my-noweb', this reference
<<my-noweb( "(concat", "foo", ")" )>>
would expand just as you want. You can use the functions
org-babel-goto-named-src-block and org-babel-get-src-block-info to achieve
this.
Multiple noweb references might be handled as well by delimiting the second
argument, e.g. "foo,bar".
---
Revising the behavior of the existing code base might break code
that folks have written that depend on the current behavior.
HTH,
Chuck