Hello, Aaron Ecay <aarone...@gmail.com> writes:
> I think that we can provide a replacement to noweb-ref as follows: > > * Code blocks > :PROPERTIES: > :header-args: :noweb-ref foo > :END: > > #+begin_src python > block 1 > #+end_src > #+begin_src python > block 2 > #+end_src > > * Concat > > The old way > > #+begin_src python > <<foo>> > #+end_src > > The new way: > > #+begin_src python > <<concat-blocks-of-lang-in-headline("python","Code blocks")>> > #+end_src > > concat-blocks-of-lang-in-headline would have to be an elisp source block > implementing the appropriate behavior which is present in the document > or in the library of babel. [...] > To put it another way: it seems to me that the functionality of > :noweb-ref can be reimplemented in terms of other primitives. And given > Nicolas’s comments about the complications and bugs it introduces, I’d > be in favor of deprecating and eventually removing it. I like the idea of separating block chaining and basic block syntax. That way, you don't need to pay the full price of the former if you only use the latter. However, filtering per language and headline header may be a burden. For example, this ignores blocks before first heading, and forces user to store them under the same headline. We could also keep :noweb-ref references and chain all blocks with a given :noweb-ref, with a special command. What about <<chain(..ref..)>> ? Eventually we could add into the manual how a chained block can be evaluated, since <<chain()>> is not meaningful. WDYT? Regards, -- Nicolas Goaziou