Emacs: Org Mode Markup Cheatsheet
Org-Mode as Markdown
Emacs org-mode is a markup language, similar to Markdown, but with far more features. This page shows the markup syntax.
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 -.
- item
- item
- item
Ordered List
1. item
2. item
3. item
Definition List
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-images
【Ctrl+c Ctrl+x Ctrl+v】 -
Display images
Date-Time Stamp
Timestamp has two syntax:
<2019-01-25 Fri>
(active timestamp, where other org features may act on it, such as scheduling, agenda.)[2019-01-25 Fri]
(inactive timestamp. Simply a date/time stamp.)
Timestamp can have other syntax variation to specify a duration or repetition.
<2006-11-01 Wed 19:15>
<2006-11-02 Thu 20:00-22:00>
<2007-05-16 Wed 12:30 +1w>
weekly<2004-08-23 Mon>--<2004-08-26 Thu>
range.
- Alt+x
org-time-stamp
【Ctrl+c .】 -
Insert an active time stamp
- Alt+x
org-time-stamp-inactive
【Ctrl+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-command
【Ctrl+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
[#A]
[#B]
[#C]
- etc.
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: