[Top][All Lists]

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

Re: [O] [BUG] Noweb reference eval syntax does not work

From: Nicolas Goaziou
Subject: Re: [O] [BUG] Noweb reference eval syntax does not work
Date: Mon, 16 May 2016 00:40:11 +0200


Aaron Ecay <address@hidden> writes:

> I think that we can provide a replacement to noweb-ref as follows:
> * Code blocks
> :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.



Nicolas Goaziou

reply via email to

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