[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 2 Surprises and 2 Questions Regarding Org Tangle
From: |
Kevin M. Stout |
Subject: |
Re: 2 Surprises and 2 Questions Regarding Org Tangle |
Date: |
Fri, 12 Feb 2021 23:13:06 -0500 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On 2021-02-11 18:44, Diego Zamboni wrote:
> #2 is known (maybe documented? Not sure) behavior: using :noweb-ref
> accumulates multiple blocks with the same name, whereas #+NAME uses only
> the first one. I think #+NAME's are supposed to be unique within a document.
It seems that more recent versions of org-babel-expand-noweb-references (not
org-babel-tangle, as I said in an earlier message) no longer accumulate blocks
with common #+NAMEs. (Now, though, #+NAME has priority over :noweb-ref, which is
the opposite of how things were done before.) Looking through some older
discussions on the topic, I do see the downsides of accepting duplicate #+NAMEs,
which are rooted in the assumption of uniqueness made elsewhere. Even so, I
still hold that
#+NAME: this is a cool way to do something
#+BEGIN_SRC language
stuff
#+END_SRC
is a much nicer syntax than
#+BEGIN_SRC language :noweb-ref "this is a cool way to do something"
stuff
#+END_SRC
especially as a project grows.
Perhaps we could have a variation on #+NAME that doesn't need to be unique?
Maybe something like #+NOREF, to evoke :noweb-ref? Or #+NONAME?
Sincerely,
Kevin M. Stout