2.6 Plain Lists
Within an entry of the outline tree, hand-formatted lists can provide additional structure. They also provide a way to create lists of checkboxes (see Checkboxes). Org supports editing such lists, and every exporter (see Exporting) can parse and format them.
Org knows ordered lists, unordered lists, and description lists.
- Unordered list items start with β
-
β, β+
β, or β*
β1 as bullets. - Ordered list items start with a numeral followed by either a period or a right parenthesis2, such as β
1.
β or β1)
β3 If you want a list to start with a different valueβe.g., 20βstart the text of the item with β[@20]
β4. Those constructs can be used in any item of the list in order to enforce a particular numbering. - Description list items are unordered list items, and contain the separator β
::
β to distinguish the description term from the description.
Items belonging to the same list must have the same indentation on the first line. In particular, if an ordered list reaches number β10.
β, then the 2-digit numbers must be written left-aligned with the other numbers in the list. An item ends before the next line that is less or equally indented than its bullet/number.
A list ends whenever every item has ended, which means before any line less or equally indented than items at top level. It also ends before two blank lines. In that case, all items are closed. Here is an example:
* Lord of the Rings
My favorite scenes are (in this order)
1. The attack of the Rohirrim
2. Eowyn's fight with the witch king
+ this was already my favorite scene in the book
+ I really like Miranda Otto.
3. Peter Jackson being shot by Legolas
- on DVD only
He makes a really funny face when it happens.
But in the end, no individual scenes matter but the film as a whole.
Important actors in this film are:
- Elijah Wood :: He plays Frodo
- Sean Astin :: He plays Sam, Frodo's friend. I still remember him
very well from his role as Mikey Walsh in /The Goonies/.
Org supports these lists by tuning filling and wrapping commands to deal with them correctly, and by exporting them properly (see Exporting). Since indentation is what governs the structure of these lists, many structural constructs like β#+BEGIN_
β blocks can be indented to signal that they belong to a particular item.
If you find that using a different bullet for a sub-listβthan that used for the current list-levelβimproves readability, customize the variable org-list-demote-modify-bullet
. To get a greater difference of indentation between items and theirs sub-items, customize org-list-indent-offset
.
The following commands act on items when point is in the first line of an itemβthe line with the bullet or number. Some of them imply the application of automatic rules to keep list structure intact. If some of these actions get in your way, configure org-list-automatic-rules
to disable them individually.
TAB
(org-cycle
)β
Items can be folded just like headline levels. Normally this works only if point is on a plain list item. For more details, see the variable org-cycle-include-plain-lists
. If this variable is set to integrate
, plain list items are treated like low-level headlines. The level of an item is then given by the indentation of the bullet/number. Items are always subordinate to real headlines, however; the hierarchies remain completely separated. In a new item with no text yet, the first TAB
demotes the item to become a child of the previous one. Subsequent TAB
s move the item to meaningful levels in the list and eventually get it back to its initial position.
M-RET
(org-insert-heading
)β
Insert new item at current level. With a prefix argument, force a new heading (see Structure Editing). If this command is used in the middle of an item, that item is split in two, and the second part becomes the new item5. If this command is executed before itemβs body, the new item is created before the current one.
M-S-RET
β
Insert a new item with a checkbox (see Checkboxes).
S-UP
β
S-DOWN
β
Jump to the previous/next item in the current list, but only if org-support-shift-select
is off6. If not, you can still use paragraph jumping commands like C-UP
and C-DOWN
to quite similar effect.
M-UP
β
M-DOWN
β
Move the item including subitems up/down7, i.e., swap with previous/next item of same indentation. If the list is ordered, renumbering is automatic.
M-LEFT
β
M-RIGHT
β
Decrease/increase the indentation of an item, leaving children alone.
M-S-LEFT
β
M-S-RIGHT
β
Decrease/increase the indentation of the item, including subitems. Initially, the item tree is selected based on current indentation. When these commands are executed several times in direct succession, the initially selected region is used, even if the new indentation would imply a different hierarchy. To use the new hierarchy, break the command chain by moving point.
As a special case, using this command on the very first item of a list moves the whole list. This behavior can be disabled by configuring org-list-automatic-rules
. The global indentation of a list has no influence on the text after the list.
C-c C-c
β
If there is a checkbox (see Checkboxes) in the item line, toggle the state of the checkbox. In any case, verify bullets and indentation consistency in the whole list.
C-c -
β
Cycle the entire list level through the different itemize/enumerate bullets (β-
β, β+
β, β*
β, β1.
β, β1)
β) or a subset of them, depending on org-plain-list-ordered-item-terminator
, the type of list, and its indentation. With a numeric prefix argument N, select the Nth bullet from this list. If there is an active region when calling this, all lines are converted to list items. With a prefix argument, the selected text is changed into a single item. If the first line already was a list item, any item marker is removed from the list. Finally, even without an active region, a normal line is converted into a list item.
C-c *
β
Turn a plain list item into a headlineβso that it becomes a subheading at its location. See Structure Editing, for a detailed explanation.
C-c C-*
β
Turn the whole plain list into a subtree of the current heading. Checkboxes (see Checkboxes) become βTODO
β, respectively βDONE
β, keywords when unchecked, respectively checked.
S-LEFT
β
S-RIGHT
β
This command also cycles bullet styles when point is in on the bullet or anywhere in an item line, details depending on org-support-shift-select
.
C-c ^
β
Sort the plain list. Prompt for the sorting method: numerically, alphabetically, by time, or by custom function.
- When using β
*
β as a bullet, lines must be indented so that they are not interpreted as headlines. Also, when you are hiding leading stars to get a clean outline view, plain list items starting with a star may be hard to distinguish from true headlines. In short: even though β*
β is supported, it may be better to not use it for plain list items.β© - You can filter out any of them by configuring
org-plain-list-ordered-item-terminator
.β© - You can also get β
a.
β, βA.
β, βa)
β and βA)
β by configuringorg-list-allow-alphabetical
. To minimize confusion with normal text, those are limited to one character only. Beyond that limit, bullets automatically become numbers.β© - If thereβs a checkbox in the item, the cookie must be put before the checkbox. If you have activated alphabetical lists, you can also use counters like β
[@b]
β.β© - If you do not want the item to be split, customize the variable
org-M-RET-may-split-line
.β© - If you want to cycle around items that way, you may customize
org-list-use-circular-motion
.β© - See
org-list-use-circular-motion
for a cyclic behavior.β©