Hi Neeum, You are correct, the current implementation only specially concatenates blocks during tangling, *not* during noweb resolution.
It would be possible to also implement the concatenation behavior during noweb expansion, however I'd prefer to first wait for a response to my recent other email to this thread asking for a more clear explication of existing noweb behavior. The only remaining times when such concatenation behavior could be implemented would be during block reference expansion, and during block evaluation, but I think expanding at those times would be unnecessary and confusing. Thanks -- Eric Neeum Zawan <mailingli...@nawaz.org> writes: > Eric Schulte <schulte.e...@gmail.com> writes: > >> Could you try the attached example file? I first evaluated the >> following elisp code to set the combination variable's value to append. > > Your example works if there are no noweb references. > > See the modified one where I have noweb references. Note that when > expanding the reference, it inserts only the first block it finds. > > > > > #+begin_src emacs-lisp :tangle yes :noweb yes > <<foo>> > > Random text > > <<bar>> > #+end_src > > > > * continued code blocks > :PROPERTIES: > :tangle: yes > :comments: yes > :END: > #+srcname: foo > #+begin_src emacs-lisp > (message "foo:%S" 1) > #+end_src > > #+begin_src emacs-lisp > (message "un-named") > #+end_src > #+srcname: bar > #+begin_src emacs-lisp > (message "bar:%S" 1) > #+end_src > > #+srcname: foo > #+begin_src emacs-lisp > (message "foo:%S" 2) > #+end_src > > #+srcname: bar > #+begin_src emacs-lisp > (message "bar:%S" 2) > #+end_src > > #+begin_src emacs-lisp :tangle no :results silent > (with-temp-buffer > (insert-file-contents "scraps.el") > (eval-buffer)) > #+end_src -- Eric Schulte http://cs.unm.edu/~eschulte/