Capture ideas and more with org-capture

I've recently started using org-capture. I heard great things about it long ago but never dag in on what it was, until I recently watched Rainer König's series on Getting yourself organized with OrgMode, which I can't recommend enough.

In this article I'll explain how I understand it and use it. I'll leave a trick on the sleeve for a future post.

What is org-capture?

org-capture is a way to take notes in Emacs in an unobstructive way.

It allows you to open a buffer to enter a note and it'll store it in the correct place based on the type of note you've selected. I must say that I took the term note from it's documentation, but I think that it's a very loose definition of the word. After you save the note, the capture buffer gets out of the way and Emacs returns to it's previous state.


To configure it, we need to add some code to our configuration.

Here's an excerpt of mine. It defines a key to invoke the note type, the type, the file it needs to be added to and the template.

  (setq org-capture-templates
          ("i" "Post idea"           entry (file "~/Dropbox/wordpress_rake/")
           "* %?\n")
          ("w" "Woodworking project" entry (file "~/Dropbox/org-files/")
           "* TODO %?\n")

In my case, I have a template for post ideas for my blog and woodworking projects for me to make.

To understand what all of this means, lets try it out.

Capturing stuff

First, lets define a keybinding for invoking it. The documentation talks about using C-c c (which is inactive by default), but I prefer H-o because I like my custom keybindings to be bound to the Hyper key.

As soon as we press H-o we get prompted to select a template

  Select a capture template

  [i] Post idea
  [w] Woodworking project
  [C] Customize org-capture
  [q] Abort

If we press i, we get an org buffer with our template in place and some instructions on top

  Capture buffer.  Finish 'C-c C-c', refile 'C-c C-w', abort 'C-c C-k'

We can now type the post idea out and press C-c C-c to add it to the post ideas file we defined in the template configuration

  Capture buffer.  Finish 'C-c C-c', refile 'C-c C-w', abort 'C-c C-k'
  ,* org-capture
    - Basic
    - Advanced

And it'll be added to the bottom of the list

  ,#+STARTUP: showall

  ,* Compilation types in Emacs
  ,* Habitica
  ,* Dvorak
    - Keyboard
    - Swift key
    - Klavaro
  ,* yield_self vs tap
  ,* My default Ruby packages
  ,* Awesome print
  ,* org-capture
    - Basic
    - Advanced

If we want to add a Woodworking project, we proceed the same way, but pressing the w key on the second step and it will add our project to the correct file.


I don't want to make this posts too long, I prefer to present the basics and expand on future posts. Most likely, I'll do a small series about this, so stay tuned.

For now, you know the absolute basics and you can start trying it out.

Thanks for reading.