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

Table of Contents

Next: , Previous: noweb, Up: Specific header arguments :noweb-ref

When expanding Noweb style references, Org concatenates ‘src’ code blocks by matching the reference name to either the code block name or the :noweb-ref header argument.

For simple concatenation, set this :noweb-ref header argument at the sub-tree or file level. In the example Org file shown next, the body of the source code in each block is extracted for concatenation to a pure code file when tangled.

      #+BEGIN_SRC sh :tangle yes :noweb yes :shebang #!/bin/sh
      * the mount point of the fullest disk
        :header-args: :noweb-ref fullest-disk
      ** query all mounted disks
      #+BEGIN_SRC sh
        df \
      ** strip the header row
      #+BEGIN_SRC sh
        |sed '1d' \
      ** output mount point of fullest disk
      #+BEGIN_SRC sh
        |awk '{if (u < +$5) {u = +$5; m = $6}} END {print m}'