headings · 16m

Headings, folding, and structural editing

Stars are not decorative headings; they form movable trees.

TAB folds a heading; S-TAB folds the file

Moving the heading with M-UP carries children, properties, and planning data with it.

Stars encode hierarchy. TAB cycles visibility at a heading; S-TAB cycles the whole buffer. C-c C-n and C-c C-p move between headings. C-c C-f and C-c C-b move among same-level siblings. C-c C-u moves upward.

Structural editing is the decisive difference from markup-only editing. M-up and M-down move a heading or list item. M-left and M-right promote or demote it. With point on a heading, these operations carry its complete subtree, preserving the relationship between title, prose, children, properties, and planning data.

Use C-c C-x b (org-tree-to-indirect-buffer) to edit a subtree in a separate indirect buffer while retaining the same underlying text. C-x n s (org-narrow-to-subtree) temporarily hides everything outside one subtree; C-x n w widens again. Narrowing is useful but easy for newcomers to forget. If text appears missing, check the mode line and widen.

Org paragraphs are separated by blank lines. A line beginning with # is a comment. #+KEYWORD: lines configure a document. Drawers hide structured material. Blocks delimit special content.

Emphasis is *bold*, /italic/, _underline_, +strike-through+, ~code~, and =verbatim=. Lists may be unordered (-, +, *), ordered (1. or 1)), or descriptive (term :: definition). M-RET creates another item. Checkboxes are independent of TODO states. C-c C-c toggles a checkbox. Statistics cookies such as [1/2] and [50%] update from children; they are summaries, not task states.

Working at scale

One huge file gives fast global reorganization and simple search. Many small files give focused diffs, easier sharing, and smaller parse units. A useful starting compromise is a handful of purpose-based files. Split only when ownership, access, performance, or lifecycle differs.

Summary. Stars are not decorative headings; they form movable trees. Learn folding and subtree operations before building a task system.

Exercises

  • Basic: Create a three-level outline and fold each level.
  • Practical: Move a complete subsection and promote one child without cutting text.
  • Advanced: Open one subtree indirectly, edit it, and observe the source buffer update.