Org-mode Hidden Gems - 01 Document Structure

Recently I started to read Org mode manual, and it surprises me there are so many useful options/commands/functionalities I wasn’t aware of even after using it daily for the past year, so I’d like to share some of the findings here.

Each section is accompanied with a short demo video. Settings are based on my preference, but as the old saying goes, “a man’s Emacs is his own castle”, so do customize it for your own good. When in doubt, C-h v and C-h f are always your friends. Emacs 26.2 with Org v9.2.3 are used here.

Avoid inadvertent text edit in invisible area

When text is inserted near invisible area (...), I’m never sure what exactly is changed. Usually I would expand to check, only to end up losing my focus during panic TAB ing.

Set org-catch-invisible-edits to error to prevent editing invisible area, and show an error message in echo area instead. I prefer show-and-error, which additionally expand text and move focus to the expected point.

Show headings only

Usually I would have some texts under a tree right before its subtrees. This could be visually disturbing when I TAB through trying to glance at tree structure. All I want is the headings. In this case, org-kill-note-or-show-branches (bound to C-c C-k) comes in handy.

Clone trees with time shifts

Bound to C-c C-x c, org-clone-subtree-with-time-shift create multiple subtrees with timestamps shifted. Useful for creating skeleton for repeated tasks.

In collapsed view, hide empty lines between subtrees

Set org-cycle-separator-lines to 0. Gives a more compact and consistent view, especially in a large Org file with many headings.

Demote sequence for list bullets

(setq org-list-demote-modify-bullet '(("+" . "-") ("-" . "+") ("*" . "+")))

Miscellaneous

;; Increase sub-item indentation
(setq org-list-indent-offset 1)

And I only learn the existence of Description list today. Writing:

- Emacs :: An extensible, customizable, free/libre text editor
- Org mode :: Keeping notes, maintaining TODO lists, planning projects, and
  authoring documents with a fast and effective plain-text system

renders:

Emacs
An extensible, customizable, free/libre text editor
Org mode
Keeping notes, maintaining TODO lists, planning projects, and authoring documents with a fast and effective plain-text system

Org-mode Hidden Gems series: