Emacs: Outline, org-mode

By Xah Lee. Date: . Last updated: .

org-mode is bundled with emacs since emacs 22 (). This page is a basic tutorial.

emacs org mode outline2
org mode, outline, showing 1st and 2nd level headers.
emacs org mode outline1
org mode, outline, showing 1st level.

Org Mode Markup Cheatsheet

Org Mode is a markup language, similar to Markdown, but more rich. Here's a cheat sheet.

Emacs: Org Mode Markup Cheatsheet

Have a look at the cheatsheet first.

The following shows you the commands to automatically insert the markup, and commands that navigate/manipulate the markup.

Create Headings

Heading starts with asterisk *, followed by a space.

* on the Musicality of Mathematics

** Abstract

Over the past thousand years, humanity has worked on on music and math.

** the Meaning of Musicality

One of the central problem is the definition of musicality.

** the Meaning of Math

The meaning of math is a ancient question. Here, we take a meta-physiology approach.

* on the Philosophy of Musicality

** Introduction

Of course, talk is cheap. But, is it, really? But before we can talk about it, we have to think about it. Does it imply thinking is cheaper?

Here we prove the fundamental theorem of musicality.

* the Absca Project

“I'm going to be lucky today, and my methodology is happy-go-lucky” —anonymous.

A wise man has said, but, we cut it directly by introducing the Absca project.

** Components of the Absca System

xyz.

** Absca System and Logic

* the Relation of Absca, Musicality, and Math

xyz.

Copy and paste the above in a file and save it as test.org.

Now, open the file. File ending in “.org” opens in org mode by default.

or Alt+x org-mode, to activate org mode in any buffer.

Show/Hide Sections

Create New Heading

Move Tree Branch

Here are commands that move heading (and its content).

Move Heading

Here's a command that moves just the heading (not moving its content and sub-headings.).

Open Files in org-mode Automatically

If you name your file ending in “.org”, emacs will open it in org-mode automatically.

You can also put this line as the first line of the file:

-*- mode: org -*-

Emacs will start org-mode when the file is opened.

If you want any file ending in “.txt” open in org-mode, add this line to your emacs init file:

(add-to-list 'auto-mode-alist '("\\.txt\\'" . org-mode))

Export to HTML

One great feature of org-mode is export to HTML.

Alt+x org-export-dispatchCtrl+c Ctrl+e】 → to show org export choices.

Ctrl+c Ctrl+e h h】 → export the file to HTML.

The newly generated file have the same name as your org file, but with “.html” extension, in the same directory.

Use Graphical Menu

When in org-mode, there's a menu 〖Org〗. Try it. From the menu, you can learn the most useful commands and the key shortcuts.

emacs org mode gui menu 2017 06 21
emacs org mode GUI menu.

To find what's command name of a menu item, Alt+x describe-key, then pull a menu.

Reference

https://orgmode.org/

Org mode is written by Carsten Dominik https://staff.science.uva.nl/c.dominik/

You can see a fun video interview of Carsten Dominik by Sacha Chua at http://sachachua.com/blog/2013/03/emacs-chat-carsten-dominik/

Org mode is lead by Bastien Guerry for over 10 years. You can see a fun video interview of Bastien Guerry by Sacha Chua at http://sachachua.com/blog/2013/05/emacs-chat-bastien-guerry/

org mode Topic

  1. Org Mode Markup Cheatsheet
  2. org-mode Tutorial
  3. Source Code Markup
  4. Org Mode for Todo
  5. Org Mode Customization
  6. Elisp: Parse Org Mode

If you have a question, put $5 at patreon and message me.
Or Buy Xah Emacs Tutorial
Or buy a nice keyboard: Best Keyboards for Emacs

Emacs

Emacs Lisp

Misc