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