logo

Home Sweet Home

A place to feel safe!

Mysterious Captures

First published 2022-05 by Emacs-Rookie. Updated 2022-07-23, by Control-Freak.


The remember mode inspired capture in org mode and is since 2010-08 recommended for new users. I still find it mysterious and will try to solve the puzzle with two blogs of the remember author Charles Cave: (1) Remember Mode Tutorial and (2) Capture mode and Date Trees in org-mode at members.optusnet.com.au.


Capture lets you quickly store notes to a target, which usually is an org file. org’s method for capturing new items is heavily inspired by John Wiegley’s Remember package, i.e., emacs' rememeber mode.

M-x org-capture is the command to launch the capturing procedure. Figure 1 shows a form, called dispatcher, to invite the user to choose from capture templates. The default form offers the keys

capture.png
Figure 1: Capture dispatcher.

For the default template the target is a file with its name deposited in the variable org-default-notes-file. In my version this file is set to 📂 \tilde/.notes.

If your emacs point is in an org file the t-capture will open your notes file with the following lines entered.

* Tasks
** TODO
   [2019-09-24 Tue]
   [[file:/path/2/your/file.org::*Section][Section Headline]]

The point will be one blank after the TODO keyword.

If your notes file already has a Task Section or with another M-x org-capture t a new TODO subsection is added to the Task Section.

There are three ways to escape the capture buffer

Capture templates are customized in org-capture-templates or with M-x org-capture C. The definition of the default t template would be set as a list

(setq org-capture-templates
      '("t" "Todo" entry
        (file+headline org-default-notes-file "Tasks")
        "* TODO %?\n  %i\n  %a"))

Usually the notes are put into org files. But the capture idea also provides a target type called function, which is very flexible.

Examples: Capturing Content for Emacs 2018-05-26 anonymous blog entry at howardism.org