[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [FR] Make :var foo=name-of-src-block assign the source block code in
Re: [FR] Make :var foo=name-of-src-block assign the source block code instead of currently assigned result of evaluation (was: [PATCH] Add :noweb-prefix and :noweb-trans babel header arguments)
Sun, 17 Jul 2022 17:39:53 +0000
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
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
and <<babel-fn(var=block-id)>> would also insert the contents as a
Do you have any example of use in mind, beyond my original one ?