This is the official manual for the latest Org-mode release.

Table of Contents

Next: , Previous: Results of evaluation, Up: Working with source code

14.10 Noweb reference syntax

Org supports named blocks in “noweb” style syntax. For “noweb” literate programming details, see


For the header argument :noweb yes, Org expands “noweb” style references in the ‘src’ code block before evaluation.

For the header argument :noweb no, Org does not expand “noweb” style references in the ‘src’ code block before evaluation.

The default is :noweb no.

Org offers a more flexible way to resolve “noweb” style references (see noweb-ref).

Org can handle naming of results block, rather than the body of the ‘src’ code block, using “noweb” style references.

For “noweb” style reference, append parenthesis to the code block name for arguments, as shown in this example:

     <<code-block-name(optional arguments)>>

Note: Org defaults to :noweb no so as not to cause errors in languages such as ‘Ruby’ where “noweb” syntax is equally valid characters. For example, <<arg>>. Change Org's default to :noweb yes for languages where there is no risk of confusion.

For faster tangling of large Org mode files, set org-babel-use-quick-and-dirty-noweb-expansion variable to t. The speedup comes at the expense of not correctly resolving inherited values of the :noweb-ref header argument.