Skip to examples

A visual reference · Org-mode

Org-mode,
one change at a time

From a first paragraph to a reproducible report. Complete source. A small change. Its actual result.

Edition 3 - original example edition: 10 October 2026. Prepared for Lukas C. Bossert. Native export and editor results.

The Org file is the canonical source. Read the HTML guide beside your work, or download its PDF and source for offline reading.

Last changes: 2026-10-11. Unified tour–chapter–example IDs, numbered chapter anchors and updated direct links, downloads and comparisons. Reader pages now omit publishing instructions and highlight PDF downloads.

Download PDFRendered tour · read offline
208worked examples
17topic families
1canonical Org source

Reading the tour

Three ways to see a change

Document

Org source becomes exported content: HTML fragments or real PDF pages.

Editor

Source, cursor and command produce actual buffer text, not a simulated editor.

Code and data

A source block produces a result or file. Babel evaluates; tangling extracts.

Read from the beginning or jump to a stable example ID. Each example includes its complete input and captured result. Copy link preserves the address of the guide you are reading, including its current domain and path.

Scope. This edition focuses on Doom Emacs without Evil. Standard Org / Emacs keys are shown on every example; the keyboard reference explains non-Evil Doom prefixes and contextual bindings. Command names remain usable through M-x. C means Control, M Meta (usually Alt/Option), and S Shift. Cursor position matters: commands may behave differently inside a table, a list or a heading.

Shared defaults. Examples start with no contents list, section numbers, author, date or HTML postamble. Displayed options override these settings. Full-document examples enable explicit metadata. Agenda examples use 12 October 2026. Task completion logging is off. Each example has its own file, working directory and Org buffer; Emacs starts with -Q.

Comparisons. A teal stripe marks source lines changed from the named comparison. HTML Before / After buttons switch both source and result; the PDF shows the After state. Some examples change a command rather than the source, and some refactorings deliberately produce the same output.

Keyboard reference · Doom without Evil

Doom Emacs without Evil

This tour assumes Doom's evil module is disabled, with :lang org enabled. Standard Org / Emacs keys appear on every example. Doom's non-Evil leader is C-c and its localleader is C-c l; these are configurable through doom-leader-alt-key and doom-localleader-alt-key. No modal editing is required. Press C-h k before a sequence to inspect the binding in your actual buffer. The computed examples run in plain Emacs -Q; Doom-specific aliases are documented separately and are not execution tests of your configuration.

KeysCommand / prefixUse
KeysCommand / prefixUse
C-cDoom leaderGlobal Doom command prefix; wait to see the available menu.
C-c lDoom localleaderMode-specific Doom commands in an Org buffer.
M-x command RETexecute-extended-commandRun any interactive command by name.
C-h k, then keysdescribe-keyInspect the current binding; Doom may use a richer help frontend.
C-h fdescribe-functionRead a command's documentation.
C-h mdescribe-modeInspect active modes and their bindings.
C-x C-f / C-x C-sfind-file / save-bufferOpen / save your .org file.
C-SPCset-mark-commandStart a region; move point to select text.
C-_ or C-x uundoUndo an edit.
Keyboard reference · Doom without Evil

Doom Emacs without Evil · continued

Keyboard reference continued. Commands are available by name through M-x; context-specific keys require the indicated buffer.

KeysCommand / prefixUse
C-gkeyboard-quitCancel a prompt or unfinished key sequence.
C-uuniversal-argumentPrefix the next command; its meaning depends on that command.
M-: expression RETeval-expressionEvaluate a Lisp expression shown by an inspect example.
Keyboard reference · Doom without Evil

Doom shortcuts in an Org buffer

These aliases use Doom's standard non-Evil prefixes and the :lang org module. They are read from Doom's current module source (10 October 2026); your configured keys may differ. C-c l introduces the local menu: the letters after it are ordinary sequential keypresses. The spreadsheet examples include the recalculation prefix explicitly, because the unprefixed command updates only the current row.

KeysCommand / prefixUse
KeysCommandUse
C-c l eorg-export-dispatchExport menu; continue with h h for HTML or l p for PDF.
C-c l 'org-edit-specialFormula editor in a table; source editor inside a block.
C-c l b forg-table-edit-formulasOpen table formulas directly.
C-c l b r / C-u C-c l b rorg-table-recalculateCurrent row / whole table.
C-c l b Rorg-table-recalculate-buffer-tablesRecalculate every table in the buffer once.
C-c l b t f / C-c l b t oorg-table-toggle-formula-debugger / org-table-toggle-coordinate-overlaysFormula debugger / coordinate grid.
C-c l b aorg-table-alignAlign the current table.
C-c l t / C-c l xorg-todo / org-toggle-checkboxChange task state / checkbox state.
C-c l q / C-c l oorg-set-tags-command / org-set-propertyEdit tags / a property.
Keyboard reference · Doom without Evil

Doom shortcuts in an Org buffer · continued

Keyboard reference continued. Commands are available by name through M-x; context-specific keys require the indicated buffer.

KeysCommand / prefixUse
C-c l d s / C-c l d dorg-schedule / org-deadlineSchedule / deadline.
C-c l d t / C-c l d Torg-time-stamp / org-time-stamp-inactiveActive / inactive timestamp.
C-c l l l / C-c n lorg-insert-link / org-store-linkInsert / store a link.
C-c n a a / C-c n torg-agenda / org-todo-listAgenda view / unfinished tasks.
C-c l #org-update-statistics-cookiesRefresh completion statistics.
C-c l s n / C-c l s Norg-narrow-to-subtree / widenFocus on a subtree / show the full buffer.
C-c l s s morg-sparse-treeInteractive tag/property match.
Keyboard reference · Doom without Evil

Structure, text and links

C means Control, M means Meta (usually Alt/Option), S means Shift. RET is Return; arrow names refer to arrow keys. A sequence such as C-c C-e h h is pressed in order. Org's editing commands depend on point: the same arrow shortcut can edit a heading, list item or table. On keyboards where C-SPC or modifier-arrow combinations are intercepted, use M-x with the command name.

KeysCommand / prefixUse
KeysCommandUse
TAB / S-TABorg-cycle / org-shifttabFold current heading / cycle the whole outline.
M-RETorg-meta-returnInsert a heading or list item.
M-LEFT / M-RIGHTorg-metaleft / org-metarightPromote / demote heading or item at point.
M-S-LEFT / M-S-RIGHTorg-shiftmetaleft / org-shiftmetarightChange the level of an entire subtree.
M-UP / M-DOWNorg-metaup / org-metadownMove the current subtree or item.
C-c C-n / C-c C-porg-next-visible-heading / org-previous-visible-headingNavigate visible headings.
C-c C-uoutline-up-headingGo to the parent heading.
C-c ^, then aorg-sortSort sibling headings alphabetically at a heading.
C-x n s / C-x n worg-narrow-to-subtree / widenFocus on a subtree / restore the whole buffer.
Keyboard reference · Doom without Evil

Structure, text and links · continued

Keyboard reference continued. Commands are available by name through M-x; context-specific keys require the indicated buffer.

KeysCommand / prefixUse
C-c C-x C-forg-emphasizeAdd an emphasis marker to selected text; choose *, /, ~, = or +.
C-c C-l / C-c C-oorg-insert-link / org-open-at-pointInsert or edit / follow a link.
C-c C-x forg-footnote-actionCreate a footnote or jump between reference and definition.
C-c C-x C-vorg-toggle-inline-imagesShow or hide inline image previews.
Keyboard reference · Doom without Evil

Tables and formula workflow

Inside a table, C-c C-c aligns it. On a #+TBLFM line, the same keys apply that formula set. Use C-c ' to edit formulas in a separate buffer: each assignment gets its own line, so long formulas remain manageable. If you see #ERROR, toggle the debugger with C-c {, then recalculate and inspect the substitutions. Arrow shortcuts act on whole rows or columns only when point is inside the table.

KeysCommand / prefixUse
KeysCommandUse
TAB / S-TAB / RETorg-table-next-field / org-table-previous-field / org-table-next-rowAlign and move through fields.
C-c C-corg-ctrl-c-ctrl-cAlign table; on #+TBLFM, apply that formula line.
M-LEFT / M-RIGHTorg-table-move-column-left / org-table-move-column-rightMove the current column.
M-UP / M-DOWNorg-table-move-row-up / org-table-move-row-downMove the current row.
M-S-RIGHT / M-S-LEFTorg-table-insert-column / org-table-delete-columnInsert / delete a column.
M-S-DOWN / M-S-UPorg-table-insert-row / org-table-kill-rowInsert / delete a row.
C-c -org-table-insert-hlineInsert a horizontal separator below the row.
C-c = / C-u C-c =org-table-eval-formulaEdit a column / field formula.
C-c * / C-u C-c *org-table-recalculateRecalculate current row / whole table.
Keyboard reference · Doom without Evil

Tables and formula workflow · continued

Keyboard reference continued. Commands are available by name through M-x; context-specific keys require the indicated buffer.

