Quick note taking with Emacs and Org Capture

Taking notes has to be a taks that is fast, easy and must not get in the way of the things you’re doing. How many times do we forget something because we didn’t write it down right away? Or how many times you didn’t took a note of something because you don’t have a quick and simple way to easily write down that idea for later use?

Using Emacs for most of my daily workflow and Org mode as my organizing GTD system, having a quick way to take notes and store ideas or links quickly is a huge advantage. This is the fastest note taking system I’ve used so far and even if you’re not using Emacs or Org mode, this feature alone is worth spending a little time learning the tools.

Remember mode was the way to capture ideas fast and easy without getting in the way. Until Org mode version 6.36, you had to hook up remember mode to interact with Org to capture your notes. Now you don’t need to since there’s Org Capture. It is part of Org mode and it’s got all the functionality of remember mode with the advantage of being built-in with Org mode.

Setup org-capture with global keybindings so that no matter what you’re doing (within Emacs) you can quickly capture something with a fast shortcut. I like to bind it to C-c r

(setq org-default-notes-file (concat org-directory "/notes.org"))
;; Bind Org Capture to C-c r
(global-set-key "\C-cr" 'org-capture)

If you are using Emacs prelude setup a different shortcut because this one will conflict with prelude rename command. Since I’m already wired to use that shortcut and I barely use the prelude-rename command that often, I added this to my setup:

;; Unbind prelude rename command
(global-unset-key "\C-cr")

Like with remember mode, you can set up templates for your captured notes. If you’re already using Remember mode, you can import your old templates to the new org-capture templates. To convert your org-remember-templates, run the command:

M-x org-capture-import-remember-templates 

Here’s an example of two templates I always set up with org-capture:

;; Org Capture
(setq org-capture-templates
      '(("t" "Todo" entry (file+headline (concat org-directory "/gtd.org") "Tasks")
         "* TODO %?\n %i\n")
        ("l" "Link" plain (file (concat org-directory "/links.org"))
         "- %?\n %x\n")))

The first one will capture a TODO entry under the headline Tasks inside the file gtd.org in my org directory. I’ll use this one whenever I want to add a todo task quickly. The second one will copy the contents of my clipboard and will paste it as a new entry in the file links.org as a list item without any header and will have my cursor ready to type the item list description. This one I use it when I want to save a link url, typically a bookmark from the browser, in my links.org file to consult it later.

To access each template, a key has been set for each. When org-capture is run, it will prompt you what you want to capture. Press ‘t’ for a Todo or press ‘l’ for a link. You can add more templates to suit your needs with the extensive template options described in the Org manual.

org-capture

Using org-capture

Finish the capturing process by typing C-c C-c which runs org-capture-finalize and the capture buffer will disappear so you can continue what you were doing without interruption.

Note photo by S@Z on Flickr

About the author

Gabriel Saldaña Gabriel Saldaña is a web developer, photographer and free software advocate. Connect with him on and Twitter

Creative Commons License
Quick note taking with Emacs and Org Capture by Gabriel Saldaña, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Share Alike 2.5 Mexico License.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>