2.5 Structure editing
- M-<RET>
- Insert new heading with same level as current. If the cursor is in a
plain list item, a new item is created (see Plain lists). To force
creation of a new headline, use a prefix argument, or first press <RET>
to get to the beginning of the next line. When this command is used in
the middle of a line, the line is split and the rest of the line becomes
the new headline1. If the
command is used at the beginning of a headline, the new headline is
created before the current line. If at the beginning of any other line,
the content of that line is made the new heading. If the command is
used at the end of a folded subtree (i.e. behind the ellipses at the end
of a headline), then a headline like the current one will be inserted
after the end of the subtree.
- C-<RET>
- Just like M-<RET>, except when adding a new heading below the
current heading, the new heading is placed after the body instead of before
it. This command works from anywhere in the entry.
- M-S-<RET>
- Insert new TODO entry with same level as current heading.
- C-S-<RET>
- Insert new TODO entry with same level as current heading. Like
C-<RET>, the new headline will be inserted after the current
subtree.
- M-<left>
- Promote current heading by one level.
- M-<right>
- Demote current heading by one level.
- M-S-<left>
- Promote the current subtree by one level.
- M-S-<right>
- Demote the current subtree by one level.
- M-S-<up>
- Move subtree up (swap with previous subtree of same
level).
- M-S-<down>
- Move subtree down (swap with next subtree of same level).
- C-c C-x C-w
- Kill subtree, i.e. remove it from buffer but save in kill ring.
With a numeric prefix argument N, kill N sequential subtrees.
- C-c C-x M-w
- Copy subtree to kill ring. With a numeric prefix argument N, copy the N
sequential subtrees.
- C-c C-x C-y
- Yank subtree from kill ring. This does modify the level of the subtree to
make sure the tree fits in nicely at the yank position. The yank level can
also be specified with a numeric prefix argument, or by yanking after a
headline marker like ‘****’.
- C-y
- Depending on the variables
org-yank-adjusted-subtrees and
org-yank-folded-subtrees, Org's internal yank command will
paste subtrees folded and in a clever way, using the same command as C-c
C-x C-y. With the default settings, level adjustment will take place and
yanked trees will be folded unless doing so would swallow text previously
visible. Any prefix argument to this command will force a normal yank
to be executed, with the prefix passed along. A good way to force a normal
yank is C-u C-y. If you use yank-pop after a yank, it will yank
previous kill items plainly, without adjustment and folding.
- C-c C-w
- Refile entry or region to a different location. See Refiling notes.
- C-c ^
- Sort same-level entries. When there is an active region, all entries in the
region will be sorted. Otherwise the children of the current headline are
sorted. The command prompts for the sorting method, which can be
alphabetically, numerically, by time (using the first time stamp in each
entry), by priority, or by TODO keyword (in the sequence the keywords have
been defined in the setup). Reverse sorting is possible as well. You can
also supply your own function to extract the sorting key. With a C-u
prefix, sorting will be case-sensitive. With two C-u C-u prefixes,
duplicate entries will also be removed.
- C-x n s
- Narrow buffer to current subtree.
- C-x n w
- Widen buffer to remove a narrowing.
- C-c *
- Turn a normal line or plain list item into a headline (so that it
becomes a subheading at its location). Also turn a headline into a
normal line by removing the stars. If there is an active region, turn
all lines in the region into headlines. Or, if the first line is a
headline, remove the stars from all headlines in the region.
When there is an active region (Transient mark mode), promotion and
demotion work on all headlines in the region. To select a region of
headlines, it is best to place both point and mark at the beginning of a
line, mark at the beginning of the first headline, and point at the line
just after the last headline to change. Note that when the cursor is
inside a table (see Tables), the Meta-Cursor keys have different
functionality.