Next: TeX Mode, Previous: Outline Mode, Up: Text [Contents][Index]

### 25.10 Org Mode

Org mode is a variant of Outline mode for using Emacs as an organizer and/or authoring system. Files with names ending in the extension `.org` are opened in Org mode (see Choosing Modes). To explicitly switch to Org mode, type `M-x org-mode`.

In Org mode, as in Outline mode, each entry has a heading line that starts with one or more ‘`*`’ characters. See Outline Format. In addition, any line that begins with the ‘`#`’ character is treated as a comment.

Org mode provides commands for easily viewing and manipulating the outline structure. The simplest of these commands is `TAB` (`org-cycle`). If invoked on a heading line, it cycles through the different visibility states of the subtree: (i) showing only that heading line, (ii) showing only the heading line and the heading lines of its direct children, if any, and (iii) showing the entire subtree. If invoked in a body line, the global binding for `TAB` is executed.

Typing `S-TAB` (`org-shifttab`) anywhere in an Org mode buffer cycles the visibility of the entire outline structure, between (i) showing only top-level heading lines, (ii) showing all heading lines but no body lines, and (iii) showing everything.

You can move an entire entry up or down in the buffer, including its body lines and subtree (if any), by typing `M-<up>` (`org-metaup`) or `M-<down>` (`org-metadown`) on the heading line. Similarly, you can promote or demote a heading line with `M-<left>` (`org-metaleft`) and `M-<right>` (`org-metaright`). These commands execute their global bindings if invoked on a body line.

The following subsections give basic instructions for using Org mode as an organizer and as an authoring system. For details, see Introduction in The Org Manual.

Next: TeX Mode, Previous: Outline Mode, Up: Text [Contents][Index]