Hi,

Ihor Radchenko writes:
> Hmm. You are right. I missed "optionally".
>
> Still, I find this idea as the best solution for people who want to
> process the source block text during noweb expansion.
>
> Alternative ideas are welcome though. I'd prefer to avoid breaking
> change if we can find an equally simple syntax alternative to assign
> source block code to a variable.

The uses are maybe too niche to warrant the breaking change. A syntax
extension like
 : var=block-id[]
seems possible, even though brackets are already overloaded.

One alternative is to only allow the syntax inside noweb brackets
instead of generic variable arguments. I assume there'd be much less
breakage. It would also makes sense to allow noweb references instead
of block ids. We'd add support for
 : <<babel-fn(var=noweb-ref)>>
and <<babel-fn(var=block-id)>> would also insert the contents as a
by-product.

Do you have any example of use in mind, beyond my original one ?

Regards,

--
Sébastien Miquel

Reply via email to