0

Expanding <<foo>> using noweb works with #+NAME: foo above one src block.

Why is this one not expanded?

 ** My org section
    :PROPERTIES:
    :header-args: NAME: foo
    :END:
     #+BEGIN_SRC sh
    pwd
     #+END_SRC


  • #+NAME: foo is not a header argument, so you cannot specify it as a property. – NickD Jul 10 at 22:31
  • Thank you @NickD. Any other suggestions to set the name property once for all source blocks in the section? – AikenCura Jul 14 at 18:40
  • Two points and a question: first, #+NAME: foo does not define a property (at least, not an org property: org properties belong to the containing heading, not to a source block); second, I don't know of any way to give a name once and have it become the name of all source blocks in the section. The question: why do you want to do that? What are you trying to accomplish by giving to every source block the same name? E.g the results of each source block would go to the same #+RESULTS: foo section (overwriting the previous results, possibly from some other source block, ... – NickD Jul 14 at 20:52
  • ..., also named foo). That would be very confusing IMO. – NickD Jul 14 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.