From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Rasmus <rasmus@gmx.us>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: [BUG] Noweb reference eval syntax does not work
Date: Mon, 16 May 2016 00:40:11 +0200 [thread overview]
Message-ID: <87eg93uer8.fsf@saiph.selenimh> (raw)
In-Reply-To: <87mvnu97f0.fsf@gmail.com> (Aaron Ecay's message of "Thu, 12 May 2016 19:35:15 -0400")
Hello,
Aaron Ecay <aaronecay@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
next prev parent reply other threads:[~2016-05-15 22:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-05 21:39 [BUG] Noweb reference eval syntax does not work fm4d
2016-05-08 9:26 ` Nicolas Goaziou
2016-05-08 12:57 ` Rasmus
2016-05-08 16:32 ` Thomas S. Dye
2016-05-11 21:34 ` Nicolas Goaziou
2016-05-11 22:40 ` Samuel Wales
2016-05-11 23:19 ` Charles C. Berry
2016-05-12 23:35 ` Aaron Ecay
2016-05-15 22:40 ` Nicolas Goaziou [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-08-04 21:11 Karsten Schmidt
2016-08-05 2:25 ` Charles C. Berry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eg93uer8.fsf@saiph.selenimh \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=rasmus@gmx.us \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.