- publishing free software manuals
The Org Mode 7 Reference Manual
by Carsten Dominik and others
Paperback (6"x9"), 282 pages
ISBN 9781906966089
RRP £9.95 ($14.95)

Sales of this book support the Org project! Get a printed copy>>>

14.1 Structure of code blocks

The structure of code blocks is as follows:

#+srcname: <name>
#+begin_src <language> <switches> <header arguments>

code blocks can also be embedded in text as so called inline code blocks as



src_<language>[<header arguments>]{<body>}
This name is associated with the code block. This is similar to the ‘#+tblname’ lines that can be used to name tables in Org-mode files. Referencing the name of a code block makes it possible to evaluate the block from other places in the file, other files, or from Org-mode table formulas (see section 15 The spreadsheet).
The language of the code in the block.
Switches controlling exportation of the code block (see switches discussion in section 11.3 Literal examples)
<header arguments>
Optional header arguments control many aspects of evaluation, export and tangling of code blocks. See the section 14.8 Header arguments section. Header arguments can also be set on a per-buffer or per-subtree basis using properties.
The source code.
ISBN 9781906966089The Org Mode 7 Reference ManualSee the print edition