Next: , Previous: wrap, Up: Specific header arguments :post

The :post header argument is used to post-process the results of a code block execution. When a post argument is given, the results of the code block will temporarily be bound to the *this* variable. This variable may then be included in header argument forms such as those used in var header argument specifications allowing passing of results to other code blocks, or direct execution via Emacs Lisp.

The following example illustrates the usage of the :post header argument.

     #+name: attr_wrap
     #+begin_src sh :var data="" :var width="\\textwidth" :results output
       echo "#+ATTR_LATEX :width $width"
       echo "$data"
     #+header: :file /tmp/it.png
     #+begin_src dot :post attr_wrap(width="5cm", data=*this*) :results drawer
               a -> b;
               b -> c;
               c -> a;
     #+ATTR_LATEX :width 5cm