This is the official manual for the latest Org-mode release.
A note about security: With code evaluation comes the risk of harm. Org safeguards by prompting for user's permission before executing any code in the source block. To customize this safeguard (or disable it) see Code evaluation security.
Org captures the results of the ‘src’ code block evaluation and inserts
them in the Org file, right after the ‘src’ code block. The insertion
point is after a newline and the
#+RESULTS label. Org creates the
#+RESULTS label if one is not already there.
By default, Org enables only
emacs-lisp source code blocks for
execution. See Languages for identifiers to enable other languages.
Org provides many ways to execute code blocks. C-c C-c or C-c C-v
e with the point on a code block1 calls the
org-babel-execute-src-block function, which executes the code in the
block, collects the results, and inserts them in the buffer.
By calling a named code block2
from an Org mode buffer or table. These named code blocks can be located in
the current Org mode buffer or in the “Library of Babel” (see Library of Babel). Using either the inline syntax or the
#+CALL: syntax, the
result is then wrapped based on
org-babel-inline-result-wrap, which by
"=%s=" that produces verbatim text suitable for markup.
The syntax for
#+CALL: <name>(<arguments>) #+CALL: <name>[<inside header arguments>](<arguments>) <end header arguments>
The syntax for inline named code block is
... call_<name>(<arguments>) ... ... call_<name>[<inside header arguments>](<arguments>)[<end header arguments>] ...
#+CALL:line that passes 4 to a code block named
double, which declares the header argument
:var n=2, would be written as
<inside header arguments>
[:results output]collects results printed to
STDOUTduring code execution of that block.
<end header arguments>
:results htmlwraps the results in a
BEGIN_EXPORT htmlblock and then inserts them in the Org buffer.
For more examples of header arguments for
#+CALL: lines see
Header arguments in function calls.
 The option
org-babel-no-eval-on-ctrl-c-ctrl-c can be used to remove code
evaluation from the C-c C-c key binding.