KeysCommand / prefixUse
C-u C-u C-c *org-table-iterateRecalculate repeatedly until stable or the limit is reached.
C-c 'org-table-edit-formulasOpen the formula editor when point is inside a table.
C-c C-c / C-u C-c C-corg-table-fedit-finishIn formula editor: save / save and recalculate.
C-c C-qorg-table-fedit-abortIn formula editor: leave without applying changes.
C-c ? / C-c }org-table-field-info / org-table-toggle-coordinate-overlaysShow current field coordinates / coordinate grid.
C-c {org-table-toggle-formula-debuggerToggle formula debugging, then recalculate.
Keyboard reference · Doom without Evil

Tasks, dates, agenda and properties

Agenda commands read org-agenda-files. To include your current file temporarily, use C-c [; use C-c ] to remove it. Day-view keys below apply inside the agenda buffer. The guide fixes its agenda examples to 12 October 2026; your interactive agenda normally opens at the current date. M-x entry points work even if you have customized Doom's global menu.

KeysCommand / prefixUse
KeysCommandUse
C-c C-torg-todoChange the TODO keyword of a heading.
C-c ,org-prioritySet a heading's priority.
M-S-RETorg-insert-todo-headingNew TODO heading; in a list, a checkbox item.
C-c C-corg-ctrl-c-ctrl-cToggle checkbox at point / refresh statistics cookie.
C-c . / C-c !org-time-stamp / org-time-stamp-inactiveInsert active / inactive timestamp.
C-c C-s / C-c C-dorg-schedule / org-deadlineSet scheduled date / deadline.
C-c [ / C-c ]org-agenda-file-to-front / org-remove-fileAdd / remove current file from agenda files.
M-x org-agenda RET aorg-agendaOpen the agenda view.
d / w / jorg-agenda-day-view / org-agenda-week-view / org-agenda-goto-dateIn agenda: day / week / chosen date.
Keyboard reference · Doom without Evil

Tasks, dates, agenda and properties · continued

Keyboard reference continued. Commands are available by name through M-x; context-specific keys require the indicated buffer.

KeysCommand / prefixUse
n / p / RET / qorg-agenda-next-line / org-agenda-previous-line / org-agenda-switch-to / org-agenda-quitNavigate / visit item / quit agenda.
M-x org-agenda RET torg-todo-listShow unfinished tasks across agenda files.
C-c C-qorg-set-tags-commandAdd or remove heading tags.
C-c C-x porg-set-propertySet a named property on the current heading.
C-c / morg-sparse-treeShow entries matching a tag/property expression.
Keyboard reference · Doom without Evil

Export and Babel

Use the export dispatcher from the Org buffer. For a body-only HTML fragment like the guide previews, enable C-b in that dispatcher before h h; for a complete document, leave body-only off. The PDF examples require a working LaTeX installation. In Doom, enable the required Babel language support through its Org module/configuration. Execute only code you intend to run; tangling writes source files without running them.

KeysCommand / prefixUse
KeysCommandUse
C-c C-eorg-export-dispatchOpen the export menu.
C-c C-e h h / h oorg-html-export-to-htmlFrom dispatcher: HTML file / HTML file and browser.
C-c C-e l l / l p / l oorg-latex-export-to-latex / org-latex-export-to-pdfLaTeX source / PDF / PDF and viewer.
C-b / C-sExport dispatcher togglesBody-only / current subtree; press within the dispatcher.
C-c C-, sorg-insert-structure-templateInsert a source block; enter the language.
C-c 'org-edit-specialEdit a source block in its language mode.
C-c ' / C-c C-korg-edit-src-exit / org-edit-src-abortIn source editor: accept changes / abort editing.
C-c C-corg-babel-execute-src-block (contextual dispatch)Evaluate the source block at point.
C-c C-v borg-babel-execute-bufferEvaluate source blocks throughout the current buffer.
Keyboard reference · Doom without Evil

Export and Babel · continued

Keyboard reference continued. Commands are available by name through M-x; context-specific keys require the indicated buffer.

KeysCommand / prefixUse
C-c C-v torg-babel-tangleExtract tangled files from the buffer.
C-c C-v vorg-babel-expand-src-blockInspect an expanded source block without executing it.
C-c C-v gorg-babel-goto-named-src-blockJump to a named source block.
C-c C-v rorg-babel-goto-named-resultJump to a named result.
ORG-01-000 · 8 examples

First document

Begin with text. Introduce structure and metadata only when they change the result.

Official Org manual ↗

Start with a paragraph

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

An ordinary line of text is already a valid Org document.

Complete Org source
Research begins with a question.
HTML export

Research begins with a question.

Generated by native Org. The frame and typography belong to this guide.
Plain textNo wrapper or document environment is required.

Separate two paragraphs

Compare with ORG-01-001 · Start with a paragraph
Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

A blank line starts a new paragraph.

Complete Org source
Research begins with a question. Write down what you observe.
HTML export

Research begins with a question.

Write down what you observe.

Generated by native Org. The frame and typography belong to this guide.
Blank lineSeparates paragraphs; a single source newline normally does not.

Add a heading

Keys (no Evil) M-RET · insert heading; M-RIGHT · demote; C-c C-e h h · export
Doom alias C-c l e h h · export HTML

A star followed by a space introduces a top-level heading.

Complete Org source
* Research notesResearch begins with a question.
HTML export

Research notes

Research begins with a question.

Generated by native Org. The frame and typography belong to this guide.
*Level-one heading; the space after the star matters.

Nest a heading

Compare with ORG-01-003 · Add a heading
Keys (no Evil) M-RET · insert heading; M-RIGHT · demote; C-c C-e h h · export
Doom alias C-c l e h h · export HTML

Add a second star to make a child heading.

Complete Org source
* Research notesResearch begins with a question. ** ObservationsWrite down what you observe.
HTML export

Research notes

Research begins with a question.

Observations

Write down what you observe.

Generated by native Org. The frame and typography belong to this guide.
**Level-two heading inside the preceding level-one section.
ORG-01-005 / First documentFull HTML document

Add a document title

Compare with ORG-01-004 · Nest a heading
Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

The title is document metadata, separate from the outline. This example uses a full HTML document so its title is visible.

Complete Org source
#+TITLE: Field notebook* Research notesResearch begins with a question.
Full HTML document

Field notebook

Research notes

Research begins with a question.

Generated by native Org. The frame and typography belong to this guide.
#+TITLE:Document title; the guide normally previews only the document body.
ORG-01-006 / First documentFull HTML document

Add an author

Compare with ORG-01-005 · Add a document title
Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

Add an author to the same document. The full HTML export puts author metadata in its postamble.

Complete Org source
#+TITLE: Field notebook#+AUTHOR: Alex Researcher* Research notesResearch begins with a question.
Full HTML document

Field notebook

Research notes

Research begins with a question.

Author: Alex Researcher

Generated by native Org. The frame and typography belong to this guide.
#+AUTHOR:Author string used by the exporter.
ORG-01-007 / First documentFull HTML document

Choose an explicit date

Compare with ORG-01-006 · Add an author
Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

An explicit date makes the document independent of the export day.

Complete Org source
#+TITLE: Field notebook#+AUTHOR: Alex Researcher#+DATE: 12 October 2026* Research notesResearch begins with a question.
Full HTML document

Field notebook

Research notes

Research begins with a question.

Date: 12 October 2026

Author: Alex Researcher

Generated by native Org. The frame and typography belong to this guide.
#+DATE:Literal document date; an empty value suppresses the date.

Add a short abstract

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

An abstract block identifies introductory summary content.

Complete Org source
#+TITLE: Field notebook#+BEGIN_ABSTRACTA compact record of a small study.#+END_ABSTRACT* Research notesResearch begins with a question.
HTML export

A compact record of a small study.

Research notes

Research begins with a question.

Generated by native Org. The frame and typography belong to this guide.
#+BEGIN_ABSTRACTStarts a special block named abstract.
#+END_ABSTRACTCloses the block; HTML exports a container, while LaTeX uses an environment.
ORG-02-000 · 10 examples

Text and lists

Change a small piece of syntax and inspect the rendered text beside it.

Official Org manual ↗

Make a word bold

Keys (no Evil) C-c C-x C-f * · org-emphasize (select text first); C-c C-e h h · export
Doom alias C-c l e h h · export HTML

Use paired asterisks around a word.

Complete Org source
A *reliable* workflow.
HTML export

A reliable workflow.

Generated by native Org. The frame and typography belong to this guide.
*text*Emphasis exported as strong text.

Use italic emphasis

Keys (no Evil) C-c C-x C-f / · org-emphasize (select text first); C-c C-e h h · export
Doom alias C-c l e h h · export HTML

Replace the emphasis markers.

Complete Org source
A /reliable/ workflow.
HTML export

A reliable workflow.

Generated by native Org. The frame and typography belong to this guide.
/text/Emphasis exported as italic text.

Show inline code

Keys (no Evil) C-c C-x C-f ~ · org-emphasize (select text first); C-c C-e h h · export
Doom alias C-c l e h h · export HTML

Mark short pieces of code inside a sentence.

Complete Org source
Run ~make~ to rebuild.
HTML export

Run make to rebuild.

Generated by native Org. The frame and typography belong to this guide.
~text~Inline code; internal markup is not interpreted.

Show literal text

Keys (no Evil) C-c C-x C-f = · org-emphasize (select text first); C-c C-e h h · export
Doom alias C-c l e h h · export HTML

Protect syntax that would otherwise be interpreted.

Complete Org source
Keep =*this*= literal.
HTML export

Keep *this* literal.

Generated by native Org. The frame and typography belong to this guide.
=text=Verbatim text; the stars remain visible.

Strike out an old statement

Keys (no Evil) C-c C-x C-f + · org-emphasize (select text first); C-c C-e h h · export
Doom alias C-c l e h h · export HTML

Mark a superseded phrase.

Complete Org source
The result is +final+ provisional.
HTML export

The result is final provisional.

Generated by native Org. The frame and typography belong to this guide.
+text+Strike-through formatting.

Create a bullet list

Keys (no Evil) M-RET · new item; M-RIGHT / M-LEFT · change nesting; C-c C-e h h · export
Doom alias C-c l e h h · export HTML

Start each item with a hyphen and a space.

Complete Org source
Materials:- Notebook- Pencil
HTML export

Materials:

  • Notebook
  • Pencil
Generated by native Org. The frame and typography belong to this guide.
-Unordered list item.

Nest a list item

Keys (no Evil) M-RET · new item; M-RIGHT / M-LEFT · change nesting; C-c C-e h h · export
Doom alias C-c l e h h · export HTML

Indent an item beneath its parent.

Complete Org source
Materials:- Notebook  - Blank pages- Pencil
HTML export

Materials:

  • Notebook
    • Blank pages
  • Pencil
Generated by native Org. The frame and typography belong to this guide.
IndentationKeeps the child item inside the preceding list item.

Number the items

Keys (no Evil) M-RET · new item; M-RIGHT / M-LEFT · change nesting; C-c C-e h h · export
Doom alias C-c l e h h · export HTML

Use ordered markers when sequence matters.

Complete Org source
1. Collect2. Check3. Publish
HTML export
  1. Collect
  2. Check
  3. Publish
Generated by native Org. The frame and typography belong to this guide.
1.Starts an ordered list; Org can renumber it while editing.

Use a description list

Keys (no Evil) M-RET · new item; M-RIGHT / M-LEFT · change nesting; C-c C-e h h · export
Doom alias C-c l e h h · export HTML

Associate terms with definitions.

Complete Org source
- Input :: Raw observations- Output :: Checked observations
HTML export
Input
Raw observations
Output
Checked observations
Generated by native Org. The frame and typography belong to this guide.
term :: definitionDescription-list syntax.

Preserve line breaks in verse

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

A verse block preserves intentional line breaks and indentation.

Complete Org source
#+BEGIN_VERSEFirst line  Second lineThird line#+END_VERSE
HTML export

First line
  Second line
Third line

Generated by native Org. The frame and typography belong to this guide.
verse blockFor text whose line structure matters.
ORG-03-000 · 8 examples

Outline and navigation

These are real buffer transformations. A command operates at the stated cursor location.

Official Org manual ↗

Demote one heading

Keys (no Evil) M-RIGHT · org-do-demote

Make Methods one level deeper. Its child is not demoted with it.

Complete Org source
* StudyIntroduction.** MethodsCollect data.*** InstrumentsA sensor.** ResultsChecked data.* AppendixDetails.
Action
M-RIGHT · org-do-demote
(org-do-demote)
Cursor at the beginning of: ** Methods
Editor buffer
* StudyIntroduction.*** MethodsCollect data.*** InstrumentsA sensor.** ResultsChecked data.* AppendixDetails.
Actual text captured from Emacs; syntax colours are applied by the guide.
org-do-demoteMoves the current heading one level down.
M-RIGHTStandard Emacs binding; command names also work through M-x.

Demote a whole subtree

Compare with ORG-03-001 · Demote one heading
Keys (no Evil) M-S-RIGHT · org-demote-subtree
Doom alias C-c l s l · demote subtree

Move Methods and its descendants together.

Complete Org source
* StudyIntroduction.** MethodsCollect data.*** InstrumentsA sensor.** ResultsChecked data.* AppendixDetails.
Action
M-S-RIGHT · org-demote-subtree
(org-demote-subtree)
Cursor at the beginning of: ** Methods
Editor buffer
* StudyIntroduction.*** MethodsCollect data.**** InstrumentsA sensor.** ResultsChecked data.* AppendixDetails.
Actual text captured from Emacs; syntax colours are applied by the guide.
org-demote-subtreePreserves relative depths inside the subtree.
M-S-RIGHTMeta + Shift + Right in standard bindings.

Promote a whole subtree

Compare with ORG-03-002 · Demote a whole subtree
Keys (no Evil) M-S-LEFT · org-promote-subtree
Doom alias C-c l s h · promote subtree

Move Methods and its child one level up.

Complete Org source
* StudyIntroduction.** MethodsCollect data.*** InstrumentsA sensor.** ResultsChecked data.* AppendixDetails.
Action
M-S-LEFT · org-promote-subtree
(org-promote-subtree)
Cursor at the beginning of: ** Methods
Editor buffer
* StudyIntroduction.* MethodsCollect data.** InstrumentsA sensor.** ResultsChecked data.* AppendixDetails.
Actual text captured from Emacs; syntax colours are applied by the guide.
org-promote-subtreePromotes the heading and every descendant.
M-S-LEFTStandard binding.

Move a subtree down

Keys (no Evil) M-DOWN · org-move-subtree-down
Doom alias C-c l s j · move subtree down

Swap Methods with the next sibling, Results. The Instruments child moves with Methods.

Complete Org source
* StudyIntroduction.** MethodsCollect data.*** InstrumentsA sensor.** ResultsChecked data.* AppendixDetails.
Action
M-DOWN · org-move-subtree-down
(org-move-subtree-down)
Cursor at the beginning of: ** Methods
Editor buffer
* StudyIntroduction.** ResultsChecked data.** MethodsCollect data.*** InstrumentsA sensor.* AppendixDetails.
Actual text captured from Emacs; syntax colours are applied by the guide.
org-move-subtree-downMoves across one sibling without losing child content.

Sort sibling headings

Keys (no Evil) C-c ^, then a · org-sort-entries
Doom alias C-c l s S, then a · sort

Sort the direct children of Study alphabetically.

Complete Org source
* Study** ZebraLast alphabetically.** AlphaFirst alphabetically.** BetaIn the middle.
Action
C-c ^, then a · org-sort-entries
(org-sort-entries nil ?a)
Cursor at the beginning of: * Study
Editor buffer
* Study** AlphaFirst alphabetically.** BetaIn the middle.** ZebraLast alphabetically.
Actual text captured from Emacs; syntax colours are applied by the guide.
org-sort-entriesSorts sibling entries.
?aThe Lisp character a requests ascending alphabetical order.

Focus on one subtree

Keys (no Evil) C-x n s · org-narrow-to-subtree
Doom alias C-c l s n · narrow to subtree

Narrow the buffer to Methods. The other text still exists but is outside the accessible region.

Complete Org source
* StudyIntroduction.** MethodsCollect data.*** InstrumentsA sensor.** ResultsChecked data.* AppendixDetails.
Action
C-x n s · org-narrow-to-subtree
(org-narrow-to-subtree)
Cursor at the beginning of: ** Methods
Editor buffer
** MethodsCollect data.*** InstrumentsA sensor.
Actual text captured from Emacs; syntax colours are applied by the guide.
org-narrow-to-subtreeRestricts the accessible buffer region.
C-x n sStandard binding; C-x n w widens again.

Widen the buffer again

Compare with ORG-03-006 · Focus on one subtree
Keys (no Evil) C-x n s, then C-x n w
Doom alias C-c l s n, then C-c l s N · narrow / widen

First narrow to Methods, then widen. The full buffer becomes accessible again.

Complete Org source
* StudyIntroduction.** MethodsCollect data.*** InstrumentsA sensor.** ResultsChecked data.* AppendixDetails.
Action
C-x n s, then C-x n w
(org-narrow-to-subtree) (widen)
Cursor at the beginning of: ** Methods
Editor buffer
* StudyIntroduction.** MethodsCollect data.*** InstrumentsA sensor.** ResultsChecked data.* AppendixDetails.
Actual text captured from Emacs; syntax colours are applied by the guide.
widenRemoves narrowing without editing the document.

Fold a subtree

Keys (no Evil) TAB · org-cycle

Hide the body and descendants of Methods. The preview serializes visible buffer text and uses an ellipsis for each hidden region.

Complete Org source
* StudyIntroduction.** MethodsCollect data.*** InstrumentsA sensor.** ResultsChecked data.* AppendixDetails.
Action
TAB · org-cycle
(org-fold-show-all) (org-cycle)
Cursor at the beginning of: ** Methods
Visible editor text
* StudyIntroduction.** Methods …** ResultsChecked data.* AppendixDetails.
Actual text captured from Emacs; syntax colours are applied by the guide.
org-cycleCycles the visibility of a heading.
TABWith point on a heading, cycle its visibility.
ORG-04-000 · 8 examples

Links and references

Make destinations explicit and keep internal references stable when headings change.

Official Org manual ↗

Insert a web link

Keys (no Evil) C-c C-l · insert/edit link; C-c C-o · open link; C-c C-e h h · export
Doom alias C-c l l l · insert/edit link; C-c n l · store link

A bracket link can display its destination directly.

Complete Org source
[[https://orgmode.org/]]
HTML export
Generated by native Org. The frame and typography belong to this guide.
[[URL]]A link without a separate description.

Give a link readable text

Keys (no Evil) C-c C-l · insert/edit link; C-c C-o · open link; C-c C-e h h · export
Doom alias C-c l l l · insert/edit link; C-c n l · store link

Add a description while keeping the same destination.

Complete Org source
[[https://orgmode.org/][Org website]]
HTML export
Generated by native Org. The frame and typography belong to this guide.
[[URL][description]]The description is shown; the URL remains the destination.

Link to another heading

Keys (no Evil) C-c C-l · insert/edit link; C-c C-o · open link; C-c C-e h h · export
Doom alias C-c l l l · insert/edit link; C-c n l · store link

A star inside the link targets a heading by its text.

Complete Org source
See [[*Results][the findings]]. * MethodsCollect data.* ResultsThe findings are ready.
HTML export

See the findings.

Methods

Collect data.

Results

The findings are ready.

Generated by native Org. The frame and typography belong to this guide.
[[*Heading]]A fuzzy link to a heading in the same file.

Use a stable custom target

Keys (no Evil) C-c C-l · insert/edit link; C-c C-o · open link; C-c C-e h h · export
Doom alias C-c l l l · insert/edit link; C-c n l · store link

The link survives a change to the displayed heading text.

Complete Org source
See [[#findings][the findings]]. * Results:PROPERTIES::CUSTOM_ID: findings:END:The findings are ready.
HTML export

See the findings.

Results

The findings are ready.

Generated by native Org. The frame and typography belong to this guide.
CUSTOM_IDExplicit local target for this heading.
[[#findings]]Links to that custom target.

Link to an inline target

Keys (no Evil) C-c C-l · insert/edit link; C-c C-o · open link; C-c C-e h h · export
Doom alias C-c l l l · insert/edit link; C-c n l · store link

An explicit target can sit inside ordinary document content.

Complete Org source
See [[sampling][the sampling step]]. <<sampling>>Take three readings.
HTML export

See the sampling step.

Take three readings.

Generated by native Org. The frame and typography belong to this guide.
<<sampling>>Creates a named target.
[[sampling][...]]References that target.

Add a footnote

Keys (no Evil) C-c C-x f · org-footnote-action; C-c C-e h h · export
Doom alias C-c l f · footnote action

Separate supporting detail from the main sentence.

Complete Org source
A small sample[fn:sample] is enough here. [fn:sample] Three observations are used for illustration.
HTML export

A small sample1 is enough here.

Footnotes:

1

Three observations are used for illustration.

Generated by native Org. The frame and typography belong to this guide.
[fn:sample]Named footnote reference and definition marker.

Write an inline footnote

Keys (no Evil) C-c C-x f · org-footnote-action; C-c C-e h h · export
Doom alias C-c l f · footnote action

Put the definition directly beside its reference.

Complete Org source
A small sample[fn::Three observations are used for illustration.] is enough here.
HTML export

A small sample1 is enough here.

Footnotes:

1

Three observations are used for illustration.

Generated by native Org. The frame and typography belong to this guide.
[fn::text]Anonymous inline footnote; the exporter assigns a number.

Link to a local file

Keys (no Evil) C-c C-l · insert/edit link; C-c C-o · open link; C-c C-e h h · export
Doom alias C-c l l l · insert/edit link; C-c n l · store link

Use a relative path to keep the project portable. The HTML contains the small sample file as an embedded download.

Complete Org source
Download [[file:assets/readings.csv][the readings]].
HTML export

Download the readings.

Generated by native Org. The frame and typography belong to this guide.
file:Local-file link.
Relative pathResolved relative to the Org file; the ZIP includes the asset.
ORG-05-000 · 12 examples

Tables and calculations

Edit and recalculate real Org tables. Source formulas remain visible beside their evaluated buffer.

Official Org manual ↗

Export a small table

Keys (no Evil) TAB · align / next field; C-c C-c · align; C-c C-e h h · export
Doom alias C-c l e h h · export HTML

A horizontal separator distinguishes the header from the data.

Complete Org source
| Item | Count ||------+-------|| A | 2 || B | 5 |
HTML export
Item Count
A 2
B 5
Generated by native Org. The frame and typography belong to this guide.
vertical barSeparates cells.
vertical bar---+---vertical barHorizontal rule; exporter treats the preceding row as a header.

Align the source columns

Keys (no Evil) C-c C-c · org-table-align
Doom alias C-c l b a · align table

Align the table in the Org buffer without changing its data.

Complete Org source
| Item | Count ||------+-------|| A | 2 || B | 5 |
Action
C-c C-c · org-table-align
(org-table-align)
Cursor at the beginning of: | A
Editor buffer
| Item | Count ||------+-------|| A    |     2 || B    |     5 |
Actual text captured from Emacs; syntax colours are applied by the guide.
org-table-alignPads cells so the pipe characters line up.
TABAlso aligns while moving between table fields.

Move a data row down

Keys (no Evil) M-DOWN · org-table-move-row-down

Move the A row below B.

Complete Org source
| Item | Count ||------+-------|| A | 2 || B | 5 |
Action
M-DOWN · org-table-move-row-down
(org-table-align) (org-table-move-row-down)
Cursor at the beginning of: | A
Editor buffer
| Item | Count ||------+-------|| B    |     5 || A    |     2 |
Actual text captured from Emacs; syntax colours are applied by the guide.
org-table-move-row-downMoves the current table row down one position.

Insert a column

Keys (no Evil) M-S-RIGHT · org-table-insert-column
Doom alias C-c l b i c · insert column

Insert an empty column at the Count field.

Complete Org source
| Item | Count ||------+-------|| A | 2 || B | 5 |
Action
M-S-RIGHT · org-table-insert-column
(org-table-align) (org-table-insert-column)
Cursor at the beginning of: Count
Editor buffer
| Item |   | Count ||------+---+-------|| A    |   |     2 || B    |   |     5 |
Actual text captured from Emacs; syntax colours are applied by the guide.
org-table-insert-columnInserts before the current column.
M-S-RIGHTStandard binding inside a table.

Calculate a whole column

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · formula editor
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Compute the second column from the first.

Complete Org source
| x | twice ||---+-------|| 2 |       || 5 |       |#+TBLFM: $2=2*$1
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | x
Editor buffer
| x | twice ||---+-------|| 2 |     4 || 5 |    10 |#+TBLFM: $2=2*$1
Actual text captured from Emacs; syntax colours are applied by the guide.
$2Destination column.
$1Value from the first column in the same row.
2*$1Multiply by two.

Change the multiplier

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · formula editor
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Change only the multiplier; the second row now produces 15.

Complete Org source
| x | twice ||---+-------|| 2 |       || 5 |       |#+TBLFM: $2=3*$1
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | x
Editor buffer
| x | twice ||---+-------|| 2 |     6 || 5 |    15 |#+TBLFM: $2=3*$1
Actual text captured from Emacs; syntax colours are applied by the guide.
3*$1Multiply the current row's first field by three.

Format decimal places

Compare with ORG-05-006 · Change the multiplier
Keys (no Evil) C-u C-c * · recalculate table; C-c ' · formula editor
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Show the quotient with exactly two decimal places.

Complete Org source
| x | twice ||---+-------|| 2 |       || 5 |       |#+TBLFM: $2=$1/3;%.2f
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | x
Editor buffer
| x | twice ||---+-------|| 2 |  0.67 || 5 |  1.67 |#+TBLFM: $2=$1/3;%.2f
Actual text captured from Emacs; syntax colours are applied by the guide.
;%.2fCalc formula output format: floating-point, two decimal places.

Calculate one specific field

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · formula editor
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Use row and column coordinates to fill the Total field.

Complete Org source
| Label | Value ||-------+-------|| A     | 2     || B     | 5     || Total |       |#+TBLFM: @4$2=@2$2+@3$2
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Label
Editor buffer
| Label | Value ||-------+-------|| A     |     2 || B     |     5 || Total |     7 |#+TBLFM: @4$2=@2$2+@3$2
Actual text captured from Emacs; syntax colours are applied by the guide.
@4$2Fourth non-rule row, second column; the header counts as row 1.
@2$2+@3$2Add the values at the two explicit coordinates.

Sum a range

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · formula editor
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Replace individual additions with a vector sum.

Complete Org source
| Label | Value ||-------+-------|| A     | 2     || B     | 5     || C     | 8     || Total |       |#+TBLFM: @5$2=vsum(@2$2..@4$2)
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Label
Editor buffer
| Label | Value ||-------+-------|| A     |     2 || B     |     5 || C     |     8 || Total |    15 |#+TBLFM: @5$2=vsum(@2$2..@4$2)
Actual text captured from Emacs; syntax colours are applied by the guide.
vsum(...)Sum the cells in a range.
..Inclusive range between two coordinates.

Use an Emacs Lisp formula

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · formula editor
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Use Lisp instead of Calc for the same numerical transformation.

Complete Org source
| x | twice ||---+-------|| 2 |       || 5 |       |#+TBLFM: $2='(* 2 $1);N
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | x
Editor buffer
| x | twice ||---+-------|| 2 |     4 || 5 |    10 |#+TBLFM: $2='(* 2 $1);N
Actual text captured from Emacs; syntax colours are applied by the guide.
'Selects an Emacs Lisp formula.
;NConvert referenced fields to numbers before evaluating.

Refer to a named table

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · formula editor
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Read a value from another table in the same document.

Complete Org source
#+NAME: inputs| Item | Count ||------+-------|| A    | 2     || B    | 5     | | Summary | Value ||---------+-------|| First   |       |#+TBLFM: @2$2=remote(inputs,@2$2)
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Summary
Editor buffer
#+NAME: inputs| Item | Count ||------+-------|| A    | 2     || B    | 5     | | Summary | Value ||---------+-------|| First   |     2 |#+TBLFM: @2$2=remote(inputs,@2$2)
Actual text captured from Emacs; syntax colours are applied by the guide.
#+NAME: inputsNames the source table.
remote(inputs,@2$2)Reads its row 2, column 2.

Add a caption and a reference

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

Give the exported table a caption and a named reference.

Complete Org source
See [[tab:counts]]. #+NAME: tab:counts#+CAPTION: Observations by group| Item | Count ||------+-------|| A | 2 || B | 5 |
HTML export

See 1.

Table 1: Observations by group
Item Count
A 2
B 5
Generated by native Org. The frame and typography belong to this guide.
#+CAPTION:Caption for the next element.
#+NAME:Named export target; references use the exported label/number.
ORG-06-000 · 40 examples

Spreadsheets and formulas

Cell references, aggregates, conditions and dependencies: start with a calculated column, then change one formula or one recalculation command at a time. Every result is computed by Org. Use the keyboard reference for formula editing and debugging.

Official Org manual ↗
ORG-06-000 · 40 examples

Spreadsheets and formulas · continued

Cell references, aggregates, conditions and dependencies: start with a calculated column, then change one formula or one recalculation command at a time. Every result is computed by Org. Use the keyboard reference for formula editing and debugging.

Official Org manual ↗
ORG-06-000 · 40 examples

Spreadsheets and formulas · continued

Cell references, aggregates, conditions and dependencies: start with a calculated column, then change one formula or one recalculation command at a time. Every result is computed by Org. Use the keyboard reference for formula editing and debugging.

Official Org manual ↗

Multiply two columns

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

A column formula fills the data rows below the first separator. Edit the inputs, then recalculate: ordinary Org tables do not update continuously.

Complete Org source
| Item | Qty | Price | Cost ||------+-----+-------+------|| Pen  |   2 |     3 |      || Pad  |   4 |     5 |      |#+TBLFM: $4=$2*$3
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Item | Qty | Price | Cost |
Editor buffer
| Item | Qty | Price | Cost ||------+-----+-------+------|| Pen  |   2 |     3 |    6 || Pad  |   4 |     5 |   20 |#+TBLFM: $4=$2*$3
Actual text captured from Emacs; syntax colours are applied by the guide.
$4Destination: column 4.
$2*$3Multiply quantity by price in the current row.
C-c =Edit a column formula while the cursor is in that column.

Target one cell

Compare with ORG-06-001 · Multiply two columns
Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Replace the column destination with an explicit row and column. The second item is left untouched. Row numbers count the header but skip separator lines.

Complete Org source
| Item | Qty | Price | Cost ||------+-----+-------+------|| Pen  |   2 |     3 |      || Pad  |   4 |     5 |      |#+TBLFM: @2$4=$2*$3
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Item | Qty | Price | Cost |
Editor buffer
| Item | Qty | Price | Cost ||------+-----+-------+------|| Pen  |   2 |     3 |    6 || Pad  |   4 |     5 |      |#+TBLFM: @2$4=$2*$3
Actual text captured from Emacs; syntax colours are applied by the guide.
@2$4Row 2, column 4: the first data row.
C-u C-c =Edit a field formula at the destination cell.

Target a rectangular range

Compare with ORG-06-002 · Target one cell
Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

A range on the left applies the formula to each destination. Here the range has one column and two rows; the final row stays blank.

Complete Org source
| Item | Qty | Price | Cost ||------+-----+-------+------|| Pen  |   2 |     3 |      || Pad  |   4 |     5 |      || Ink  |   1 |     8 |      |#+TBLFM: @2$4..@3$4=$2*$3
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Item | Qty | Price | Cost |
Editor buffer
| Item | Qty | Price | Cost ||------+-----+-------+------|| Pen  |   2 |     3 |    6 || Pad  |   4 |     5 |   20 || Ink  |   1 |     8 |      |#+TBLFM: @2$4..@3$4=$2*$3
Actual text captured from Emacs; syntax colours are applied by the guide.
@2$4..@3$4Inclusive destination range.
C-c }Show row and column coordinates over the table.

Keep a parameter cell fixed

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Both data rows read the same parameter cell. Absolute references keep the row and column explicit when the formula is applied elsewhere.

Complete Org source
| Item | Value | Scaled || Gain |     3 |        ||------+-------+--------|| A    |     2 |        || B    |     5 |        |#+TBLFM: $3=$2*@2$2
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Item | Value | Scaled |
Editor buffer
| Item | Value | Scaled || Gain |     3 |        ||------+-------+--------|| A    |     2 |      6 || B    |     5 |     15 |#+TBLFM: $3=$2*@2$2
Actual text captured from Emacs; syntax colours are applied by the guide.
@2$2Fixed cell containing the gain.
First separatorColumn formulas skip the two header rows above it.

Refer to nearby columns

Compare with ORG-06-001 · Multiply two columns
Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Relative column references are measured from the destination. This is the same multiplication as example 001, expressed as two steps and one step to the left.

Complete Org source
| Item | Qty | Price | Cost ||------+-----+-------+------|| Pen  |   2 |     3 |      || Pad  |   4 |     5 |      |#+TBLFM: $4=$-2*$-1
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Item | Qty | Price | Cost |
Editor buffer
| Item | Qty | Price | Cost ||------+-----+-------+------|| Pen  |   2 |     3 |    6 || Pad  |   4 |     5 |   20 |#+TBLFM: $4=$-2*$-1
Actual text captured from Emacs; syntax colours are applied by the guide.
$-2Two columns left of the current destination.
$-1One column left of the current destination.

Put a total in the last row

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

The destination follows the final row. The sum stops one row before it, avoiding a self-reference when you add more data rows.

Complete Org source
| Item  | Amount ||-------+--------|| Pen   |      6 || Pad   |     20 ||-------+--------|| Total |        |#+TBLFM: @>$2=vsum(@2$2..@-1$2)
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Item | Amount |
Editor buffer
| Item  | Amount ||-------+--------|| Pen   |      6 || Pad   |     20 ||-------+--------|| Total |     26 |#+TBLFM: @>$2=vsum(@2$2..@-1$2)
Actual text captured from Emacs; syntax colours are applied by the guide.
@>Last row; @< would mean the first row.
@-1Row immediately before the destination.
vsum(...)Sum the values in a range.

Use separators as range boundaries

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Horizontal rules can define a data region. Only the values between the first and second separator enter the sum.

Complete Org source
| Item  | Amount ||-------+--------|| Pen   |      6 || Pad   |     20 ||-------+--------|| Total |        |#+TBLFM: @>$2=vsum(@I$2..@II$2)
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Item | Amount |
Editor buffer
| Item  | Amount ||-------+--------|| Pen   |      6 || Pad   |     20 ||-------+--------|| Total |     26 |#+TBLFM: @>$2=vsum(@I$2..@II$2)
Actual text captured from Emacs; syntax colours are applied by the guide.
@I / @IIFirst / second horizontal separator.
Range endpointsThe separator lines themselves contain no values.

Sum across a row

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Ranges work horizontally as well as vertically. The current row is implicit when only columns are specified.

Complete Org source
| Team | Jan | Feb | Mar | Total ||------+-----+-----+-----+-------|| A    |   2 |   3 |   4 |       || B    |   5 |   1 |   6 |       |#+TBLFM: $5=vsum($2..$4)
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Team | Jan | Feb | Mar | Total |
Editor buffer
| Team | Jan | Feb | Mar | Total ||------+-----+-----+-----+-------|| A    |   2 |   3 |   4 |     9 || B    |   5 |   1 |   6 |    12 |#+TBLFM: $5=vsum($2..$4)
Actual text captured from Emacs; syntax colours are applied by the guide.
$2..$4Columns 2 through 4 of the current row.
$5Store each row total in column 5.

Calculate a row average

Compare with ORG-06-008 · Sum across a row
Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Changing only the aggregate turns the total into a mean. The three numeric readings contribute equally.

Complete Org source
| Team | Jan | Feb | Mar | Mean ||------+-----+-----+-----+------|| A    |   2 |   3 |   4 |      || B    |   5 |   1 |   6 |      |#+TBLFM: $5=vmean($2..$4)
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Team | Jan | Feb | Mar | Mean |
Editor buffer
| Team | Jan | Feb | Mar | Mean ||------+-----+-----+-----+------|| A    |   2 |   3 |   4 |    3 || B    |   5 |   1 |   6 |    4 |#+TBLFM: $5=vmean($2..$4)
Actual text captured from Emacs; syntax colours are applied by the guide.
vmean(...)Arithmetic mean of a vector or range.

Calculate a weighted mean

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Multiply each reading by its weight, add the products and divide by the sum of the weights. Parentheses make the intended grouping explicit.

Complete Org source
| Value | Weight ||-------+--------||    10 |      1 ||    20 |      3 ||-------+--------|| Mean  |        |#+TBLFM: @>$2=(@2$1*@2$2+@3$1*@3$2)/vsum(@2$2..@3$2)
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Value | Weight |
Editor buffer
| Value | Weight ||-------+--------||    10 |      1 ||    20 |      3 ||-------+--------||  Mean |   17.5 |#+TBLFM: @>$2=(@2$1*@2$2+@3$1*@3$2)/vsum(@2$2..@3$2)
Actual text captured from Emacs; syntax colours are applied by the guide.
Numerator10 x 1 + 20 x 3 = 70.
Denominator1 + 3 = 4; weighted mean = 17.5.

Show a share as a percentage

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Each amount is divided by the same total. Multiply the ratio by 100 and give the output column an explicit percent label.

Complete Org source
| Item | Amount | Share % ||------+--------+---------|| A    |     20 |         || B    |     30 |         || C    |     50 |         |#+TBLFM: $3=100*($2/vsum(@2$2..@4$2));%.1f
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Item | Amount | Share % |
Editor buffer
| Item | Amount | Share % ||------+--------+---------|| A    |     20 |    20.0 || B    |     30 |    30.0 || C    |     50 |    50.0 |#+TBLFM: $3=100*($2/vsum(@2$2..@4$2));%.1f
Actual text captured from Emacs; syntax colours are applied by the guide.
Fixed total rangeThe denominator stays the same for all rows.
;%.1fFormat each displayed result with one decimal place.

Build a running total

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

The beginning of the range stays fixed while its end follows the current row. This avoids depending on a previously calculated total.

Complete Org source
| Day | Amount | Running ||-----+--------+---------|| Mon |      2 |         || Tue |      3 |         || Wed |      4 |         |#+TBLFM: $3=vsum(@2$2..@0$2)
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Day | Amount | Running |
Editor buffer
| Day | Amount | Running ||-----+--------+---------|| Mon |      2 |       2 || Tue |      3 |       5 || Wed |      4 |       9 |#+TBLFM: $3=vsum(@2$2..@0$2)
Actual text captured from Emacs; syntax colours are applied by the guide.
@0Current destination row.
@2$2..@0$2From the first amount through the current amount.

Compare with the previous row

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Start the formula on the second data row, because the first has no earlier reading. The relative reference follows each destination.

Complete Org source
| Day | Reading | Change ||-----+---------+--------|| Mon |      10 |        || Tue |      14 |        || Wed |      11 |        |#+TBLFM: @3$3..@4$3=$2-@-1$2
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Day | Reading | Change |
Editor buffer
| Day | Reading | Change ||-----+---------+--------|| Mon |      10 |        || Tue |      14 |      4 || Wed |      11 |     -3 |#+TBLFM: @3$3..@4$3=$2-@-1$2
Actual text captured from Emacs; syntax colours are applied by the guide.
@-1$2Column 2 of the preceding row.
Destination rangeExclude the first reading from the calculation.

Choose between two values

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Use a condition to assign a numeric band. The threshold is inclusive: a score of exactly 50 receives 1.

Complete Org source
| Name | Score | Passed ||------+-------+--------|| Ada  |    70 |        || Bea  |    40 |        || Cy   |    50 |        |#+TBLFM: $3=if($2>=50,1,0)
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Name | Score | Passed |
Editor buffer
| Name | Score | Passed ||------+-------+--------|| Ada  |    70 |      1 || Bea  |    40 |      0 || Cy   |    50 |      1 |#+TBLFM: $3=if($2>=50,1,0)
Actual text captured from Emacs; syntax colours are applied by the guide.
if(test,yes,no)Evaluate the branch selected by the condition.
>=Greater than or equal to.

Guard against division by zero

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Choose a defined fallback before dividing. Zero here means the chosen fallback, so use a separate status column if it must be distinguished from a measured zero.

Complete Org source
| Total | Count | Per item ||-------+-------+----------||    12 |     3 |          ||     8 |     0 |          |#+TBLFM: $3=if($2==0,0,$1/$2)
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Total | Count | Per item |
Editor buffer
| Total | Count | Per item ||-------+-------+----------||    12 |     3 |        4 ||     8 |     0 |        0 |#+TBLFM: $3=if($2==0,0,$1/$2)
Actual text captured from Emacs; syntax colours are applied by the guide.
==Equality test in a Calc formula.
if($2==0,0,...)Skip the division when the count is zero.

Ignore empty cells in a mean

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

By default, range references drop empty fields. The mean is therefore (10 + 20) / 2, not a mean over three measurements.

Complete Org source
| A | B | C  | Mean ||---+---+----+------||10 |   | 20 |      |#+TBLFM: $4=vmean($1..$3)
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | A | B | C | Mean |
Editor buffer
|  A | B |  C | Mean ||----+---+----+------|| 10 |   | 20 |   15 |#+TBLFM: $4=vmean($1..$3)
Actual text captured from Emacs; syntax colours are applied by the guide.
Empty range fieldsOmitted by default; a blank is not automatically a measured zero.

Treat empty cells as zero

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

The formula is unchanged; the EN flags change how its input range is interpreted. Now all three positions contribute to the denominator.

Complete Org source
| A | B | C  | Mean ||---+---+----+------||10 |   | 20 |      |#+TBLFM: $4=vmean($1..$3);EN
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | A | B | C | Mean |
Editor buffer
|  A | B |  C | Mean ||----+---+----+------|| 10 |   | 20 |   10 |#+TBLFM: $4=vmean($1..$3);EN
Actual text captured from Emacs; syntax colours are applied by the guide.
EKeep empty cells in range references.
NTreat nonnumeric fields as zero; combined with E, blanks become zero.

Format fixed decimal places

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

A printf-style format controls the displayed result. Org stores that formatted text in the cell, so later formulas can read an already rounded value.

Complete Org source
| Value | Third ||-------+-------||     1 |       ||     2 |       |#+TBLFM: $2=$1/3;%.2f
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Value | Third |
Editor buffer
| Value | Third ||-------+-------||     1 |  0.33 ||     2 |  0.67 |#+TBLFM: $2=$1/3;%.2f
Actual text captured from Emacs; syntax colours are applied by the guide.
;%.2fExactly two digits after the decimal point.
RoundingKeep additional digits in intermediate cells when precision matters.

Use scientific notation

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Only the output format changes. Scientific notation gives a compact view of values across very different scales.

Complete Org source
| Value   | Copy ||---------+------|| 1234000 |      || 0.00123 |      |#+TBLFM: $2=$1;%.2e
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Value | Copy |
Editor buffer
|   Value |     Copy ||---------+----------|| 1234000 | 1.23e+06 || 0.00123 | 1.23e-03 |#+TBLFM: $2=$1;%.2e
Actual text captured from Emacs; syntax colours are applied by the guide.
;%.2eScientific notation with two decimal places in the mantissa.

Keep exact fractions

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Fraction mode keeps rational arithmetic exact. The result remains a fraction instead of a rounded decimal approximation.

Complete Org source
| Value | Third ||-------+-------||     1 |       ||     2 |       |#+TBLFM: $2=$1/3;F
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Value | Third |
Editor buffer
| Value | Third ||-------+-------||     1 |   1:3 ||     2 |   2:3 |#+TBLFM: $2=$1/3;F
Actual text captured from Emacs; syntax colours are applied by the guide.
;FCalc fraction mode.
1:3Calc notation for one third.

Use degrees in trigonometry

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Declare the angle unit explicitly. A numeric angle without a unit would otherwise depend on the calculation mode.

Complete Org source
| Angle | Sine ||-------+------||    30 |      ||    90 |      |#+TBLFM: $2=sin($1);D%.3f
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Angle | Sine |
Editor buffer
| Angle |  Sine ||-------+-------||    30 | 0.500 ||    90 | 1.000 |#+TBLFM: $2=sin($1);D%.3f
Actual text captured from Emacs; syntax colours are applied by the guide.
DInterpret trigonometric input in degrees.
%.3fDisplay three decimal places.

Switch to radians

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Change the flag and the input values together. The inputs below are numeric radian values; approximately 1.57079632679 radians is a right angle.

Complete Org source
| Angle | Sine ||-------+------|| 0.523598775598 |      || 1.57079632679  |      |#+TBLFM: $2=sin($1);R%.3f
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Angle | Sine |
Editor buffer
|          Angle |  Sine ||----------------+-------|| 0.523598775598 | 0.500 ||  1.57079632679 | 1.000 |#+TBLFM: $2=sin($1);R%.3f
Actual text captured from Emacs; syntax colours are applied by the guide.
RInterpret trigonometric input in radians.
Numeric inputApproximately pi/6 and pi/2 radians.

Name a file-level constant

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

A named constant removes a repeated magic number. Recalculate after changing the constant; the stored result cells are not live views.

Complete Org source
#+CONSTANTS: gain=3| Value | Scaled ||-------+--------||     2 |        ||     5 |        |#+TBLFM: $2=$1*$gain
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Value | Scaled |
Editor buffer
#+CONSTANTS: gain=3| Value | Scaled ||-------+--------||     2 |      6 ||     5 |     15 |#+TBLFM: $2=$1*$gain
Actual text captured from Emacs; syntax colours are applied by the guide.
#+CONSTANTS:File-level values available to table formulas.
$gainReference the named constant.

Give columns meaningful names

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

A special ! row names columns. Reserve the first column for control markers and mark data rows with # so whole-table recalculation includes them.

Complete Org source
| ! | qty | price | cost ||---+-----+-------+------|| # |   2 |     3 |      || # |   4 |     5 |      |#+TBLFM: $4=$qty*$price
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | ! | qty | price | cost |
Editor buffer
| ! | qty | price | cost ||---+-----+-------+------|| # |   2 |     3 |    6 || # |   4 |     5 |   20 |#+TBLFM: $4=$qty*$price
Actual text captured from Emacs; syntax colours are applied by the guide.
!Column names are defined in this special row.
#A marked data row; it also supports automatic recalculation on TAB/RET.
$4Destination column; named columns are used on the right-hand side.

Keep a parameter beside the data

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

A special $ row holds a named parameter inside the table. As with named columns, the first column is reserved for markers.

Complete Org source
| $ | gain=3 |        ||---+--------+--------|| ! | value  | scaled ||---+--------+--------|| # |      2 |        || # |      5 |        |#+TBLFM: $3=$value*$gain
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | $ | gain=3 | |
Editor buffer
| $ | gain=3 |        ||---+--------+--------|| ! |  value | scaled ||---+--------+--------|| # |      2 |      6 || # |      5 |     15 |#+TBLFM: $3=$value*$gain
Actual text captured from Emacs; syntax colours are applied by the guide.
$ markerDefines parameters in fields such as gain=3.
$gainRead the table parameter in a formula.

Read a heading property

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

A table can use a property from its enclosing heading. The PROP_ prefix distinguishes property values from other constants.

Complete Org source
* Budget:PROPERTIES::RATE: 0.2:END: | Net | Gross ||-----+-------|| 100 |       ||  50 |       |#+TBLFM: $2=$1*(1+$PROP_RATE);%.0f
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Net | Gross |
Editor buffer
* Budget:PROPERTIES::RATE: 0.2:END: | Net | Gross ||-----+-------|| 100 |   120 ||  50 |    60 |#+TBLFM: $2=$1*(1+$PROP_RATE);%.0f
Actual text captured from Emacs; syntax colours are applied by the guide.
$PROP_RATEValue of the RATE property, with inheritance supported.
C-c C-x pSet the property interactively at the heading.

Chain formulas from left to right

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Separate assignments with two colons. Org calculates column formulas from left to right within each row, so the third column can use the freshly calculated second one.

Complete Org source
| Input | Double | Plus one ||-------+--------+----------||     2 |      0 |        0 ||     5 |      0 |        0 |#+TBLFM: $2=2*$1::$3=$2+1
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Input | Double | Plus one |
Editor buffer
| Input | Double | Plus one ||-------+--------+----------||     2 |      4 |        5 ||     5 |     10 |       11 |#+TBLFM: $2=2*$1::$3=$2+1
Actual text captured from Emacs; syntax colours are applied by the guide.
::Separates independent assignments.
Calculation orderColumn 2 is updated before column 3.

See a dependency that needs another pass

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Move the dependency to the right and run one pass. Column 2 reads the old zero in column 3; the visibly stale result is intentional.

Complete Org source
| Input | Plus one | Double ||-------+----------+--------||     2 |        0 |      0 ||     5 |        0 |      0 |#+TBLFM: $2=$3+1::$3=2*$1
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Input | Plus one | Double |
Editor buffer
| Input | Plus one | Double ||-------+----------+--------||     2 |        1 |      4 ||     5 |        1 |     10 |#+TBLFM: $2=$3+1::$3=2*$1
Actual text captured from Emacs; syntax colours are applied by the guide.
$2=$3+1Reads column 3 before its update in this pass.
Result 1Demonstrates the dependency, not the final desired answer.

Iterate until values stabilize

Keys (no Evil) C-u C-u C-c * · org-table-iterate
Doom alias C-u C-u C-c l * · iterate table

Keep the same source and change only the command. Iteration repeats recalculation until the table stops changing or reaches its iteration limit; circular formulas need not converge.

Complete Org source
| Input | Plus one | Double ||-------+----------+--------||     2 |        0 |      0 ||     5 |        0 |      0 |#+TBLFM: $2=$3+1::$3=2*$1
Action
C-u C-u C-c * · org-table-iterate
(org-table-iterate)
Cursor at the beginning of: | Input | Plus one | Double |
Editor buffer
| Input | Plus one | Double ||-------+----------+--------||     2 |        5 |      4 ||     5 |       11 |     10 |#+TBLFM: $2=$3+1::$3=2*$1
Actual text captured from Emacs; syntax colours are applied by the guide.
C-u C-u C-c *Iterate the table rather than run one pass.
org-table-iterateCommand for repeatedly recalculating the current table.

Recalculate only the current row

Compare with ORG-06-001 · Multiply two columns
Keys (no Evil) C-c * · org-table-recalculate (current row)
Doom alias C-c l b r · recalculate current row

Omit the prefix argument to recalculate just the row at point. The second data row remains blank, even though the formula applies to its column.

Complete Org source
| Item | Qty | Price | Cost ||------+-----+-------+------|| Pen  |   2 |     3 |      || Pad  |   4 |     5 |      |#+TBLFM: $4=$2*$3
Action
C-c * · org-table-recalculate (current row)
(org-table-recalculate)
Cursor at the beginning of: | Pen
Editor buffer
| Item | Qty | Price | Cost ||------+-----+-------+------|| Pen  |   2 |     3 |    6 || Pad  |   4 |     5 |      |#+TBLFM: $4=$2*$3
Actual text captured from Emacs; syntax colours are applied by the guide.
C-c *Recalculate the current row.
C-u C-c *Recalculate all applicable rows in the table.

Aggregate a different table

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Give the input table a name and pass an absolute range to remote. The Summary table reads those cells without copying the data.

Complete Org source
#+NAME: sales| Item | Amount ||------+--------|| A    |     20 || B    |     30 | | Summary | Value ||---------+-------|| Total   |       |#+TBLFM: @2$2=vsum(remote(sales,@2$2..@3$2))
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Summary
Editor buffer
#+NAME: sales| Item | Amount ||------+--------|| A    |     20 || B    |     30 | | Summary | Value ||---------+-------|| Total   |    50 |#+TBLFM: @2$2=vsum(remote(sales,@2$2..@3$2))
Actual text captured from Emacs; syntax colours are applied by the guide.
remote(sales,...)Read cells from the named table.
DependenciesRecalculate the source table first if it also contains formulas.

Look up a row by its key

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

An Emacs Lisp formula can match a key in one table and return a value from the corresponding row. Reordering the input rows will not change these matches.

Complete Org source
#+NAME: prices| Code | Price ||------+-------|| pen  |     3 || pad  |     5 | | Code | Price ||------+-------|| pad  |       || pen  |       |#+TBLFM: $2='(org-lookup-first $1 '(remote(prices,@2$1..@3$1)) '(remote(prices,@2$2..@3$2)));E
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | pad | |
Editor buffer
#+NAME: prices| Code | Price ||------+-------|| pen  |     3 || pad  |     5 | | Code | Price ||------+-------|| pad  |     5 || pen  |     3 |#+TBLFM: $2='(org-lookup-first $1 '(remote(prices,@2$1..@3$1)) '(remote(prices,@2$2..@3$2)));E
Actual text captured from Emacs; syntax colours are applied by the guide.
org-lookup-firstReturn the first corresponding result for an equal key.
;EPreserve empty fields so the two lookup ranges stay aligned.
Leading apostropheSelect Emacs Lisp rather than Calc.

Transform text with Emacs Lisp

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Calc is not the only formula engine. In an Emacs Lisp formula, ordinary field references are substituted as strings unless numeric mode is requested.

Complete Org source
| Name | Upper ||------+-------|| ada  |       || bea  |       |#+TBLFM: $2='(upcase $1)
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Name | Upper |
Editor buffer
| Name | Upper ||------+-------|| ada  | ADA   || bea  | BEA   |#+TBLFM: $2='(upcase $1)
Actual text captured from Emacs; syntax colours are applied by the guide.
'(upcase $1)Call the Lisp upcase function on the field text.
No N flagKeep the text as a string.

Use numeric Lisp arguments

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

The N flag supplies numeric values to a Lisp formula. Without it, these field references would be strings and + would reject them.

Complete Org source
| A | B | Sum ||---+---+-----|| 2 | 3 |     || 5 | 8 |     |#+TBLFM: $3='(+ $1 $2);N
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | A | B | Sum |
Editor buffer
| A | B | Sum ||---+---+-----|| 2 | 3 |   5 || 5 | 8 |  13 |#+TBLFM: $3='(+ $1 $2);N
Actual text captured from Emacs; syntax colours are applied by the guide.
;NRead numeric fields as numbers for Lisp arithmetic.
+The Emacs Lisp addition function.

Add durations

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

The duration flag lets Calc read hours and minutes and format the sum as a duration. These cells are elapsed times, not clock times or dates.

Complete Org source
| Work | Break | Total ||------+-------+-------|| 1:30 |  0:45 |       || 2:10 |  0:20 |       |#+TBLFM: $3=$1+$2;U
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Work | Break | Total |
Editor buffer
| Work | Break | Total ||------+-------+-------|| 1:30 |  0:45 | 02:15 || 2:10 |  0:20 | 02:30 |#+TBLFM: $3=$1+$2;U
Actual text captured from Emacs; syntax colours are applied by the guide.
;UInterpret durations and display hours:minutes.
;TUse hours:minutes:seconds instead.

Convert a duration to decimal hours

Compare with ORG-06-035 · Add durations
Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Keep the same duration arithmetic and switch the output flag. Lowercase t uses the configurable duration format, whose default is fractional hours.

Complete Org source
| Work | Break | Hours ||------+-------+-------|| 1:30 |  0:45 |       || 2:10 |  0:20 |       |#+TBLFM: $3=$1+$2;t
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Work | Break | Hours |
Editor buffer
| Work | Break | Hours ||------+-------+-------|| 1:30 |  0:45 |  2.25 || 2:10 |  0:20 |  2.50 |#+TBLFM: $3=$1+$2;t
Actual text captured from Emacs; syntax colours are applied by the guide.
;tFormat using org-table-duration-custom-format.
Default formatFractional hours with two decimal places in this tested environment.

Understand multiple formula lines

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Keep two alternative formula lines under the table. A normal table recalculation uses the first line; it does not apply both alternatives in sequence.

Complete Org source
| Value | Result ||-------+--------||     2 |        ||     5 |        |#+TBLFM: $2=2*$1#+TBLFM: $2=3*$1
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | Value | Result |
Editor buffer
| Value | Result ||-------+--------||     2 |      4 ||     5 |     10 |#+TBLFM: $2=2*$1#+TBLFM: $2=3*$1
Actual text captured from Emacs; syntax colours are applied by the guide.
First #+TBLFM lineDefault formula set used by table recalculation.
:: on one lineUse this when both assignments belong to the same formula set.

Apply a different formula line

Keys (no Evil) C-c C-c on the second #+TBLFM line · org-ctrl-c-ctrl-c
Doom alias C-c l b f · inspect formula assignments

Move point to the second formula line and use C-c C-c. Org applies that selected line for this calculation; the first line remains the default for later table recalculation.

Complete Org source
| Value | Result ||-------+--------||     2 |        ||     5 |        |#+TBLFM: $2=2*$1#+TBLFM: $2=3*$1
Action
C-c C-c on the second #+TBLFM line · org-ctrl-c-ctrl-c
(org-ctrl-c-ctrl-c)
Cursor at the beginning of: #+TBLFM: $2=3*$1
Editor buffer
| Value | Result ||-------+--------||     2 |      6 ||     5 |     15 |#+TBLFM: $2=2*$1#+TBLFM: $2=3*$1
Actual text captured from Emacs; syntax colours are applied by the guide.
C-c C-c on #+TBLFMApply the formula set on that particular line.
Cursor positionDistinguishes this action from C-c C-c inside a table cell.

Generate row numbers

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

The @# token is the numeric row index of the destination. Subtract one because the header occupies the first row.

Complete Org source
| No | Item ||----+------||    | Pen  ||    | Pad  ||    | Ink  |#+TBLFM: $1=@#-1
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | No | Item |
Editor buffer
| No | Item ||----+------||  1 | Pen  ||  2 | Pad  ||  3 | Ink  |#+TBLFM: $1=@#-1
Actual text captured from Emacs; syntax colours are applied by the guide.
@#Numeric row index of the current destination.
$#The corresponding token for the column index.

Make arithmetic grouping explicit

Keys (no Evil) C-u C-c * · recalculate table; C-c ' · edit formulas
Doom alias C-u C-c l b r · recalculate whole table; C-c l b f · formulas

Calc gives multiplication special precedence after division. Parenthesize the intended quotient before multiplying; the three result columns make the difference visible.

Complete Org source
| a | b | c | a/b*c | (a/b)*c | a/(b*c) ||---+---+---+-------+---------+---------||12 | 2 | 3 |       |         |         |#+TBLFM: $4=$1/$2*$3::$5=($1/$2)*$3::$6=$1/($2*$3)
Action
C-u C-c * · org-table-recalculate (whole table)
(org-table-recalculate t)
Cursor at the beginning of: | a | b | c | a/b*c | (a/b)*c | a/(b*c) |
Editor buffer
|  a | b | c | a/b*c | (a/b)*c | a/(b*c) ||----+---+---+-------+---------+---------|| 12 | 2 | 3 |     2 |      18 |       2 |#+TBLFM: $4=$1/$2*$3::$5=($1/$2)*$3::$6=$1/($2*$3)
Actual text captured from Emacs; syntax colours are applied by the guide.
Calc parsinga/b*c is parsed as a/(b*c).
(a/b)*cUse parentheses when the intended result is 18.
ORG-07-000 · 12 examples

Tasks and planning

Separate task state, checklist progress, scheduled work and deadlines. Agenda examples use a fixed date.

Official Org manual ↗

Mark a heading as a task

Keys (no Evil) C-c C-t · org-todo; C-c C-e h h · export
Doom alias C-c l t · change TODO state

TODO is a recognized keyword at the start of a heading.

Complete Org source
* TODO Review the report
HTML export

TODO Review the report

Generated by native Org. The frame and typography belong to this guide.
TODODefault unfinished task state.

Complete a task

Keys (no Evil) C-c C-t · choose DONE
Doom alias C-c l t · change TODO state

Change the task state at the heading. This build disables completion timestamps to keep the example focused.

Complete Org source
* TODO Review the report
Action
C-c C-t · choose DONE
(org-todo "DONE")
Cursor at the beginning of: * TODO
Editor buffer
* DONE Review the report
Actual text captured from Emacs; syntax colours are applied by the guide.
org-todoChanges the current task state.
DONEDefault completed state.

Define a workflow

Keys (no Evil) C-c C-t · choose NEXT
Doom alias C-c l t · change TODO state

Define additional states locally, then select NEXT.

Complete Org source
#+TODO: TODO NEXT WAIT | DONE* TODO Review the report
Action
C-c C-t · choose NEXT
(org-todo "NEXT")
Cursor at the beginning of: * TODO
Editor buffer
#+TODO: TODO NEXT WAIT | DONE* NEXT Review the report
Actual text captured from Emacs; syntax colours are applied by the guide.
#+TODO:File-local keyword sequence.
TODO NEXT WAITUnfinished states.
vertical barSeparates unfinished from completed states.

Set a priority

Keys (no Evil) C-c , · org-priority; S-UP / S-DOWN · adjust priority
Doom alias C-c l p p · set priority

Add a priority cookie to the heading.

Complete Org source
* TODO [#A] Review the report
HTML export

TODO Review the report

Generated by native Org. The frame and typography belong to this guide.
[#A]Highest default priority; default priorities run from A to C.

Start a checklist

Keys (no Evil) M-S-RET · insert checkbox item; C-c C-c · toggle checkbox
Doom alias C-c l x · toggle checkbox

Checkboxes belong to list items and are independent of heading TODO states.

Complete Org source
* Packing- [ ] Notebook- [ ] Pencil
HTML export

Packing

  • [ ] Notebook
  • [ ] Pencil
Generated by native Org. The frame and typography belong to this guide.
[ ]Unchecked checkbox; [X] is checked; [-] is partial.

Check one item

Compare with ORG-07-005 · Start a checklist
Keys (no Evil) C-c C-c · toggle checkbox
Doom alias C-c l x · toggle checkbox

Toggle the checkbox at Notebook.

Complete Org source
* Packing- [ ] Notebook- [ ] Pencil
Action
C-c C-c · toggle checkbox
(org-toggle-checkbox)
Cursor at the beginning of: - [ ] Notebook
Editor buffer
* Packing- [X] Notebook- [ ] Pencil
Actual text captured from Emacs; syntax colours are applied by the guide.
org-toggle-checkboxChanges checkbox state at point.

Count completed items

Compare with ORG-07-006 · Check one item
Keys (no Evil) C-c C-c on the cookie
Doom alias C-c l # · update statistics cookies

Refresh the fraction in the heading from the checklist below it.

Complete Org source
* Packing [0/2]- [X] Notebook- [ ] Pencil
Action
C-c C-c on the cookie
(org-update-statistics-cookies t)
Cursor at the beginning of: * Packing
Editor buffer
* Packing [1/2]- [X] Notebook- [ ] Pencil
Actual text captured from Emacs; syntax colours are applied by the guide.
[0/2]Statistics cookie showing completed / total items.
org-update-statistics-cookiesRecomputes task and checkbox statistics.

Show percentage progress

Compare with ORG-07-007 · Count completed items
Keys (no Evil) C-c C-c on the cookie
Doom alias C-c l # · update statistics cookies

Use a percentage cookie for the same checklist.

Complete Org source
* Packing [0%]- [X] Notebook- [ ] Pencil
Action
C-c C-c on the cookie
(org-update-statistics-cookies t)
Cursor at the beginning of: * Packing
Editor buffer
* Packing [50%]- [X] Notebook- [ ] Pencil
Actual text captured from Emacs; syntax colours are applied by the guide.
[0%]Percentage form of the statistics cookie.

See one day in the agenda

Keys (no Evil) M-x org-agenda RET a · agenda; d · day view; j · jump to date
Doom alias C-c n a a · open agenda; then d and j

Collect scheduled work, deadline warnings and an appointment into one day view. The reference day is 12 October 2026.

Complete Org source
* TODO Analyse readingsSCHEDULED: <2026-10-12 Mon>* TODO Send reportDEADLINE: <2026-10-14 Wed>* Meeting<2026-10-12 Mon 14:00>
Action
M-x org-agenda-list · one day
(org-agenda-list nil "2026-10-12" 1)
Agenda buffer
Day-agenda (W42):Monday     12 October 2026 W42 14:00...... Meeting Scheduled:  TODO Analyse readings In   2 d.:  TODO Send report
Actual text captured from Emacs; syntax colours are applied by the guide.
SCHEDULED:Date on which work should start.
DEADLINE:Due date; warnings may appear before it.
<... 14:00>Active timestamp with appointment time.

Move the scheduled task

Keys (no Evil) C-c C-s · reschedule task; M-x org-agenda RET a · agenda
Doom alias C-c l d s · schedule; C-c n a a · open agenda

Move the scheduled date one day forward. It no longer appears as scheduled work on Monday.

Complete Org source
* TODO Analyse readingsSCHEDULED: <2026-10-13 Tue>* TODO Send reportDEADLINE: <2026-10-14 Wed>* Meeting<2026-10-12 Mon 14:00>
Action
Agenda for 12 October 2026
(org-agenda-list nil "2026-10-12" 1)
Agenda buffer
Day-agenda (W42):Monday     12 October 2026 W42 14:00...... Meeting In   2 d.:  TODO Send report
Actual text captured from Emacs; syntax colours are applied by the guide.
2026-10-13 TueThe new start date; the displayed agenda day is unchanged.

Show all unfinished tasks

Keys (no Evil) M-x org-agenda RET t · global TODO list (org-todo-list)
Doom alias C-c n t · global TODO list

A global TODO list collects unfinished headings even if they have no appointment today.

Complete Org source
* TODO Analyse readingsSCHEDULED: <2026-10-12 Mon>* TODO Send reportDEADLINE: <2026-10-14 Wed>* Meeting<2026-10-12 Mon 14:00>
Action
M-x org-todo-list
(org-todo-list)
Agenda buffer
Global list of TODO items of type: ALLPress ‘N r’ (e.g. ‘0 r’) to search again: (0)[ALL] (1)DONE (2)TODO TODO Analyse readings TODO Send report
Actual text captured from Emacs; syntax colours are applied by the guide.
org-todo-listBuilds the global TODO view from org-agenda-files.

Add a repeating date

Keys (no Evil) C-c . · insert timestamp, including +1w; C-c C-s · schedule
Doom alias C-c l d t · timestamp; C-c l d s · schedule

A repeater records how to advance the date when the task is completed. The preview shows the source because repeater behavior is an editor operation.

Complete Org source
* TODO Check backupsSCHEDULED: <2026-10-12 Mon +1w>
Action
Source inspection · no command
Editor buffer
* TODO Check backupsSCHEDULED: <2026-10-12 Mon +1w>
Actual text captured from Emacs; syntax colours are applied by the guide.
+1wAdvance from the previous scheduled date by one week on completion.
++1w / .+1wRespectively catch up into the future / repeat relative to completion.
ORG-08-000 · 8 examples

Tags and properties

Attach machine-readable context to headings. Inspect metadata and simple filtered views.

Official Org manual ↗

Tag a heading

Keys (no Evil) C-c C-q · org-set-tags-command
Doom alias C-c l q · set tags

Tags classify headings without changing their titles.

Complete Org source
* TODO Review report :writing:projectA:
Editor buffer
* TODO Review report :writing:projectA:
Actual text captured from Emacs; syntax colours are applied by the guide.
:writing:projectA:Colon-separated tags at the end of the heading.

Add a property drawer

Keys (no Evil) C-c C-x p · org-set-property
Doom alias C-c l o · set property

A drawer stores named values below a heading.

Complete Org source
* Study:PROPERTIES::OWNER: Alex:STATUS: draft:END:Notes.
Editor buffer
* Study:PROPERTIES::OWNER: Alex:STATUS: draft:END:Notes.
Actual text captured from Emacs; syntax colours are applied by the guide.
:PROPERTIES: / :END:Drawer delimiters.
:OWNER: AlexProperty name and value.

Read a property

Keys (no Evil) M-: · eval-expression; enter the displayed Lisp form, then RET

Read OWNER programmatically at the current heading.

Complete Org source
* Study:PROPERTIES::OWNER: Alex:END:Notes.
Action
(org-entry-get nil "OWNER")
(org-entry-get nil "OWNER")
Cursor at the beginning of: * Study
Returned value
"Alex"
Actual text captured from Emacs; syntax colours are applied by the guide.
org-entry-getGets a named property from the entry at point.
nilUse the current point as the location.

Inherit a parent property

Compare with ORG-08-003 · Read a property
Keys (no Evil) M-: · eval-expression; enter the displayed Lisp form, then RET

Read OWNER at the child heading, explicitly enabling inheritance for this lookup.

Complete Org source
* Study:PROPERTIES::OWNER: Alex:END:** AnalysisNotes.
Action
(org-entry-get nil "OWNER" t)
(org-entry-get nil "OWNER" t)
Cursor at the beginning of: ** Analysis
Returned value
"Alex"
Actual text captured from Emacs; syntax colours are applied by the guide.
Third argument tSearch ancestors if the current entry has no value.

Override an inherited value

Keys (no Evil) M-: · eval-expression; enter the displayed Lisp form, then RET

A property on the child takes precedence over the parent value.

Complete Org source
* Study:PROPERTIES::OWNER: Alex:END:** Analysis:PROPERTIES::OWNER: Sam:END:Notes.
Action
(org-entry-get nil "OWNER" t)
(org-entry-get nil "OWNER" t)
Cursor at the beginning of: ** Analysis
Returned value
"Sam"
Actual text captured from Emacs; syntax colours are applied by the guide.
Local OWNEROverrides the value found in ancestors.

Set a property with a command

Keys (no Evil) C-c C-x p · org-set-property; enter OWNER, then Alex
Doom alias C-c l o · set property

Create the drawer and property through Org instead of typing the syntax.

Complete Org source
* StudyNotes.
Action
C-c C-x p · OWNER · Alex
(org-set-property "OWNER" "Alex")
Cursor at the beginning of: * Study
Editor buffer
* Study:PROPERTIES::OWNER:    Alex:END:Notes.
Actual text captured from Emacs; syntax colours are applied by the guide.
org-set-propertyWrites a property on the current entry.

Find headings with a tag

Keys (no Evil) M-: · evaluate shown form; C-c / m · interactive sparse-tree match
Doom alias C-c l s s m · interactive sparse-tree match

Map a function over headings matching the review tag. The result is a list of heading titles.

Complete Org source
* TODO Check data :review:* TODO Write text :writing:* TODO Check text :review:
Action
org-map-entries · tag match
(org-map-entries (lambda () (org-get-heading t t t t)) "review" 'file)
Returned value
("Check data" "Check text")
Actual text captured from Emacs; syntax colours are applied by the guide.
org-map-entriesCalls a function on each matching entry.
"review"Tag matcher.
'fileRestrict the search to this file.

Filter by a property value

Keys (no Evil) M-: · evaluate shown form; C-c / m · interactive sparse-tree match
Doom alias C-c l s s m · interactive sparse-tree match

Use a property matcher to select Study A.

Complete Org source
* Study A:PROPERTIES::OWNER: Alex:END:* Study B:PROPERTIES::OWNER: Sam:END:
Action
org-map-entries · property match
(org-map-entries (lambda () (org-get-heading t t t t)) "OWNER=\"Alex\"" 'file)
Returned value
("Study A")
Actual text captured from Emacs; syntax colours are applied by the guide.
OWNER="Alex"Matches the exact property value Alex.
ORG-09-000 · 6 examples

Images and blocks

Keep content portable; make format-specific presentation choices explicit.

Official Org manual ↗

Insert an image

Keys (no Evil) C-c C-l · insert image link; C-c C-x C-v · toggle inline images; C-c C-e h h · export
Doom alias C-c l e h h · export HTML

An image-only link is exported as an inline image. This asset is a small, reproducibly generated SVG.

Complete Org source
[[file:assets/curve.svg]]
HTML export

curve.svg

Generated by native Org. The frame and typography belong to this guide.
Image file linkOrg recognizes supported image extensions.

Constrain the HTML image width

Compare with ORG-09-001 · Insert an image
Keys (no Evil) C-c C-l · insert image link; C-c C-x C-v · toggle inline images; C-c C-e h h · export
Doom alias C-c l e h h · export HTML

Set the image width in the HTML backend.

Complete Org source
#+ATTR_HTML: :width 240[[file:assets/curve.svg]]
HTML export

curve.svg

Generated by native Org. The frame and typography belong to this guide.
#+ATTR_HTML:Attributes for the next exported element.
:width 240Requested width in CSS pixels; this does not set LaTeX width.

Add an image caption

Keys (no Evil) C-c C-l · insert image link; C-c C-x C-v · toggle inline images; C-c C-e h h · export
Doom alias C-c l e h h · export HTML

Attach a caption to the same image.

Complete Org source
#+CAPTION: A tiny signal#+ATTR_HTML: :width 240[[file:assets/curve.svg]]
HTML export

curve.svg

Figure 1: A tiny signal

Generated by native Org. The frame and typography belong to this guide.
#+CAPTION:Text exported with the figure.

Quote a paragraph

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

A quote block gives the paragraph quotation semantics.

Complete Org source
#+BEGIN_QUOTEA clear record makes a result easier to check.#+END_QUOTE
HTML export

A clear record makes a result easier to check.

Generated by native Org. The frame and typography belong to this guide.
quoteExports as blockquote in HTML and a quotation environment in LaTeX.

Preserve a literal example

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

An example block displays Org-looking content without interpreting it.

Complete Org source
#+BEGIN_EXAMPLE* This is literal text#+TITLE: Also literal#+END_EXAMPLE
HTML export

#+BEGINEXAMPLE

This is literal text

#+ENDEXAMPLE

Generated by native Org. The frame and typography belong to this guide.
example blockPreserves literal lines in a fixed-width block.

Create a named special block

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

HTML exports an arbitrary special block as a named container. Styling that class is a separate step; LaTeX would need a matching environment.

Complete Org source
#+begin_noteKeep the original observations.#+end_note
HTML export

Keep the original observations.

Generated by native Org. The frame and typography belong to this guide.
noteBecomes a div with class note in HTML.
Backend supportAn arbitrary block name is not automatically a predefined LaTeX environment.
ORG-10-000 · 14 examples

Export and layout

Vary one export setting at a time. HTML fragments and native LaTeX/PDF previews are clearly labelled.

Official Org manual ↗

Hide numbers and the contents list

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

Start with the simplest outline presentation.

Complete Org source
#+OPTIONS: num:nil toc:nil* MethodsA short description.** InstrumentsThe equipment used.* ResultsThe main findings.
HTML export

Methods

A short description.

Instruments

The equipment used.

Results

The main findings.

Generated by native Org. The frame and typography belong to this guide.
#+OPTIONS:num:nil disables heading numbers; toc:nil disables the table of contents.

Number the headings

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

Turn on section numbers without adding a contents list.

Complete Org source
#+OPTIONS: num:t toc:nil* MethodsA short description.** InstrumentsThe equipment used.* ResultsThe main findings.
HTML export

1. Methods

A short description.

1.1. Instruments

The equipment used.

2. Results

The main findings.

Generated by native Org. The frame and typography belong to this guide.
#+OPTIONS:num:t enables heading numbering.

Add a shallow contents list

Compare with ORG-10-002 · Number the headings
Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

List only level-one headings in the contents.

Complete Org source
#+OPTIONS: num:t toc:1* MethodsA short description.** InstrumentsThe equipment used.* ResultsThe main findings.
HTML export

Table of Contents

1. Methods

A short description.

1.1. Instruments

The equipment used.

2. Results

The main findings.

Generated by native Org. The frame and typography belong to this guide.
#+OPTIONS:toc:1 limits the contents list to one level.

Include child headings in the contents

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

Include Instruments in the contents list.

Complete Org source
#+OPTIONS: num:t toc:2* MethodsA short description.** InstrumentsThe equipment used.* ResultsThe main findings.
HTML export

1. Methods

A short description.

1.1. Instruments

The equipment used.

2. Results

The main findings.

Generated by native Org. The frame and typography belong to this guide.
#+OPTIONS:toc:2 includes two outline levels.

Number only the main headings

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

Keep the deep contents list but number only the first heading level.

Complete Org source
#+OPTIONS: num:1 toc:2* MethodsA short description.** InstrumentsThe equipment used.* ResultsThe main findings.
HTML export

Table of Contents

1. Methods

A short description.

Instruments

The equipment used.

2. Results

The main findings.

Generated by native Org. The frame and typography belong to this guide.
#+OPTIONS:num:1 limits numbering to level one.

Move the contents list

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

Disable the default contents location and insert one after the introduction.

Complete Org source
#+OPTIONS: num:t toc:nilAn introductory paragraph. #+TOC: headlines 2 * MethodsA short description.** InstrumentsThe equipment used.* ResultsThe main findings.
HTML export

An introductory paragraph.

1. Methods

A short description.

1.1. Instruments

The equipment used.

2. Results

The main findings.

Generated by native Org. The frame and typography belong to this guide.
#+TOC: headlines 2Insert a two-level heading contents list at this position.

Exclude a section

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

The noexport tag excludes the entire subtree from the exported document.

Complete Org source
* Public findingsThese may be shared.* Internal notes :noexport:Keep these out of the export.
HTML export

Public findings

These may be shared.

Generated by native Org. The frame and typography belong to this guide.
:noexport:Default exclusion tag; it does not remove the source text.

Select sections explicitly

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

Export only tagged sections and their subtrees.

Complete Org source
#+SELECT_TAGS: publish* Findings :publish:Publish this section.* Working notesDo not publish this section.
HTML export

Findings   publish

Publish this section.

Generated by native Org. The frame and typography belong to this guide.
#+SELECT_TAGS: publishUse publish as the selection tag.

Hide TODO keywords in export

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

Keep the task heading but remove its TODO keyword from the exported text.

Complete Org source
#+OPTIONS: todo:nil* TODO Review reportA useful reminder.
HTML export

Review report

A useful reminder.

Generated by native Org. The frame and typography belong to this guide.
todo:nilHides the keyword; tasks:nil would exclude task entries altogether.

Remove tasks from export

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

Exclude task entries, preserving ordinary headings.

Complete Org source
#+OPTIONS: tasks:nil* TODO Review reportA useful reminder.* ResultsReady for readers.
HTML export

Results

Ready for readers.

Generated by native Org. The frame and typography belong to this guide.
tasks:nilRemoves task headings and their contents from the export.

Require braces for subscripts

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

Require braces for subscript and superscript markup so common identifiers remain intact.

Complete Org source
#+OPTIONS: ^:{}Keep sample_A literal; write CO_{2} with a subscript.
HTML export

Keep sample_A literal; write CO2 with a subscript.

Generated by native Org. The frame and typography belong to this guide.
^:{}Interpret sub/superscripts only when the argument is braced.

Change the PDF margins

Keys (no Evil) C-c C-e l p · export PDF (org-export-dispatch)
Doom alias C-c l e l p · export PDF

Export through the native Org LaTeX backend and compile with pdfLaTeX. This preview is a real PDF page.

Complete Org source
#+LATEX_CLASS: article#+LATEX_HEADER: \usepackage[margin=25mm]{geometry}#+TITLE: Research note#+AUTHOR: Alex Researcher#+DATE:* MethodsA short description.** InstrumentsThe equipment used.* ResultsThe main findings.
Native PDF export
Native PDF page 1
Page 1
Actual native Org → LaTeX → pdfLaTeX output; preview scaled to fit.
#+LATEX_CLASS: articleChoose the article document class.
geometry / margin=25mmSet all four page margins to 25 mm.

Use larger PDF type

Compare with ORG-10-012 · Change the PDF margins
Keys (no Evil) C-c C-e l p · export PDF (org-export-dispatch)
Doom alias C-c l e l p · export PDF

Change the base font size while keeping margins and content unchanged.

Complete Org source
#+LATEX_CLASS: article#+LATEX_CLASS_OPTIONS: [12pt]#+LATEX_HEADER: \usepackage[margin=25mm]{geometry}#+TITLE: Research note#+AUTHOR: Alex Researcher#+DATE:* MethodsA short description.** InstrumentsThe equipment used.* ResultsThe main findings.
Native PDF export
Native PDF page 1
Page 1
Actual native Org → LaTeX → pdfLaTeX output; preview scaled to fit.
#+LATEX_CLASS_OPTIONS: [12pt]Pass the 12pt option to the LaTeX document class.

Insert an explicit PDF page break

Keys (no Evil) C-c C-e l p · export PDF (org-export-dispatch)
Doom alias C-c l e l p · export PDF

Place Results on a new PDF page. The guide previews every generated page.

Complete Org source
#+LATEX_CLASS: article#+LATEX_HEADER: \usepackage[margin=25mm]{geometry}#+TITLE: Research note#+AUTHOR: Alex Researcher#+DATE:* MethodsA short description.#+LATEX: \newpage* ResultsThe main findings.
Native PDF export
Native PDF page 1
Page 1
Native PDF page 2
Page 2
Actual native Org → LaTeX → pdfLaTeX output; preview scaled to fit.
#+LATEX:Emit a backend-specific LaTeX line.
\newpageEnd the current page.
ORG-11-000 · 16 examples

Source blocks and Babel

Distinguish execution, stored results and export. Header arguments control each of these separately.

Official Org manual ↗

Display a source block

Keys (no Evil) C-c C-, s · insert source block; C-c ' · edit block; C-c C-e h h · export
Doom alias C-c l e h h · export HTML

Export code without running it.

Complete Org source
#+BEGIN_SRC bash :eval neverprintf "hello\n"#+END_SRC
HTML export
printf "hello\n"
Generated by native Org. The frame and typography belong to this guide.
:eval neverPrevents Babel evaluation of this block.
bashLanguage identifier for execution and highlighting.

Run a Bash block

Keys (no Evil) C-c C-c on a source block · execute; C-c C-v b · execute buffer
Doom alias C-c l ' · edit source block

Execute the block and insert captured standard output below it.

Complete Org source
#+BEGIN_SRC bash :results outputprintf "hello\n"#+END_SRC
Evaluated Org buffer
#+BEGIN_SRC bash :results outputprintf "hello\n"#+END_SRC #+RESULTS:: hello
Actual text captured from Emacs; syntax colours are applied by the guide.
:results outputCapture stdout rather than a language-specific return value.
#+RESULTS:Marker inserted by Babel above the stored result.

Return multiple output lines

Compare with ORG-11-002 · Run a Bash block
Keys (no Evil) C-c C-c on a source block · execute; C-c C-v b · execute buffer
Doom alias C-c l ' · edit source block

The output result preserves both lines.

Complete Org source
#+BEGIN_SRC bash :results outputprintf "alpha\nbeta\n"#+END_SRC
Evaluated Org buffer
#+BEGIN_SRC bash :results outputprintf "alpha\nbeta\n"#+END_SRC #+RESULTS:: alpha: beta
Actual text captured from Emacs; syntax colours are applied by the guide.
\nA newline escape interpreted by printf.

Return an Emacs Lisp value

Keys (no Evil) C-c C-c on a source block · execute; C-c C-v b · execute buffer
Doom alias C-c l ' · edit source block

Capture the value of the final Lisp expression.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value(+ 2 3)#+END_SRC
Evaluated Org buffer
#+BEGIN_SRC emacs-lisp :results value(+ 2 3)#+END_SRC #+RESULTS:: 5
Actual text captured from Emacs; syntax colours are applied by the guide.
:results valueUse the language backend's return value.
(+ 2 3)Lisp addition; produces 5.

Return a table

Keys (no Evil) C-c C-c on a source block · execute; C-c C-v b · execute buffer
Doom alias C-c l ' · edit source block

A list of rows can become an Org table.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value table'(("A" 2) ("B" 5))#+END_SRC
Evaluated Org buffer
#+BEGIN_SRC emacs-lisp :results value table'(("A" 2) ("B" 5))#+END_SRC #+RESULTS:| A | 2 || B | 5 |
Actual text captured from Emacs; syntax colours are applied by the guide.
:results value tableFormat the returned rows as a table.
'(...)A literal Lisp list; inner lists are rows.

Supply an input variable

Keys (no Evil) C-c C-c on a source block · execute; C-c C-v b · execute buffer
Doom alias C-c l ' · edit source block

Pass a named input through a header argument.

Complete Org source
#+BEGIN_SRC emacs-lisp :var n=4 :results value(* n n)#+END_SRC
Evaluated Org buffer
#+BEGIN_SRC emacs-lisp :var n=4 :results value(* n n)#+END_SRC #+RESULTS:: 16
Actual text captured from Emacs; syntax colours are applied by the guide.
:var n=4Bind n to the number 4.
(* n n)Square the input.

Change only the input

Keys (no Evil) C-c C-c on a source block · execute; C-c C-v b · execute buffer
Doom alias C-c l ' · edit source block

Keep the code unchanged and change the parameter to seven.

Complete Org source
#+BEGIN_SRC emacs-lisp :var n=7 :results value(* n n)#+END_SRC
Evaluated Org buffer
#+BEGIN_SRC emacs-lisp :var n=7 :results value(* n n)#+END_SRC #+RESULTS:: 49
Actual text captured from Emacs; syntax colours are applied by the guide.
:var n=7The changed input produces 49.

Read a named table as input

Keys (no Evil) C-c C-c on a source block · execute; C-c C-v b · execute buffer
Doom alias C-c l ' · edit source block

Use the table as a list of rows and sum the first field of each row.

Complete Org source
#+NAME: measurements| 2 || 5 || 8 | #+BEGIN_SRC emacs-lisp :var data=measurements :results value(apply #'+ (mapcar #'car data))#+END_SRC
Evaluated Org buffer
#+NAME: measurements| 2 || 5 || 8 | #+BEGIN_SRC emacs-lisp :var data=measurements :results value(apply #'+ (mapcar #'car data))#+END_SRC #+RESULTS:: 15
Actual text captured from Emacs; syntax colours are applied by the guide.
:var data=measurementsResolve the named table and bind its data.
mapcar / carExtract the first item from each row.
applyCall addition with all extracted values.

Run Python with a value result

Keys (no Evil) C-c C-c on a source block · execute; C-c C-v b · execute buffer
Doom alias C-c l ' · edit source block

For a non-session Python value block, use an explicit return statement.

Complete Org source
#+BEGIN_SRC python :results valuereturn sum([2, 5, 8])#+END_SRC
Evaluated Org buffer
#+BEGIN_SRC python :results valuereturn sum([2, 5, 8])#+END_SRC #+RESULTS:: 15
Actual text captured from Emacs; syntax colours are applied by the guide.
pythonRequires a Python interpreter and ob-python.
returnReturns the value from Babel's generated function wrapper.

Export only the code

Keys (no Evil) C-c C-v b · execute buffer; C-c C-e h h · export HTML
Doom alias C-c l e h h · export HTML

Execute first, then export only the source. The result remains stored in the working Org buffer.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value :exports code(+ 2 3)#+END_SRC
HTML after evaluation
(+ 2 3)
Generated by native Org. The frame and typography belong to this guide.
:exports codeInclude source, omit the result in export.

Export only the result

Compare with ORG-11-010 · Export only the code
Keys (no Evil) C-c C-v b · execute buffer; C-c C-e h h · export HTML
Doom alias C-c l e h h · export HTML

Use the same computation but hide the source in the rendered document.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value :exports results(+ 2 3)#+END_SRC
HTML after evaluation
5
Generated by native Org. The frame and typography belong to this guide.
:exports resultsInclude the stored result, omit source.

Export code and result

Compare with ORG-11-011 · Export only the result
Keys (no Evil) C-c C-v b · execute buffer; C-c C-e h h · export HTML
Doom alias C-c l e h h · export HTML

Show both sides of the computation.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value :exports both(+ 2 3)#+END_SRC
HTML after evaluation
(+ 2 3)
5
Generated by native Org. The frame and typography belong to this guide.
:exports bothInclude source and result.

Append a new result

Keys (no Evil) C-c C-c on a source block · execute; C-c C-v b · execute buffer
Doom alias C-c l ' · edit source block

Keep the existing result and append the new one. Re-running this example starts from the same source each time.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value append(+ 2 3)#+END_SRC #+RESULTS:: 2
Evaluated Org buffer
#+BEGIN_SRC emacs-lisp :results value append(+ 2 3)#+END_SRC #+RESULTS:: 2: 5
Actual text captured from Emacs; syntax colours are applied by the guide.
:results appendAppend to the current result instead of replacing it.

Set defaults for a whole file

Keys (no Evil) C-c C-v b · execute buffer; C-c C-e h h · export HTML
Doom alias C-c l e h h · export HTML

Move shared header arguments to a language-specific property.

Complete Org source
#+PROPERTY: header-args:emacs-lisp :results value :exports both #+BEGIN_SRC emacs-lisp (+ 2 3)#+END_SRC
HTML after evaluation
(+ 2 3)
5
Generated by native Org. The frame and typography belong to this guide.
#+PROPERTY: header-args:emacs-lispDefault arguments for Emacs Lisp blocks in this file.
Local block argumentsMore specific block arguments override these defaults.

Create a plot from a named table

Keys (no Evil) C-c C-v b · execute buffer; C-c C-e h h · export HTML
Doom alias C-c l e h h · export HTML

Pass the table to gnuplot and insert a link to the generated SVG.

Complete Org source
#+NAME: readings| 1 | 2 || 2 | 5 || 3 | 3 | #+BEGIN_SRC gnuplot :var data=readings :file plot.svg :results file graphics :exports resultsset title "Three readings"set xlabel "Sample"set ylabel "Value"plot data using 1:2 with linespoints title "Reading"#+END_SRC
HTML after evaluation
1 2
2 5
3 3

plot.svg

Generated by native Org. The frame and typography belong to this guide.
:var data=readingsPass the named table to the gnuplot backend.
:file plot.svgOutput file, relative to this isolated example directory.
:results file graphicsInsert a file result recognized as graphics.

Change the plot style

Keys (no Evil) C-c C-v b · execute buffer; C-c C-e h h · export HTML
Doom alias C-c l e h h · export HTML

Change only linespoints to boxes. The Org data flow and output settings stay the same.

Complete Org source
#+NAME: readings| 1 | 2 || 2 | 5 || 3 | 3 | #+BEGIN_SRC gnuplot :var data=readings :file plot.svg :results file graphics :exports resultsset title "Three readings"set xlabel "Sample"set ylabel "Value"plot data using 1:2 with boxes title "Reading"#+END_SRC
HTML after evaluation
1 2
2 5
3 3

plot.svg

Generated by native Org. The frame and typography belong to this guide.
with boxesDraw a bar at each x value instead of connecting points.
ORG-12-000 · 8 examples

Text macros

Reusable text, arguments, metadata and computed replacements. Macro expansion is part of document export; a Babel call is a separate execution mechanism.

Official Org manual ↗

Expand a macro without arguments

Compare with ORG-13-001 · Define a text macro
Keys (no Evil) C-c C-e h h · export HTML (macros expand during export)
Doom alias C-c l e h h · export HTML

Define reusable wording once, then place it in prose. The source keeps the macro call; the exported sentence contains the replacement.

Complete Org source
#+MACRO: project Open LabThe {{{project}}} report is ready.
HTML export

The Open Lab report is ready.

Generated by native Org. The frame and typography belong to this guide.
#+MACRO:Define the name and replacement text.
{{{project}}}Call a text macro without parameters.

Pass one macro argument

Keys (no Evil) C-c C-e h h · export HTML (macros expand during export)
Doom alias C-c l e h h · export HTML

A placeholder inserts the supplied text. This example changes the reusable label without changing the surrounding sentence.

Complete Org source
#+MACRO: status Status: $1{{{status(ready)}}}.
HTML export

Status: ready.

Generated by native Org. The frame and typography belong to this guide.
$1First argument, passed as text.
{{{status(ready)}}}One argument in parentheses.

Pass two macro arguments

Keys (no Evil) C-c C-e h h · export HTML (macros expand during export)
Doom alias C-c l e h h · export HTML

Use separate placeholders for a value and its unit. The same definition produces both inline measurements.

Complete Org source
#+MACRO: quantity $1 $2Length: {{{quantity(12,cm)}}}.Time: {{{quantity(5,s)}}}.
HTML export

Length: 12 cm. Time: 5 s.

Generated by native Org. The frame and typography belong to this guide.
$1 / $2First / second argument.
,Separates macro arguments.

Keep a comma inside an argument

Keys (no Evil) C-c C-e h h · export HTML (macros expand during export)
Doom alias C-c l e h h · export HTML

Escape a comma that belongs to the text. Without that escape, Org would interpret it as an argument separator.

Complete Org source
#+MACRO: location $1 — $2{{{location(Aachen\, Germany,home)}}}
HTML export

Aachen, Germany — home

Generated by native Org. The frame and typography belong to this guide.
\,A literal comma inside one argument.
ExpansionThe first argument contains the complete location.

Return markup from a macro

Keys (no Evil) C-c C-e h h · export HTML (macros expand during export)
Doom alias C-c l e h h · export HTML

A macro can produce Org markup that is then rendered by the exporter. Both labels become emphasized text.

Complete Org source
#+MACRO: label *$1*{{{label(Ready)}}} for review. {{{label(Approved)}}} for publication.
HTML export

Ready for review.

Approved for publication.

Generated by native Org. The frame and typography belong to this guide.
*$1*Bold markup surrounds the argument.
Export orderMacro expansion happens before the resulting Org markup is rendered.

Compute a macro replacement

Keys (no Evil) C-c C-e h h · export HTML (macros expand during export)
Doom alias C-c l e h h · export HTML

An eval macro runs an Emacs Lisp expression while exporting. Its argument arrives as a string, so this expression converts it to a number first.

Complete Org source
#+MACRO: twice (eval (* 2 (string-to-number $1)))Twice seven is {{{twice(7)}}}.
HTML export

Twice seven is 14.

Generated by native Org. The frame and typography belong to this guide.
(eval ...)Compute the replacement during export.
string-to-numberConvert the textual argument before arithmetic.
Trusted sourceExporting this document evaluates the macro expression.

Reuse document metadata

Keys (no Evil) C-c C-e h h · export HTML (macros expand during export)
Doom alias C-c l e h h · export HTML

Built-in macros can read document keywords. Keep the title and author in metadata and reuse them in a sentence.

Complete Org source
#+TITLE: Small report#+AUTHOR: Alex ResearcherThis is {{{title}}}, prepared by {{{author}}}.
HTML export

This is Small report, prepared by Alex Researcher.

Generated by native Org. The frame and typography belong to this guide.
{{{title}}}Read the TITLE keyword.
{{{author}}}Read the AUTHOR keyword.

Load shared macro definitions

Keys (no Evil) C-c C-e h h · export HTML (macros expand during export)
Doom alias C-c l e h h · export HTML

A setup file can hold shared definitions. The companion file is bundled with this example and shown in the companion-inputs appendix.

Complete Org source
#+SETUPFILE: assets/macros.org{{{project}}}: {{{quantity(12,cm)}}}.
Companion input: assets/macros.org
HTML export

Open Lab: 12 cm.

Generated by native Org. The frame and typography belong to this guide.
#+SETUPFILE:Load document configuration, including macro definitions.
assets/macros.orgBundled source; changing it affects every document that loads it.
ORG-13-000 · 10 examples

Reuse and tangling

Reuse text, include files, expand named code and generate standalone scripts. These mechanisms solve different problems.

Official Org manual ↗

Define a text macro

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

An export macro replaces a marker with text.

Complete Org source
#+MACRO: project Signal studyWelcome to {{{project}}}.
HTML export

Welcome to Signal study.

Generated by native Org. The frame and typography belong to this guide.
#+MACRO: name textDefines an export-time text replacement.
{{{project}}}Calls the macro.

Pass a macro argument

Compare with ORG-13-001 · Define a text macro
Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

Use an argument to generate consistent labels.

Complete Org source
#+MACRO: sample Sample $1Compare {{{sample(A)}}} with {{{sample(B)}}}.
HTML export

Compare Sample A with Sample B.

Generated by native Org. The frame and typography belong to this guide.
$1First macro argument.
{{{sample(A)}}}Calls sample with argument A.

Include another Org file

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

Include reusable text from a companion file. The asset is supplied in the ZIP.

Complete Org source
* Study#+INCLUDE: "assets/methods.org"
HTML export

Study

Methods

Calibrate the sensor before collecting three readings.

Generated by native Org. The frame and typography belong to this guide.
#+INCLUDE:Expands another file during export.
Quoted pathRelative to this Org document.

Include a file as source code

Keys (no Evil) C-c C-e h h · export HTML (org-export-dispatch)
Doom alias C-c l e h h · export HTML

Display a file as code without evaluating it.

Complete Org source
#+INCLUDE: "assets/analyse.py" src python
HTML export
readings = [2, 5, 8]
print(sum(readings) / len(readings))
Generated by native Org. The frame and typography belong to this guide.
src pythonWrap included file content as a Python source block.

Tangle one Bash script

Keys (no Evil) C-c C-v t · org-babel-tangle; C-c ' · edit block
Doom alias C-c l ' · edit source block

Extract the code into hello.sh. Tangling writes source files; it does not run the extracted script.

Complete Org source
#+BEGIN_SRC bash :tangle hello.shprintf "hello\n"#+END_SRC
Tangled file(s)
FILE: hello.shprintf "hello\n"
Actual generated file contents. Tangling does not execute these scripts.
:tangle hello.shDestination filename.
C-c C-v tRun org-babel-tangle.

Add an executable shebang

Compare with ORG-13-005 · Tangle one Bash script
Keys (no Evil) C-c C-v t · org-babel-tangle; C-c ' · edit block
Doom alias C-c l ' · edit source block

Write a shebang before the extracted code. Org also makes a shebang-bearing tangled file executable.

Complete Org source
#+BEGIN_SRC bash :tangle hello.sh :shebang "#!/usr/bin/env bash"printf "hello\n"#+END_SRC
Tangled file(s)
FILE: hello.sh#!/usr/bin/env bashprintf "hello\n"
Actual generated file contents. Tangling does not execute these scripts.
:shebangFirst line identifying the interpreter.

Combine blocks into one file

Keys (no Evil) C-c C-v t · org-babel-tangle; C-c ' · edit block
Doom alias C-c l ' · edit source block

Blocks targeting the same file are concatenated in document order.

Complete Org source
#+BEGIN_SRC bash :tangle run.shprintf "first\n"#+END_SRC #+BEGIN_SRC bash :tangle run.shprintf "second\n"#+END_SRC
Tangled file(s)
FILE: run.shprintf "first\n" printf "second\n"
Actual generated file contents. Tangling does not execute these scripts.
Repeated :tangle targetBoth block bodies contribute to run.sh.

Expand a named code fragment

Keys (no Evil) C-c C-v t · org-babel-tangle; C-c ' · edit block
Doom alias C-c l ' · edit source block

Insert the named fragment into the tangled script.

Complete Org source
#+NAME: greeting#+BEGIN_SRC bash :tangle noprintf "hello\n"#+END_SRC #+BEGIN_SRC bash :tangle run.sh :noweb yes<<greeting>>printf "done\n"#+END_SRC
Tangled file(s)
FILE: run.shprintf "hello\n"printf "done\n"
Actual generated file contents. Tangling does not execute these scripts.
#+NAME: greetingNames a reusable block.
<<greeting>>Noweb reference to that block.
:noweb yesExpand references during evaluation and tangling.
:tangle noDo not write this fragment to a separate file.

Expand Noweb only when tangling

Keys (no Evil) C-c C-v t · org-babel-tangle; C-c ' · edit block
Doom alias C-c l ' · edit source block

Generate the same script while restricting expansion to tangling.

Complete Org source
#+NAME: greeting#+BEGIN_SRC bash :tangle noprintf "hello\n"#+END_SRC #+BEGIN_SRC bash :tangle run.sh :noweb tangle<<greeting>>printf "done\n"#+END_SRC
Tangled file(s)
FILE: run.shprintf "hello\n"printf "done\n"
Actual generated file contents. Tangling does not execute these scripts.
:noweb tangleExpand for tangling only; leave the source reference visible during export.

Tangle to two destinations

Keys (no Evil) C-c C-v t · org-babel-tangle; C-c ' · edit block
Doom alias C-c l ' · edit source block

One Org document can produce scripts in multiple languages and files.

Complete Org source
#+BEGIN_SRC bash :tangle analyse.shprintf "analysis\n"#+END_SRC #+BEGIN_SRC python :tangle analyse.pyprint(sum([2, 5, 8]))#+END_SRC
Tangled file(s)
FILE: analyse.pyprint(sum([2, 5, 8])) FILE: analyse.shprintf "analysis\n"
Actual generated file contents. Tangling does not execute these scripts.
Distinct :tangle targetsEach target collects only the blocks assigned to it.
ORG-14-000 · 18 examples

Functions and inline calls

Call named Babel blocks without arguments, override defaults, pass data and compute values inside prose. Each action evaluates the indicated call or block in isolation.

Official Org manual ↗

Call a block without parameters

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

A named block behaves like a callable unit. Evaluate the CALL line to insert its result beneath that line; the block definition is left intact.

Complete Org source
#+NAME: greeting#+BEGIN_SRC emacs-lisp :results value"Hello from Org"#+END_SRC #+CALL: greeting()
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: #+CALL: greeting()
Editor buffer
#+NAME: greeting#+BEGIN_SRC emacs-lisp :results value"Hello from Org"#+END_SRC #+CALL: greeting() #+RESULTS:: Hello from Org
Actual text captured from Emacs; syntax colours are applied by the guide.
#+NAME: greetingGive the code block a unique name.
greeting()The empty argument list is still written with parentheses.

Call a function with a default input

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

The function declares a default input. Calling it without arguments uses that value.

Complete Org source
#+NAME: double#+BEGIN_SRC emacs-lisp :var n=3 :results value(* 2 n)#+END_SRC #+CALL: double()
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: #+CALL: double()
Editor buffer
#+NAME: double#+BEGIN_SRC emacs-lisp :var n=3 :results value(* 2 n)#+END_SRC #+CALL: double() #+RESULTS:: 6
Actual text captured from Emacs; syntax colours are applied by the guide.
:var n=3Default argument declared on the block.
double()Use the default n=3.

Override one function parameter

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Override the default at the call site. The function body and default remain unchanged.

Complete Org source
#+NAME: double#+BEGIN_SRC emacs-lisp :var n=3 :results value(* 2 n)#+END_SRC #+CALL: double(n=7)
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: #+CALL: double(n=7)
Editor buffer
#+NAME: double#+BEGIN_SRC emacs-lisp :var n=3 :results value(* 2 n)#+END_SRC #+CALL: double(n=7) #+RESULTS:: 14
Actual text captured from Emacs; syntax colours are applied by the guide.
n=7Named argument passed by this call.
Argument syntaxUse n=7 inside parentheses, not :var n=7.

Pass two named parameters

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Both parameters are explicit at the call site. Their names connect the inputs to the variables used by the block.

Complete Org source
#+NAME: scale#+BEGIN_SRC emacs-lisp :var x=3 factor=2 :results value(* x factor)#+END_SRC #+CALL: scale(x=7,factor=4)
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: #+CALL: scale(x=7,factor=4)
Editor buffer
#+NAME: scale#+BEGIN_SRC emacs-lisp :var x=3 factor=2 :results value(* x factor)#+END_SRC #+CALL: scale(x=7,factor=4) #+RESULTS:: 28
Actual text captured from Emacs; syntax colours are applied by the guide.
:var x=3 factor=2Declare two default inputs.
x=7,factor=4Override both arguments; commas separate them.

Keep an omitted parameter at its default

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Override only x. The omitted factor keeps its default value of 2.

Complete Org source
#+NAME: scale#+BEGIN_SRC emacs-lisp :var x=3 factor=2 :results value(* x factor)#+END_SRC #+CALL: scale(x=7)
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: #+CALL: scale(x=7)
Editor buffer
#+NAME: scale#+BEGIN_SRC emacs-lisp :var x=3 factor=2 :results value(* x factor)#+END_SRC #+CALL: scale(x=7) #+RESULTS:: 14
Actual text captured from Emacs; syntax colours are applied by the guide.
Partial overrideExplicit arguments replace defaults individually.

Pass a string to a function

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Quote a string parameter at the call site. Numeric parameters do not need those quotes.

Complete Org source
#+NAME: greet#+BEGIN_SRC emacs-lisp :var name="reader" :results value(concat "Hello, " name "!")#+END_SRC #+CALL: greet(name="Ada")
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: #+CALL: greet(name="Ada")
Editor buffer
#+NAME: greet#+BEGIN_SRC emacs-lisp :var name="reader" :results value(concat "Hello, " name "!")#+END_SRC #+CALL: greet(name="Ada") #+RESULTS:: Hello, Ada!
Actual text captured from Emacs; syntax colours are applied by the guide.
name="Ada"A string argument.
concatCombine the greeting and name.

Pass a named table to a function

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

The call supplies a table as a list of rows. This example adds the first cell of each row.

Complete Org source
#+NAME: readings| 2 || 5 || 8 | #+NAME: total#+BEGIN_SRC emacs-lisp :var data=readings :results value(apply #'+ (mapcar #'car data))#+END_SRC #+CALL: total(data=readings)
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: #+CALL:
Editor buffer
#+NAME: readings| 2 || 5 || 8 | #+NAME: total#+BEGIN_SRC emacs-lisp :var data=readings :results value(apply #'+ (mapcar #'car data))#+END_SRC #+CALL: total(data=readings) #+RESULTS:: 15
Actual text captured from Emacs; syntax colours are applied by the guide.
data=readingsResolve the named table and pass its values.
mapcar / carSelect the first cell from each row.

Collect a function return value

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

The block prints one string and returns another. Value collection keeps the returned value.

Complete Org source
#+NAME: demo#+BEGIN_SRC emacs-lisp :results value(princ "printed")"returned"#+END_SRC #+CALL: demo()
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: #+CALL: demo()
Editor buffer
#+NAME: demo#+BEGIN_SRC emacs-lisp :results value(princ "printed")"returned"#+END_SRC #+CALL: demo() #+RESULTS:: returned
Actual text captured from Emacs; syntax colours are applied by the guide.
:results valueCollect the final Lisp value.
princProduces printed output, which is not the chosen result here.

Override how the function collects results

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Move a collection override inside the brackets before the argument list. The result now comes from printed output.

Complete Org source
#+NAME: demo#+BEGIN_SRC emacs-lisp :results value(princ "printed")"returned"#+END_SRC #+CALL: demo[:results output]()
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: #+CALL: demo[:results output]()
Editor buffer
#+NAME: demo#+BEGIN_SRC emacs-lisp :results value(princ "printed")"returned"#+END_SRC #+CALL: demo[:results output]() #+RESULTS:: printed
Actual text captured from Emacs; syntax colours are applied by the guide.
[:results output]Inside headers alter execution of the called block.
()The function still takes no arguments.

Format a call result as a table

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

End headers describe how the returned value is inserted at the call site. This list of rows becomes an Org table.

Complete Org source
#+NAME: items#+BEGIN_SRC emacs-lisp :results value'(("Ada" 3) ("Bea" 5))#+END_SRC #+CALL: items() :results value table
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: #+CALL: items() :results value table
Editor buffer
#+NAME: items#+BEGIN_SRC emacs-lisp :results value'(("Ada" 3) ("Bea" 5))#+END_SRC #+CALL: items() :results value table #+RESULTS:| Ada | 3 || Bea | 5 |
Actual text captured from Emacs; syntax colours are applied by the guide.
After ()End headers apply to the result at the call site.
:results value tableInsert the returned rows as an Org table.

Call a function inline without parameters

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

An inline call evaluates the same kind of named block inside a sentence. The inserted results macro records the value in the Org buffer.

Complete Org source
#+NAME: greeting#+BEGIN_SRC emacs-lisp :results value :exports none"Hello from Org"#+END_SRC Message: call_greeting().
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: call_greeting
Editor buffer
#+NAME: greeting#+BEGIN_SRC emacs-lisp :results value :exports none"Hello from Org"#+END_SRC Message: call_greeting() {{{results(=Hello from Org=)}}}.
Actual text captured from Emacs; syntax colours are applied by the guide.
call_greeting()Inline call syntax: no #+CALL keyword.
{{{results(...)}}}The stored inline result, produced by Babel.

Pass a parameter in an inline call

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Pass a parameter from prose. The function is evaluated at the inline call position.

Complete Org source
#+NAME: double#+BEGIN_SRC emacs-lisp :var n=3 :results value :exports none(* 2 n)#+END_SRC The result is call_double(n=7).
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: call_double
Editor buffer
#+NAME: double#+BEGIN_SRC emacs-lisp :var n=3 :results value :exports none(* 2 n)#+END_SRC The result is call_double(n=7) {{{results(=14=)}}}.
Actual text captured from Emacs; syntax colours are applied by the guide.
call_double(n=7)Inline call with a named argument.
:exports noneHide the function definition in document export.

Export prose containing an inline result

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Evaluate the inline call, then export the document. The stored result appears in the sentence; the hidden function definition does not.

Complete Org source
#+NAME: double#+BEGIN_SRC emacs-lisp :var n=3 :results value :exports none(* 2 n)#+END_SRC The result is call_double(n=7).
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: call_double
HTML after command

The result is 14.

Generated by native Org. The frame and typography belong to this guide.
Evaluation firstC-c C-c on the inline call stores the result.
Export secondC-c C-e h h publishes the sentence.

Evaluate code directly inside a sentence

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Inline source syntax contains code itself. Inline call syntax instead refers to a separately named block.

Complete Org source
The mean is src_emacs-lisp{(/ (+ 2 5 8) 3.0)}.
Action
C-c C-c · org-babel-execute-src-block
(org-babel-execute-src-block)
Cursor at the beginning of: src_emacs-lisp
HTML after command

The mean is 5.0.

Generated by native Org. The frame and typography belong to this guide.
src_emacs-lisp{...}An inline source block with a Lisp expression.
call_name(...)Use this when calling a named block instead.

Call a function from another Org file

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

The file path and block name identify the function. The companion file is included in the ZIP and in the HTML companion-inputs section.

Complete Org source
#+CALL: assets/functions.org:scale(x=7,factor=4)
Companion input: assets/functions.org
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: #+CALL:
Editor buffer
#+CALL: assets/functions.org:scale(x=7,factor=4) #+RESULTS:: 28
Actual text captured from Emacs; syntax colours are applied by the guide.
file.org:name(...)Call a named block in another file.
assets/functions.orgContains the scale block with x and factor parameters.

Feed one function result into another

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

A header argument can call a named block to obtain its input. This evaluates the dependency before the consumer block.

Complete Org source
#+NAME: double#+BEGIN_SRC emacs-lisp :var n=3 :results value(* 2 n)#+END_SRC #+BEGIN_SRC emacs-lisp :var x=double(n=7) :results value(+ x 1)#+END_SRC
Action
C-c C-c · org-babel-execute-src-block
(org-babel-execute-src-block)
Cursor at the beginning of: #+BEGIN_SRC emacs-lisp :var x=
Editor buffer
#+NAME: double#+BEGIN_SRC emacs-lisp :var n=3 :results value(* 2 n)#+END_SRC #+BEGIN_SRC emacs-lisp :var x=double(n=7) :results value(+ x 1)#+END_SRC #+RESULTS:: 15
Actual text captured from Emacs; syntax colours are applied by the guide.
:var x=double(n=7)Run double with n=7; bind its result to x.
Consumer result14 + 1 = 15.

Export an inline result as plain text

Keys (no Evil) C-c C-c at inline call · evaluate; C-c C-e h h · export
Doom alias C-c l e h h · export HTML

End headers on an inline call can change its result format. Raw output removes the default verbatim styling from this number.

Complete Org source
#+NAME: double#+BEGIN_SRC emacs-lisp :var n=3 :results value :exports none(* 2 n)#+END_SRC The result is call_double(n=7)[:results raw].
Action
C-c C-c · org-babel-lob-execute-maybe
(org-babel-lob-execute-maybe)
Cursor at the beginning of: call_double
HTML after command

The result is 14.

Generated by native Org. The frame and typography belong to this guide.
[:results raw] after ()Inline end headers format the returned result.
Plain textThe number uses the surrounding paragraph style.

Ingest a reusable function library

Keys (no Evil) C-c C-v i · ingest assets/functions.org; C-c C-c on CALL · evaluate
Doom alias C-c l ' · edit source blocks

Ingest the companion file into the Library of Babel, then call its block by name. This registration belongs to the Emacs session; another session must ingest the file again.

Complete Org source
# First ingest assets/functions.org with C-c C-v i.#+CALL: scale(x=7,factor=4)
Companion input: assets/functions.org
Action
C-c C-v i · org-babel-lob-ingest; then C-c C-c on CALL
(let ((org-babel-library-of-babel nil)) (org-babel-lob-ingest "assets/functions.org") (org-babel-lob-execute-maybe))
Cursor at the beginning of: #+CALL:
Editor buffer
# First ingest assets/functions.org with C-c C-v i.#+CALL: scale(x=7,factor=4) #+RESULTS:: 28
Actual text captured from Emacs; syntax colours are applied by the guide.
org-babel-lob-ingestRead named code blocks into the session's Library of Babel.
Local let bindingIsolate this demonstration from other examples in the build.
ORG-15-000 · 14 examples

Result formats and files

Choose how to collect a result, represent it and insert it. A return value, printed output, result format and export policy answer different questions.

Official Org manual ↗

Return a plain scalar

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Start with one returned value. Babel records it as a fixed-width result line.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value(+ 2 5)#+END_SRC
Evaluated Org buffer
#+BEGIN_SRC emacs-lisp :results value(+ 2 5)#+END_SRC #+RESULTS:: 7
Actual text captured from Emacs; syntax colours are applied by the guide.
:results valueCollect the returned value.
: 7Org fixed-width text representation.

Preserve a string literally

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Verbatim collection keeps the asterisks as text. They do not become bold markup in this exported result.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value verbatim :exports results"*Ready*"#+END_SRC
HTML after evaluation
"*Ready*"
Generated by native Org. The frame and typography belong to this guide.
verbatimKeep the result literal.
:exports resultsPublish the result without the source block.

Render the same string as Org markup

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Changing verbatim to raw makes the result ordinary Org content. The same asterisks now mark bold text.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value raw :exports results"*Ready*"#+END_SRC
HTML after evaluation

Ready

Generated by native Org. The frame and typography belong to this guide.
rawInsert the returned string as Org markup.

Return a table

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

A nested list gives Org rows and columns. The stored table remains editable like any other Org table.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value table'(("Ada" 3) ("Bea" 5))#+END_SRC
Evaluated Org buffer
#+BEGIN_SRC emacs-lisp :results value table'(("Ada" 3) ("Bea" 5))#+END_SRC #+RESULTS:| Ada | 3 || Bea | 5 |
Actual text captured from Emacs; syntax colours are applied by the guide.
Outer listTable rows.
Inner listCells in one row.

Return a bullet list

Compare with ORG-15-004 · Return a table
Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

A flat list can be inserted as ordinary Org list items.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value list'("Collect" "Check" "Publish")#+END_SRC
Evaluated Org buffer
#+BEGIN_SRC emacs-lisp :results value list'("Collect" "Check" "Publish")#+END_SRC #+RESULTS:- Collect- Check- Publish
Actual text captured from Emacs; syntax colours are applied by the guide.
:results listOne list item for each returned element.

Wrap output in a results drawer

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

A drawer makes multiline output collapsible. The result remains visible here as actual buffer text.

Complete Org source
#+BEGIN_SRC emacs-lisp :results output drawer(princ "first line\nsecond line")#+END_SRC
Evaluated Org buffer
#+BEGIN_SRC emacs-lisp :results output drawer(princ "first line\nsecond line")#+END_SRC #+RESULTS::results:first linesecond line:end:
Actual text captured from Emacs; syntax colours are applied by the guide.
drawerWrap inserted text in a RESULTS drawer.
TAB at drawerCollapse or expand it in the editor.

Return HTML markup

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

The html format inserts an HTML export block. This preview comes from the native HTML exporter.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value html :exports results"<p><strong>Ready</strong> for review.</p>"#+END_SRC
HTML after evaluation

Ready for review.

Generated by native Org. The frame and typography belong to this guide.
htmlWrap the result in #+BEGIN_EXPORT html.
Backend-specificThis markup targets HTML output.
ORG-15-008 / Result formats and filesNative PDF after evaluation

Return LaTeX markup

Keys (no Evil) C-c C-c · evaluate block; C-c C-e l p · export PDF
Doom alias C-c l ' · edit source; C-c l e · export menu

Use latex for content intended for the LaTeX exporter. The preview shows the compiled PDF.

Complete Org source
#+LATEX_HEADER: \usepackage[a6paper,landscape,margin=12mm]{geometry}#+BEGIN_SRC emacs-lisp :results value latex :exports results"\\textbf{Ready} for review."#+END_SRC
Native PDF after evaluation
Native PDF page 1
Page 1
Actual native Org → LaTeX → pdfLaTeX output; preview scaled to fit.
latexWrap the result in #+BEGIN_EXPORT latex.
Native PDFThe build exports LaTeX and runs pdfLaTeX.

Write a text file as the result

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

With file results, Babel writes the returned text to the named file and inserts a link. The build checks the file contents as well.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value file :file message.txt :file-desc "Download message""Ready for review."#+END_SRC
Evaluated Org buffer
#+BEGIN_SRC emacs-lisp :results value file :file message.txt :file-desc "Download message""Ready for review."#+END_SRC #+RESULTS:[[file:message.txt][Download message]]
Actual text captured from Emacs; syntax colours are applied by the guide.
:file message.txtOutput path relative to this example.
:file-descReadable text for the inserted link.

Export a downloadable file link

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Keep the same file result and export it. In the self-contained HTML guide, the download embeds the generated file.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value file :file message.txt :file-desc "Download message" :exports results"Ready for review."#+END_SRC
HTML after evaluation
Generated by native Org. The frame and typography belong to this guide.
:exports resultsThe exported content is the download link.
Generated fileContains the exact text returned by the block.

Replace an earlier result

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Replace is the default insertion policy. The new result takes the place of the stored old one.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value replace"new"#+END_SRC #+RESULTS:: old
Evaluated Org buffer
#+BEGIN_SRC emacs-lisp :results value replace"new"#+END_SRC #+RESULTS:: new
Actual text captured from Emacs; syntax colours are applied by the guide.
replaceKeep only the latest inserted result.

Append to earlier results

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Change only the insertion policy. The old result is retained and the new result is added below it.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value append"new"#+END_SRC #+RESULTS:: old
Evaluated Org buffer
#+BEGIN_SRC emacs-lisp :results value append"new"#+END_SRC #+RESULTS:: old: new
Actual text captured from Emacs; syntax colours are applied by the guide.
appendKeep history with the newest result at the bottom.

Prepend to earlier results

Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Prepend preserves the old result but places the newest result above it.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value prepend"new"#+END_SRC #+RESULTS:: old
Evaluated Org buffer
#+BEGIN_SRC emacs-lisp :results value prepend"new"#+END_SRC #+RESULTS:: new: old
Actual text captured from Emacs; syntax colours are applied by the guide.
prependKeep history with the newest result at the top.

Evaluate without inserting a result

Compare with ORG-15-001 · Return a plain scalar
Keys (no Evil) C-c C-c at the indicated call/block · evaluate; C-c ' · edit source
Doom alias C-c l ' · edit source; C-c l e · export menu

Silent execution leaves the Org buffer unchanged. Emacs reports the result in its echo area; this panel deliberately shows the unchanged buffer.

Complete Org source
#+BEGIN_SRC emacs-lisp :results value silent(+ 2 5)#+END_SRC
Evaluated Org buffer
#+BEGIN_SRC emacs-lisp :results value silent(+ 2 5)#+END_SRC
Actual text captured from Emacs; syntax colours are applied by the guide.
silentReturn the value without inserting #+RESULTS.
Editor viewNo result line is added below the block.
ORG-16-000 · 12 examples

Citations and publications

Publication keys, in-text citations and printed bibliographies. The executed examples use Org-cite with its built-in basic processor and a bundled bibliography. The citation setup reference explains Citar, CSL and BibLaTeX.

Official Org manual ↗

Cite a publication and print its reference

Keys (no Evil) C-c C-x @ · insert citation; C-c C-e h h · export HTML
Doom alias C-c l @ · insert citation; C-c l e · export menu

The citation key resolves to a record in the bundled bibliography. The citation and the printed reference are separate elements.

Complete Org source
#+BIBLIOGRAPHY: assets/references.bib#+CITE_EXPORT: basic author-year Literate programming [cite:@knuth1984] joins explanation and code. #+PRINT_BIBLIOGRAPHY:
Companion input: assets/references.bib
HTML export

Literate programming (Knuth, Donald E., 1984) joins explanation and code.

Knuth, Donald E. (1984). Literate Programming, The Computer Journal.

Generated by native Org. The frame and typography belong to this guide.
@knuth1984Key in assets/references.bib.
#+BIBLIOGRAPHY:Bibliographic input file.
#+PRINT_BIBLIOGRAPHY:Print the cited references here.

Cite two publications together

Keys (no Evil) C-c C-x @ · insert citation; C-c C-e h h · export HTML
Doom alias C-c l @ · insert citation; C-c l e · export menu

Semicolons separate keys inside one citation group. Both cited publications appear in the reference list.

Complete Org source
#+BIBLIOGRAPHY: assets/references.bib#+CITE_EXPORT: basic author-year Related approaches [cite:@knuth1984;@schulte2012] support this report. #+PRINT_BIBLIOGRAPHY:
Companion input: assets/references.bib
HTML export

Related approaches (Knuth, Donald E., 1984, Schulte, Eric and Davison, Dan and Dye, Thomas and Dominik, Carsten, 2012) support this report.

Knuth, Donald E. (1984). Literate Programming, The Computer Journal.

Schulte, Eric and Davison, Dan and Dye, Thomas and Dominik, Carsten (2012). A Multi-Language Computing Environment for Literate Programming and Reproducible Research, Journal of Statistical Software.

Generated by native Org. The frame and typography belong to this guide.
;Separate reference keys within one citation.

Make the author part of the sentence

Keys (no Evil) C-c C-x @ · insert citation; C-c C-e h h · export HTML
Doom alias C-c l @ · insert citation; C-c l e · export menu

The text style makes the citation fit a narrative sentence.

Complete Org source
#+BIBLIOGRAPHY: assets/references.bib#+CITE_EXPORT: basic author-year [cite/text:@knuth1984] introduced literate programming. #+PRINT_BIBLIOGRAPHY:
Companion input: assets/references.bib
HTML export

Knuth, Donald E. (1984) introduced literate programming.

Knuth, Donald E. (1984). Literate Programming, The Computer Journal.

Generated by native Org. The frame and typography belong to this guide.
/textNarrative citation style.
Same keyFormatting changes while the bibliographic record stays the same.

Show author and year separately

Keys (no Evil) C-c C-x @ · insert citation; C-c C-e h h · export HTML
Doom alias C-c l @ · insert citation; C-c l e · export menu

Author-only and noauthor styles expose different parts of the same reference.

Complete Org source
#+BIBLIOGRAPHY: assets/references.bib#+CITE_EXPORT: basic author-year Author: [cite/author:@knuth1984] Year: [cite/noauthor:@knuth1984]. #+PRINT_BIBLIOGRAPHY:
Companion input: assets/references.bib
HTML export

Author: Knuth, Donald E.

Year: (1984).

Knuth, Donald E. (1984). Literate Programming, The Computer Journal.

Generated by native Org. The frame and typography belong to this guide.
/authorAuthor-only citation.
/noauthorOmit the author from the citation, leaving the year here.

Add a prefix and page locator

Keys (no Evil) C-c C-x @ · insert citation; C-c C-e h h · export HTML
Doom alias C-c l @ · insert citation; C-c l e · export menu

Text before and after a key supplies context for that reference. The page locator points into the cited publication.

Complete Org source
#+BIBLIOGRAPHY: assets/references.bib#+CITE_EXPORT: basic author-year Background [cite:see @knuth1984 p. 97]. #+PRINT_BIBLIOGRAPHY:
Companion input: assets/references.bib
HTML export

Background (see Knuth, Donald E., 1984 p. 97).

Knuth, Donald E. (1984). Literate Programming, The Computer Journal.

Generated by native Org. The frame and typography belong to this guide.
seePrefix attached to this reference.
p. 97Suffix giving a page locator.

Add context around a citation group

Keys (no Evil) C-c C-x @ · insert citation; C-c C-e h h · export HTML
Doom alias C-c l @ · insert citation; C-c l e · export menu

The text before the first semicolon and after the last semicolon belongs to the whole citation.

Complete Org source
#+BIBLIOGRAPHY: assets/references.bib#+CITE_EXPORT: basic author-year Background [cite:compare ;@knuth1984;@schulte2012; for two approaches]. #+PRINT_BIBLIOGRAPHY:
Companion input: assets/references.bib
HTML export

Background (compare Knuth, Donald E., 1984, Schulte, Eric and Davison, Dan and Dye, Thomas and Dominik, Carsten, 2012 for two approaches).

Knuth, Donald E. (1984). Literate Programming, The Computer Journal.

Schulte, Eric and Davison, Dan and Dye, Thomas and Dominik, Carsten (2012). A Multi-Language Computing Environment for Literate Programming and Reproducible Research, Journal of Statistical Software.

Generated by native Org. The frame and typography belong to this guide.
Group prefix / suffixPlaced outside the individual reference entries.
SemicolonsSeparate affixes and reference items.

Switch to numeric references

Keys (no Evil) C-c C-x @ · insert citation; C-c C-e h h · export HTML
Doom alias C-c l @ · insert citation; C-c l e · export menu

Change the processor options while keeping the same two publications. Numeric citation markers correspond to numbered bibliography entries.

Complete Org source
#+BIBLIOGRAPHY: assets/references.bib#+CITE_EXPORT: basic numeric numeric Related approaches [cite:@knuth1984;@schulte2012] support this report. #+PRINT_BIBLIOGRAPHY:
Companion input: assets/references.bib
HTML export

Related approaches (1, 2) support this report.

[1] Knuth, Donald E., Literate Programming, The Computer Journal, 1984.

[2] Schulte, Eric and Davison, Dan and Dye, Thomas and Dominik, Carsten, A Multi-Language Computing Environment for Literate Programming and Reproducible Research, Journal of Statistical Software, 2012.

Generated by native Org. The frame and typography belong to this guide.
basic numeric numericNumeric bibliography labels and default numeric citation style.
basicBuilt-in processor; no CSL or BibTeX installation needed.

Include an uncited publication

Keys (no Evil) C-c C-x @ · insert citation; C-c C-e h h · export HTML
Doom alias C-c l @ · insert citation; C-c l e · export menu

Nocite includes a reference in the bibliography without printing a normal citation at that position.

Complete Org source
#+BIBLIOGRAPHY: assets/references.bib#+CITE_EXPORT: basic author-year The Org workflow is described in [cite:@schulte2012]. [cite/nocite:@knuth1984] #+PRINT_BIBLIOGRAPHY:
Companion input: assets/references.bib
HTML export

The Org workflow is described in (Schulte, Eric and Davison, Dan and Dye, Thomas and Dominik, Carsten, 2012).

Knuth, Donald E. (1984). Literate Programming, The Computer Journal.

Schulte, Eric and Davison, Dan and Dye, Thomas and Dominik, Carsten (2012). A Multi-Language Computing Environment for Literate Programming and Reproducible Research, Journal of Statistical Software.

Generated by native Org. The frame and typography belong to this guide.
/nociteInclude the keyed record without a visible citation marker.
Reference listContains both the cited and the additional publication.

Put a citation in a footnote

Keys (no Evil) C-c C-x @ · insert citation; C-c C-e h h · export HTML
Doom alias C-c l @ · insert citation; C-c l e · export menu

The note style moves the citation into a footnote. The bibliography still lists the publication.

Complete Org source
#+BIBLIOGRAPHY: assets/references.bib#+CITE_EXPORT: basic author-year This report follows a literate approach[cite/note:@knuth1984]. #+PRINT_BIBLIOGRAPHY:
Companion input: assets/references.bib
HTML export

This report follows a literate approach.1

Knuth, Donald E. (1984). Literate Programming, The Computer Journal.

Footnotes:

1

Knuth, Donald E. (1984)

Generated by native Org. The frame and typography belong to this guide.
/noteFootnote citation with the basic processor.
BibliographyIndependent of the citation position.

Export author–year references to PDF

Keys (no Evil) C-c C-x @ · insert citation; C-c C-e l p · export PDF
Doom alias C-c l @ · insert citation; C-c l e · export menu

The same basic processor also supports LaTeX output. Add a heading explicitly, because basic does not supply the bibliography heading.

Complete Org source
#+LATEX_HEADER: \usepackage[a6paper,landscape,margin=12mm]{geometry}#+BIBLIOGRAPHY: assets/references.bib#+CITE_EXPORT: basic author-year Literate programming [cite:@knuth1984] joins explanation and code. * References#+PRINT_BIBLIOGRAPHY:
Companion input: assets/references.bib
Native PDF export
Native PDF page 1
Page 1
Actual native Org → LaTeX → pdfLaTeX output; preview scaled to fit.
basicProduces the reference text directly for LaTeX.
No biber stepThis example compiles with pdfLaTeX alone.

Export numeric references to PDF

Keys (no Evil) C-c C-x @ · insert citation; C-c C-e l p · export PDF
Doom alias C-c l @ · insert citation; C-c l e · export menu

Only the citation configuration changes from the preceding PDF example.

Complete Org source
#+LATEX_HEADER: \usepackage[a6paper,landscape,margin=12mm]{geometry}#+BIBLIOGRAPHY: assets/references.bib#+CITE_EXPORT: basic numeric numeric Literate programming [cite:@knuth1984] joins explanation and code. * References#+PRINT_BIBLIOGRAPHY:
Companion input: assets/references.bib
Native PDF export
Native PDF page 1
Page 1
Actual native Org → LaTeX → pdfLaTeX output; preview scaled to fit.
Numeric modeChanges citation markers and bibliography labels together.

Inspect the publication metadata

Keys (no Evil) C-x C-f · open assets/references.bib; C-c C-e h h · export
Doom alias C-c l @ · select a publication in the Org document

The companion file contains two real journal articles. Stable citation keys connect the Org text to these records; a DOI identifies the publication itself.

Complete Org source
#+INCLUDE: "assets/references.bib" src bibtex
Companion input: assets/references.bib
HTML export
@article{knuth1984,
  author = {Knuth, Donald E.},
  title = {Literate Programming},
  journal = {The Computer Journal},
  year = {1984}, volume = {27}, number = {2},
  pages = {97--111},
  doi = {10.1093/comjnl/27.2.97}
}

@article{schulte2012,
  author = {Schulte, Eric and Davison, Dan and Dye, Thomas and Dominik, Carsten},
  title = {A Multi-Language Computing Environment for Literate Programming and Reproducible Research},
  journal = {Journal of Statistical Software},
  year = {2012}, volume = {46}, number = {3},
  pages = {1--24},
  doi = {10.18637/jss.v046.i03}
}
Generated by native Org. The frame and typography belong to this guide.
Citation keyLocal identifier, such as knuth1984; keep it stable.
DOIPersistent publication identifier; different from an Org CUSTOM_ID.
Metadata sourcesPublisher pages for the two article DOIs.
ORG-17-000 · 4 examples

A small reproducible report

Combine familiar pieces into a report. These integration examples deliberately change more than one detail.

Official Org manual ↗

Build the report with visible analysis

Keys (no Evil) C-c C-v b · execute buffer; C-c C-e h h · export HTML
Doom alias C-c l e h h · export HTML

Keep the question, input data, executable analysis and interpretation together.

Complete Org source
#+TITLE: Three readings#+OPTIONS: toc:nil num:nil* QuestionHow large is the average reading?* Data#+NAME: observations| 2 || 5 || 8 |* Analysis#+BEGIN_SRC emacs-lisp :var data=observations :results value :exports both(/ (apply #'+ (mapcar #'car data)) (float (length data)))#+END_SRC* InterpretationThe arithmetic mean summarizes these three illustrative readings.
HTML after evaluation

Question

How large is the average reading?

Data

2
5
8

Analysis

(/ (apply #'+ (mapcar #'car data)) (float (length data)))
5.0

Interpretation

The arithmetic mean summarizes these three illustrative readings.

Generated by native Org. The frame and typography belong to this guide.
:exports bothMake the computation visible to readers.
floatForce floating-point division.
lengthCount observations.

Publish a result-focused edition

Keys (no Evil) C-c C-v b · execute buffer; C-c C-e h h · export HTML
Doom alias C-c l e h h · export HTML

Change only the export policy. The calculation stays in the Org source.

Complete Org source
#+TITLE: Three readings#+OPTIONS: toc:nil num:nil* QuestionHow large is the average reading?* Data#+NAME: observations| 2 || 5 || 8 |* Analysis#+BEGIN_SRC emacs-lisp :var data=observations :results value :exports results(/ (apply #'+ (mapcar #'car data)) (float (length data)))#+END_SRC* InterpretationThe arithmetic mean summarizes these three illustrative readings.
HTML after evaluation

Question

How large is the average reading?

Data

2
5
8

Analysis

5.0

Interpretation

The arithmetic mean summarizes these three illustrative readings.

Generated by native Org. The frame and typography belong to this guide.
:exports resultsHide the implementation in the published edition.

Change the data and rebuild

Keys (no Evil) C-c C-v b · execute buffer; C-c C-e h h · export HTML
Doom alias C-c l e h h · export HTML

Change the last observation from 8 to 11 and re-run the calculation. The mean changes to 6.0.

Complete Org source
#+TITLE: Three readings#+OPTIONS: toc:nil num:nil* QuestionHow large is the average reading?* Data#+NAME: observations| 2 || 5 || 11 |* Analysis#+BEGIN_SRC emacs-lisp :var data=observations :results value :exports both(/ (apply #'+ (mapcar #'car data)) (float (length data)))#+END_SRC* InterpretationThe arithmetic mean summarizes these three illustrative readings.
HTML after evaluation

Question

How large is the average reading?

Data

2
5
11

Analysis

(/ (apply #'+ (mapcar #'car data)) (float (length data)))
6.0

Interpretation

The arithmetic mean summarizes these three illustrative readings.

Generated by native Org. The frame and typography belong to this guide.
Named data tableA single changed input flows into the calculation.
ORG-17-004 / A small reproducible reportNative PDF after evaluation

Export the report to native PDF

Keys (no Evil) C-c C-v b · execute buffer; C-c C-e l p · export PDF
Doom alias C-c l e l p · export PDF

Evaluate the same Org report and compile its LaTeX export. The preview shows the actual PDF page.

Complete Org source
#+TITLE: Three readings#+AUTHOR: Alex Researcher#+DATE:#+LATEX_HEADER: \usepackage[margin=25mm]{geometry}#+OPTIONS: toc:nil num:nil* QuestionHow large is the average reading?* Data#+NAME: observations| 2 || 5 || 8 |* Analysis#+BEGIN_SRC emacs-lisp :var data=observations :results value :exports results(/ (apply #'+ (mapcar #'car data)) (float (length data)))#+END_SRC* InterpretationThe arithmetic mean summarizes these three illustrative readings.
Native PDF after evaluation
Native PDF page 1
Page 1
Actual native Org → LaTeX → pdfLaTeX output; preview scaled to fit.
HTML and LaTeX backendsDifferent renderers consume the same structured source.
Evaluation before exportThe build stores fresh results before creating either view.
Workflow reference

Macros, calls and inline code

Use the smallest mechanism that matches the job. Text macros shape exported prose; Babel executes code. A macro name and a Babel block name live in different mechanisms, even if you happen to give them the same spelling. The examples use unique names within each standalone file.

MechanismSyntaxWhen it runs
Text macro{{{name}}} or {{{name(a,b)}}}During document export.
Computed macro#+MACRO: name (eval ...)During export; arguments are strings.
Named block call#+CALL: name(x=7)C-c C-c on the CALL line; export evaluation depends on :eval.
Inline function callcall_name(x=7)C-c C-c at the inline call; result stored in a results macro.
Inline sourcesrc_emacs-lisp{(+ 2 5)}Evaluates the expression directly in the sentence.
Code inclusion<<name>> with :noweb yesExpands source text; see the REU chapter.
Workflow reference

Four choices behind a result

Result collection, representation, insertion and export are independent choices. These controls let one computation serve an editable notebook and a clean publication. The build evaluates the examples explicitly and uses :eval never-export to keep export from running them again.

QuestionHeader argumentExamples
What is captured?:results value or outputReturn value versus printed output.
How is it represented?:results table, list, verbatim, raw, html, latex, drawerStructured values or backend-specific markup.
Where does it go?:results replace, append, prepend, silentUpdate, retain history or leave the buffer unchanged.
What is published?:exports code, results, both, noneSee ORG-11-010 through ORG-11-012 and the FUN inline cases.
Is a file produced?:results file :file message.txtWrite the result and insert a file link.
Is evaluation permitted?:eval never-exportAllow explicit evaluation; suppress execution during export.

Within a CALL, inside headers precede the argument list and control the named block. End headers follow the argument list and control insertion of its returned result. Inline calls put the end headers in brackets.

#+CALL: demo[:results output]() :results verbatimInline: call_double(n=7)[:results raw].
Workflow reference

Publication workflow in Doom

Enable :lang org, :tools biblio and :completion vertico in Doom's module selection, then run doom sync after changing modules. Citar provides selection and actions for bibliographic records. Org-cite stores the citation syntax; the export processor formats the final citations and bibliography. This setup recipe is not a simulated Citar UI or an executed example.

;; In your Doom config.el; replace the path with your bibliography.(after! citar  (setq citar-bibliography '("~/bib/references.bib")))(after! org  (setq org-cite-global-bibliography '("~/bib/references.bib")        org-cite-insert-processor 'citar        org-cite-follow-processor 'citar        org-cite-activate-processor 'citar))
Keys / commandActionContext
C-c C-x @ / C-c l @org-cite-insertInsert a citation or edit the one at point.
C-c C-oorg-open-at-pointFollow the citation through the configured processor.
M-x citar-open-entryOpen bibliographic metadataRequires Citar; choose a reference.
M-x citar-openOpen a resource for a publicationAvailable PDFs, notes and links depend on your Citar setup.
C-h k, then keysInspect active bindingUseful if local Doom customizations change a shortcut.
Workflow reference

Choose the citation export processor

The executed CIT examples use basic so HTML and native PDF need no extra citation engine. Its intentionally simple formatting includes literal author names and a limited set of bibliographic fields. A publisher-specific style needs CSL or a LaTeX bibliography processor. Citar is a selection frontend, not the export processor.

ProcessorOutputAdditional requirements
basicHTML, LaTeX/PDF and other backendsBuilt into Org; used by all executed citation examples.
cslHTML, LaTeX/PDF and other backendsciteproc-el, a CSL style file and locale data.
biblatexLaTeX/PDFBibLaTeX package and a matching biber or BibTeX build step.
natbib / bibtexLaTeX/PDFMatching LaTeX package/style and BibTeX build step.

These are alternative setup recipes, not additional executed cases. Use one CITE_EXPORT setting in a document. Keep your chosen CSL style and bibliography with the project for reproducible output.

# Cross-format CSL output, after installing citeproc-el:#+CITE_EXPORT: csl styles/apa.csl # LaTeX-only alternative, with biber in the compilation pipeline:#+CITE_EXPORT: biblatex authoryear,backend=biber # Shared citation input and bibliography placement:#+BIBLIOGRAPHY: references.bib[cite:@knuth1984]#+PRINT_BIBLIOGRAPHY:
Companion inputs

Shared macros and callable blocks

These files are bundled in assets/ and copied beside each standalone example. They are also embedded in the canonical Org source. Publication records are shown in ORG-16-012.

assets/macros.org

#+MACRO: project Open Lab#+MACRO: quantity $1 $2

Download macros.org

assets/functions.org

#+NAME: scale#+BEGIN_SRC emacs-lisp :var x=3 factor=2 :results value(* x factor)#+END_SRC

Download functions.org

About the results

Source, results and stable references

The Org source and example index are attached to the PDF. The HTML and PDF show the same captured results, with complete source beside each example.

Captured environment: Emacs 31.1 and Org 9.8.7. Native PDF previews show actual exported pages; editor examples show captured buffer text.

Checks: All 208 examples passed their declared expectations. Native PDF examples were compiled twice.

Stable references: An ID such as ORG-01-001 identifies the tour, chapter and example. Chapter numbers have two digits; example numbers have three and start at 001 in each chapter. The 000 entry identifies the chapter. IDs are independent of PDF pages.

Reading the results: Editor results show text rather than your Emacs theme or window chrome. Folded text is shown with ellipses. HTML and LaTeX styling can differ. Capture templates, clock reports, publishing projects and external packages are useful further topics.

Quick lookup

Command index

Command / actionExamplePurpose
M-RIGHT · org-do-demoteORG-03-001Demote one heading
M-S-RIGHT · org-demote-subtreeORG-03-002Demote a whole subtree
M-S-LEFT · org-promote-subtreeORG-03-003Promote a whole subtree
M-DOWN · org-move-subtree-downORG-03-004Move a subtree down
C-c ^, then a · org-sort-entriesORG-03-005Sort sibling headings
C-x n s · org-narrow-to-subtreeORG-03-006Focus on one subtree
C-x n s, then C-x n wORG-03-007Widen the buffer again
TAB · org-cycleORG-03-008Fold a subtree
C-c C-c · org-table-alignORG-05-002Align the source columns
M-DOWN · org-table-move-row-downORG-05-003Move a data row down
M-S-RIGHT · org-table-insert-columnORG-05-004Insert a column
C-u C-c * · org-table-recalculate (whole table)ORG-05-005Calculate a whole column
C-u C-c * · org-table-recalculate (whole table)ORG-05-006Change the multiplier
C-u C-c * · org-table-recalculate (whole table)ORG-05-007Format decimal places
C-u C-c * · org-table-recalculate (whole table)ORG-05-008Calculate one specific field
C-u C-c * · org-table-recalculate (whole table)ORG-05-009Sum a range
Quick lookup

Command index · continued

Command / actionExamplePurpose
C-u C-c * · org-table-recalculate (whole table)ORG-05-010Use an Emacs Lisp formula
C-u C-c * · org-table-recalculate (whole table)ORG-05-011Refer to a named table
C-u C-c * · org-table-recalculate (whole table)ORG-06-001Multiply two columns
C-u C-c * · org-table-recalculate (whole table)ORG-06-002Target one cell
C-u C-c * · org-table-recalculate (whole table)ORG-06-003Target a rectangular range
C-u C-c * · org-table-recalculate (whole table)ORG-06-004Keep a parameter cell fixed
C-u C-c * · org-table-recalculate (whole table)ORG-06-005Refer to nearby columns
C-u C-c * · org-table-recalculate (whole table)ORG-06-006Put a total in the last row
C-u C-c * · org-table-recalculate (whole table)ORG-06-007Use separators as range boundaries
C-u C-c * · org-table-recalculate (whole table)ORG-06-008Sum across a row
C-u C-c * · org-table-recalculate (whole table)ORG-06-009Calculate a row average
C-u C-c * · org-table-recalculate (whole table)ORG-06-010Calculate a weighted mean
C-u C-c * · org-table-recalculate (whole table)ORG-06-011Show a share as a percentage
C-u C-c * · org-table-recalculate (whole table)ORG-06-012Build a running total
C-u C-c * · org-table-recalculate (whole table)ORG-06-013Compare with the previous row
C-u C-c * · org-table-recalculate (whole table)ORG-06-014Choose between two values
Quick lookup

Command index · continued

Command / actionExamplePurpose
C-u C-c * · org-table-recalculate (whole table)ORG-06-015Guard against division by zero
C-u C-c * · org-table-recalculate (whole table)ORG-06-016Ignore empty cells in a mean
C-u C-c * · org-table-recalculate (whole table)ORG-06-017Treat empty cells as zero
C-u C-c * · org-table-recalculate (whole table)ORG-06-018Format fixed decimal places
C-u C-c * · org-table-recalculate (whole table)ORG-06-019Use scientific notation
C-u C-c * · org-table-recalculate (whole table)ORG-06-020Keep exact fractions
C-u C-c * · org-table-recalculate (whole table)ORG-06-021Use degrees in trigonometry
C-u C-c * · org-table-recalculate (whole table)ORG-06-022Switch to radians
C-u C-c * · org-table-recalculate (whole table)ORG-06-023Name a file-level constant
C-u C-c * · org-table-recalculate (whole table)ORG-06-024Give columns meaningful names
C-u C-c * · org-table-recalculate (whole table)ORG-06-025Keep a parameter beside the data
C-u C-c * · org-table-recalculate (whole table)ORG-06-026Read a heading property
C-u C-c * · org-table-recalculate (whole table)ORG-06-027Chain formulas from left to right
C-u C-c * · org-table-recalculate (whole table)ORG-06-028See a dependency that needs another pass
C-u C-u C-c * · org-table-iterateORG-06-029Iterate until values stabilize
C-c * · org-table-recalculate (current row)ORG-06-030Recalculate only the current row
Quick lookup

Command index · continued

Command / actionExamplePurpose
C-u C-c * · org-table-recalculate (whole table)ORG-06-031Aggregate a different table
C-u C-c * · org-table-recalculate (whole table)ORG-06-032Look up a row by its key
C-u C-c * · org-table-recalculate (whole table)ORG-06-033Transform text with Emacs Lisp
C-u C-c * · org-table-recalculate (whole table)ORG-06-034Use numeric Lisp arguments
C-u C-c * · org-table-recalculate (whole table)ORG-06-035Add durations
C-u C-c * · org-table-recalculate (whole table)ORG-06-036Convert a duration to decimal hours
C-u C-c * · org-table-recalculate (whole table)ORG-06-037Understand multiple formula lines
C-c C-c on the second #+TBLFM line · org-ctrl-c-ctrl-cORG-06-038Apply a different formula line
C-u C-c * · org-table-recalculate (whole table)ORG-06-039Generate row numbers
C-u C-c * · org-table-recalculate (whole table)ORG-06-040Make arithmetic grouping explicit
C-c C-t · choose DONEORG-07-002Complete a task
C-c C-t · choose NEXTORG-07-003Define a workflow
C-c C-c · toggle checkboxORG-07-006Check one item
C-c C-c on the cookieORG-07-007Count completed items
C-c C-c on the cookieORG-07-008Show percentage progress
M-x org-agenda-list · one dayORG-07-009See one day in the agenda
Quick lookup

Command index · continued

Command / actionExamplePurpose
Agenda for 12 October 2026ORG-07-010Move the scheduled task
M-x org-todo-listORG-07-011Show all unfinished tasks
Source inspection · no commandORG-07-012Add a repeating date
(org-entry-get nil "OWNER")ORG-08-003Read a property
(org-entry-get nil "OWNER" t)ORG-08-004Inherit a parent property
(org-entry-get nil "OWNER" t)ORG-08-005Override an inherited value
C-c C-x p · OWNER · AlexORG-08-006Set a property with a command
org-map-entries · tag matchORG-08-007Find headings with a tag
org-map-entries · property matchORG-08-008Filter by a property value
C-c C-c · org-babel-lob-execute-maybeORG-14-001Call a block without parameters
C-c C-c · org-babel-lob-execute-maybeORG-14-002Call a function with a default input
C-c C-c · org-babel-lob-execute-maybeORG-14-003Override one function parameter
C-c C-c · org-babel-lob-execute-maybeORG-14-004Pass two named parameters
C-c C-c · org-babel-lob-execute-maybeORG-14-005Keep an omitted parameter at its default
C-c C-c · org-babel-lob-execute-maybeORG-14-006Pass a string to a function
C-c C-c · org-babel-lob-execute-maybeORG-14-007Pass a named table to a function
Quick lookup

Command index · continued

Command / actionExamplePurpose
C-c C-c · org-babel-lob-execute-maybeORG-14-008Collect a function return value
C-c C-c · org-babel-lob-execute-maybeORG-14-009Override how the function collects results
C-c C-c · org-babel-lob-execute-maybeORG-14-010Format a call result as a table
C-c C-c · org-babel-lob-execute-maybeORG-14-011Call a function inline without parameters
C-c C-c · org-babel-lob-execute-maybeORG-14-012Pass a parameter in an inline call
C-c C-c · org-babel-lob-execute-maybeORG-14-013Export prose containing an inline result
C-c C-c · org-babel-execute-src-blockORG-14-014Evaluate code directly inside a sentence
C-c C-c · org-babel-lob-execute-maybeORG-14-015Call a function from another Org file
C-c C-c · org-babel-execute-src-blockORG-14-016Feed one function result into another
C-c C-c · org-babel-lob-execute-maybeORG-14-017Export an inline result as plain text
C-c C-v i · org-babel-lob-ingest; then C-c C-c on CALLORG-14-018Ingest a reusable function library
Further reading

Official documentation

Original demonstrations executed with the installed Org version. The manual is the reference for syntax; inspect your local version with M-x org-version.

TopicOfficial manual chapter
First documenthttps://orgmode.org/manual/Document-Structure.html
Text and listshttps://orgmode.org/manual/Markup-for-Rich-Contents.html
Outline and navigationhttps://orgmode.org/manual/Structure-Editing.html
Links and referenceshttps://orgmode.org/manual/Hyperlinks.html
Tables and calculationshttps://orgmode.org/manual/Tables.html
Spreadsheets and formulashttps://orgmode.org/manual/The-Spreadsheet.html
Tasks and planninghttps://orgmode.org/manual/TODO-Items.html
Tags and propertieshttps://orgmode.org/manual/Properties-and-Columns.html
Images and blockshttps://orgmode.org/manual/Images.html
Export and layouthttps://orgmode.org/manual/Export-Settings.html
Further reading

Official documentation · continued

Original demonstrations executed with the installed Org version. The manual is the reference for syntax; inspect your local version with M-x org-version.

TopicOfficial manual chapter
Source blocks and Babelhttps://orgmode.org/manual/Working-with-Source-Code.html
Text macroshttps://orgmode.org/manual/Macro-Replacement.html
Reuse and tanglinghttps://orgmode.org/manual/Extracting-Source-Code.html
Functions and inline callshttps://orgmode.org/manual/Evaluating-Code-Blocks.html
Result formats and fileshttps://orgmode.org/manual/Results-of-Evaluation.html
Citations and publicationshttps://orgmode.org/manual/Citation-handling.html
A small reproducible reporthttps://orgmode.org/manual/Working-with-Source-Code.html
Further reading

Keyboard sources and verification

Standard bindings were checked in Emacs 29.3 / Org 9.6.15. Doom aliases were checked against its module source on 10 October 2026. A full Doom session and your personal configuration were not run by this build. Use C-h k to check the active binding locally.

ReferenceSource
Doom non-Evil global bindingsDoom modules · config/default/+emacs-bindings.el
Doom Org localleader bindingsDoom modules · lang/org/config.el · +org-init-keybinds-h
Disabling the Evil moduleDoom modules · editor/evil · How do I remove evil?
Table editingOrg manual · Built-in Table Editor
Formula editor and debuggerOrg manual · Editing and debugging formulas
Recalculation and iterationOrg manual · Updating the table
Babel commandsOrg manual · Key Bindings and Useful Functions
Export menuOrg manual · The Export Dispatcher

Doom prefix defaults assume its default configuration module. Changes to module selection, local bindings or operating-system shortcuts can change the effective keys. The M-x command names remain the reference entry points.

Further reading

Publication and citation sources

ReferenceSource
Knuth (1984), Literate Programmingdoi:10.1093/comjnl/27.2.97 · The Computer Journal 27(2), 97–111.
Schulte, Davison, Dye and Dominik (2012)A Multi-Language Computing Environment for Literate Programming and Reproducible Research · Journal of Statistical Software 46(3), 1–24. doi:10.18637/jss.v046.i03
Citar frontend and Doom integrationOfficial Citar repository and configuration guide
Export processors and bibliography stylesOrg manual · Citation export processors
Bibliography placementOrg manual · Bibliography printing

The bundled .bib file contains publication metadata, not full article text. Local citation keys are chosen for the demonstrations. Exported typography and available citation styles depend on the selected processor.

Example and command index

Content: CC0 1.0. Structure and publishing framework: CC BY 4.0 by Lukas C. Bossert. Repository source · Publishing framework source · License scope and third-party notices.