This is the official manual for the latest Org-mode release.
Org can flexibly export just the code from the code blocks, just the
results of evaluation of the code block, both the code and the
results of code block evaluation, or none. Org defaults to exporting
code for most languages. For some languages, such as
Org defaults to results. To export just the body of code blocks, see
Literal examples. To export portions (sub-trees) of an Org document,
:exports header arguments control the export of code blocks (and
not inline code):
To stop Org from evaluating code blocks during export, set
org-export-babel-evaluate variable to
nil. Turning off
evaluation comes in handy when batch processing. For example, markup
languages for wikis, which have a high risk of untrusted code. To evaluate
just the inline code blocks, set to
inline-only. Isolating inline
evaluations is not for security but for avoiding any delays due to
recalculations during exports, such as calls to a remote database.
Org never evaluates code blocks in commented sub-trees when exporting (see Comment lines). On the other hand, Org does evaluate code blocks in sub-trees excluded from export (see Export settings).