Consider the following Org file:
#+PROPERTY: tangle "init.el"
#+PROPERTY: noweb yes
* A
#+begin_src elisp
; initialization code
; this *must* come first
#+end_src
* B
#+begin_src emacs-lisp
<<support-functions>>
#+end_src
** Cool Stuff
#+begin_src elisp :noweb-ref "support-functions" :tangle no
(message "willkommen")
#+end_src
** Test
#+begin_src elisp :noweb-ref "support-functions" :tangle no
(message "hi")
#+end_src
yields
(message "willkommen")
(message "hi")
; initialization code
; this *must* come first
yet removing the :tangle
header argument on one of the blocks in Cool Stuff
fixes the issue, but duplicates code:
; initialization code
; this *must* come first
(message "hi")
(message "willkommen")
(message "hi")
What must I do to ensure correct behavior? I know I could simply turn off tangling for the document and have everything be noweb, but this feels like a workaround rather than a solution.
var
iables in org-babel, but the other answers are almost exactly what I'm doing.