* noweb multiple block together
@ 2019-11-25 4:24 Ken Mankoff
2019-11-25 6:24 ` Sebastian Miele
0 siblings, 1 reply; 3+ messages in thread
From: Ken Mankoff @ 2019-11-25 4:24 UTC (permalink / raw)
To: Org-mode
Hello,
When tangling blocks, I can tangle multiple blocks by setting a (sub)-tree level property, or ":tangle foo" in multiple headers. Is there a way to achieve the same thing with noweb?
I've tried giving multiple blocks the same "+name:" and then <<name>>, but only one seems to be included. Does this feature exist through some mechanism?
Thanks,
-k.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: noweb multiple block together
2019-11-25 4:24 noweb multiple block together Ken Mankoff
@ 2019-11-25 6:24 ` Sebastian Miele
2019-11-25 16:00 ` Ken Mankoff
0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Miele @ 2019-11-25 6:24 UTC (permalink / raw)
To: emacs-orgmode
Hi Ken,
Ken Mankoff <mankoff@gmail.com> writes:
> When tangling blocks, I can tangle multiple blocks by setting a
> (sub)-tree level property, or ":tangle foo" in multiple headers. Is
> there a way to achieve the same thing with noweb?
>
> I've tried giving multiple blocks the same "+name:" and then <<name>>,
> but only one seems to be included. Does this feature exist through
> some mechanism?
A block named by #+name: should always be unique per file. Otherwise the
Org tangling code that I looked at until now (which is most or even all
in the master branch) just uses the first one found, without checking
for duplicates.
On the other hand there is the possibility to give a common name to
multiple blocks via the header arg :noweb-ref. That works in the way you
looking for.
There is a further difference between these two kinds of naming: With
blocks named by :noweb-ref it is not possible to do something like
<<name(args)>>. Only <<name>>, i.e. plain inclusion, is possible.
Best wishes
Sebastian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: noweb multiple block together
2019-11-25 6:24 ` Sebastian Miele
@ 2019-11-25 16:00 ` Ken Mankoff
0 siblings, 0 replies; 3+ messages in thread
From: Ken Mankoff @ 2019-11-25 16:00 UTC (permalink / raw)
To: sebastian.miele; +Cc: emacs-orgmode
Hi Sebastian,
On 2019-11-24 at 22:24 -08, Sebastian Miele <sebastian.miele@gmail.com> wrote...
> there is the possibility to give a common name to multiple blocks via
> the header arg :noweb-ref. That works in the way you looking for.
Yes this does what I want. I once knew but then forgot about this. Thank you for reminding me.
-k.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-25 16:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-25 4:24 noweb multiple block together Ken Mankoff
2019-11-25 6:24 ` Sebastian Miele
2019-11-25 16:00 ` Ken Mankoff
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).