I stumbled upon some confusing behavior today. I am working on a
literate program which is published as I push commits. Some sections are
commented out so the won't export while I am still working on them.

I was trying to evaluate a source block that used some noweb expansion
and ran into an issue where my named block was not expanding as
expected. Eventually I realized it was because the section I am working
in is commented, and the source must be skipped during expansion.

The following demonstrates the issue (assuming you don't already have a
symbol named goo defined)

* COMMENT Test Commented NoWeb
#+name: goo
#+begin_src elisp
  (defun goo () (print "goo"))
#+end_src

#+begin_src elisp :results output :noweb yes
  <<goo>>
  (goo)
#+end_src

Is this the desired behavior? Is there a different approach to use
commented sections of an org-mode document while iterating with source
blocks?

Thank you,
Grant





Reply via email to