> You don't need to remove the COMMENT. All you have to do is evaluate both > blocks. COMMENT only blocks exporting and expansion. It has no effect on > evaluating.
Okay, I think I understand now. With COMMENT present, you can evaluate code blocks, but noweb refs are not expanded. So, if you evaluate the second code block, without having evaluated the first, it is indeed evaluated, but the noweb reference is not expanded hence the error. So, the question still remains: is this intended or not? In the docs (<https://orgmode.org/manual/Comment-Lines.html>), it is stated that code blocks in commented subtrees are not exported, but it no mention is made of expansion. I couldn't find anything about this in the noweb doc (<https://orgmode.org/manual/Noweb-Reference-Syntax.html>) either. I guess one way the original problem could be solved is to tag the headline with "noexport" instead of commenting it. Not sure if that works in this case as I don't know why COMMENT was chosen over "noexport". In the case of "noexport", the docs (<https://orgmode.org/manual/Export-Settings.html>) make it clear that "Even if a subtree is not exported, Org executes any code blocks contained there." So that's one difference. -- Paul
