emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastian Miele <sebastian.miele@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: noweb multiple block together
Date: Mon, 25 Nov 2019 06:24:57 +0000	[thread overview]
Message-ID: <87y2w4bhhi.fsf@gmail.com> (raw)
In-Reply-To: <878so4por9.fsf@gmail.com>

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

  reply	other threads:[~2019-11-25  6:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25  4:24 noweb multiple block together Ken Mankoff
2019-11-25  6:24 ` Sebastian Miele [this message]
2019-11-25 16:00   ` Ken Mankoff

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2w4bhhi.fsf@gmail.com \
    --to=sebastian.miele@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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 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).