Emacs: Org Mode Markup Cheatsheet

By Xah Lee. Date: . Last updated: .

Emacs org-mode is a markup language, similar to Markdown, but with far more features. This page shows the markup syntax.

org mode sample 2019-01-25 dr5xg
org mode markup syntax 2019-01-25

Alt + x org-mode to start org mode.

Heading

Heading starts with a asterisk, like this:

* text
first level heading
** text
second level heading
*** text
third level heading

Text Decoration

*text*
Bold
/text/
Italic
_text_
Underlined
=text=
Verbatim
~text~
Code
+text+
Strike-through

List

Unordered list, start with a hyphen -. (plus sign + can also be used)

- item - item - item

Ordered List

1. item 2. item 3. item

Description list, is just like list, but with :: separating the term and its description. Often used for definition.

- term :: description - term :: description

Checkboxes can be added to list items, right after the list marker.

- [ ] description - [X] description - [ ] description

Link

[[URL]]

or

[[URL][description]]

Note: url can also be a file path, full path or relative path.

Image

[[image_file_path]]

Alt + x org-toggle-inline-imagesCtrl + c Ctrl + x Ctrl + v
Display images

Date-Time Stamp

Timestamp has two syntax:

Timestamp can have other syntax variation to specify a duration or repetition.

Alt + x org-time-stampCtrl + c .
Insert an active time stamp
Alt + x org-time-stamp-inactiveCtrl + c !
Insert an inactive time stamp

Inline Code

~text~
Source Code
=text=
Verbatim text

Code Block

#+BEGIN_EXAMPLE source_code #+END_EXAMPLE

#+BEGIN_SRC python python_code #+END_SRC

Tags, Todo, Priority (add to Heading)

Tags

Tags are keywords attached to headline. Tags must be at the end of headline. Example:

* see mom :tag:

there can be multiple.

* project wonder :tag1:tag2:

tag can be any word, such as “work”, “code”, “family”.

Tag name cannot have space, nor hyphen. Use lowline _

Alt + x org-set-tags-commandCtrl + c Ctrl + q
insert a tag to current heading.

Todo

A heading can start with TODO or DONE.

** TODO text

[see Emacs: Using Org Mode for Todo]

Priority Mark

A heading can have priority mark. It follows immediately after TODO:

** TODO [#A] text

The syntax is

Priority mark is used for todo/agenda features in org mode.

Properties (For Heading)

Each heading can have associated info of key value pairs, called properties.

Here's syntax for properties:

* emacs_tutorial :PROPERTIES: :ORDERED: yes :ID: 11858 :OWNER: Lee :END:

Properties must immediately follow a headline.

:PROPERTIES:

Followed by key value pair, 1 pair per line.

Followed by

:END:

Drawer (For Heading)

Drawer lets you attach info to a heading. It's similar to properties, but instead of key value pairs, you have arbitrary text.

The difference of drawer content and heading's content is that drawer's content are normally hidden from view. (so, drawer is used for associated info you do not always want to see to prevent clutter.)

Drawer must immediately follow a heading.

Drawer syntax is like this:

* heading :DRAWERNAME: drawer_text :END:

Org Mode


Emacs Tutorial

Quick Start

Font

Split Window

File

Buffer

Copy/Paste

Find Replace

Unicode

Whitespace

Rectangle Edit

Line Wrap

Shell

View Special File

Editing Brackets

Org Mode

HTML

Emacs Efficiency

Misc