As the title suggests, I expect this to be the first in a series of articles about how I use org-mode. Right now I’m at the point where I’m really starting to see the light. I’ve known about org-mode for several years, but only recently decided to give it a serious try.

Since I started my own company, I have been looking for a simple, effective tool for keeping track of all the various projects I am working on. I’m already using Harvest to track billable hours. For detailed planning of each sprint in an ongoing project, I love Pivotal Tracker, and I’m going to stick with that for the time being.

But I needed something else to get an overview of all those projects and ideas that are floating around in various stages of completion. Both in my head, in emails, on my hard drive and in Google Docs. Something to record all sorts of metadata about each project (estimates, ideas, contracts) as well as actual work artifacts (pointers to code commits, design docs, links to user stories).

I’m going to skip the details, but I briefly evaluated Highrise (for projects and tasks), but quickly discarded it. I may explain why in a separate post, but the gist of it is just that the workflow didn’t really feel natural to me.

So I decided to have another go at org-mode, and this time I think I nailed it!


Org-mode is an Emacs major mode which provides features for organizing information in a hierarchical manner. Lists of items can be nested into sublevels, and each item can contain plain text contents. There is support for links to URLs and to places in other files.

There is also support for lots and lots of other stuff. A much better introduction can be found at the Org-mode website.

File structure

One of the things I found hard to begin with was file organization. How do you layout the directory structure? Should you create a folder per project, with files like “”, “” etc. inside each? Or maybe organize the files by contact?

Eventually, I ended up simply having a bunch of files in a single directory:

Side note 1: is of course encrypted and, incidentally, replaces my use of 1Password (which worked fine but I never bothered to learn 90% of its features so the UI felt very bloated to me).

Side note 2: The file collects stuff I capture with remember.el.

Everything related to projects (whether active, planned or potential), goes into Each project just gets a top-level item with related information organized into sub-items.


This was the real revelation for me: Links.

It sounds trivial, and it is, but linking to all kinds of stuff seems to be one of the best ways for me to organize my work. I have no idea why I didn’t realize this sooner. One of the reasons I tried out Highrise was because of its support for organizing emails. I still think that this is pretty clever, but org-mode is just simpler and more versatile.


The text “Data model” links to the Google Doc containing the data model description. Likewise, the text “Mail about data model” links to an email (in Gmail) I sent to the client about the data model.

This is a very simple building block, but very powerful. I can insert into my project any resource I can link to, which means almost anything these days. Commits in Github, web pages (obviously), documents, spreadsheets, presentations, video clips.


Org-mode is ideal for breaking down major tasks into subtasks, so it makes sense that it also has support for attaching estimates to these tasks.

What you see here is column mode in action. The estimates on the lowest level tasks (cyan items) are entered by hand, and Org-mode then sums up these values in the higher level items, ending up at the root with a total estimate of 36 hours.


Highrise has support for tasks, and I’m sure it’s good.

However, I created support for tasks just by creating the file I really don’t need anything more fancy than a list of text strings right now. When I do, org-mode has lots of nice features for tracking deadlines, time spent on tasks etc.

Exporting to PDF

This is really easy once you have everything set up.

Suppose I want to export this very simple file:

This is done with the command org-export-as-pdf, and here is the resulting PDF.

Next steps

I’m not sure, what do you think? Any suggestions for improvements on these workflows would be greatly appreciated. Just drop a comment.

If you’re OK with dark text on a light background, you can stop reading now.

Personally, I have always preferred a dark background when coding, so obviously my Emacs theme is a dark one. And switching back and forth between Emacs and is much easier on the eyes if the background in Terminal is dark too.

Unfortunately, the Terminal theme I like best (“Pro”) doesn’t agree with ANSI colors. Especially the color blue becomes hard to read:

Many people resolve to using iTerm instead, but I’m not really a fan of it. The shortcuts for switching between tabs are on the arrow keys, much slower than the Terminal shortcuts. And maybe I’m missing something, but I never managed to reconfigure those shortcuts. To be honest, I think the iTerm configuration UI is a bit of a disaster.

So, I discovered by accident that I can actually tweak the background color in Terminal to make the blue color readable.

This is the color picker for the background color. The vertical slider will adjust the brightness of the background, right? Well, it turns out that the brightness of the colored text is also adjusted, but in intervals. The blue color becomes brighter to begin with, then falls back to the original color at about 10% on the slider. The same happens for the other colors, but at different points on the slider. For example the red color switches at about 20% and the magenta a bit after that.







What works best for me is setting the slider at about 9%, just before the blue color falls back.

It may be hard to see from the pictures above, but this makes a huge difference, at least on my monitor. Reading the colored text is no longer a strain on the eye.

Although I basically agree with the Pragmatic Programmers’ old advice about learning a new programming language each year, the time has come for me to slow down.

I have been programming for many years and I know a lot of different languages. Many of them are boring and similar (eg. Java, C#, C++), some are not boring but similar (Ruby, Python) and some are completely different (Clojure, Common Lisp, JavaScript).

I’m well aware that I could learn a lot by studying Haskell or diving deeper into Javascript, but I’m going to take this year off.

Why? Very simple. I still have so much to learn from Clojure. I could write at length about the virtues of functional programming or about how Clojure takes advantage of the JVM. I could go on and on about the REPL, Java libraries, infinite lazy sequences (list of all primes, anyone?), the exceptionally smart community members and so on. But others have already done this much better than I could. For a great introduction to the language itself, go watch the intro videos by Clojure creator Rich Hickey. For all the surrounding stuff, there are lots of interesting blogs to read.

Likewise, although I have a lot of experience with both Ruby and Rails, I’m not done learning here either. Especially, I need to tune my Emacs to achieve better code navigation and debugging support.

Two languages that I really like. This year, I’m going to focus, not diversify.

Git autopush

January 10, 2011

Some of my Git repos are very, very simple. The commits are all on master, no branches in play at all. And the workflow is just as simple as back in the bad old Subversion days: Pull from the repo, commit some stuff, push it.

A good example is the repo I use to store my Project Euler solutions. It is only used by myself and I always want to push after committing.

So I set out to create (and complete within 10 minutes) my least ambitious project so far: A bash script to add “git push” as a post-commit hook in the current Git repo. You can find it on Github, but the business part of it is right here:



if [ -d $HOOKS_FOLDER ]; then
    if [ -f $POST_COMMIT ]; then
        echo "Post commit hook already exits, please add 'git push' manually in .git/hooks/post-commit"
        exit -1
    echo "git push" > $POST_COMMIT
    chmod 755 $POST_COMMIT
    exit 0
    echo "This command must be run in the root of a Git repository."
    exit -1

Suggestions welcome for improving the script. I think this is the first multiline Bash script I ever wrote, so I expect it to be flawed.

Ah yes, and before you comment: I know that this is not the shiniest of Git workflows, I know that branches are cheap etc. I love all the cool features of Git but sometimes I just don’t need them.

However I do not know if Git already has this functionality built in via some configuration option?

Using Gmail efficiently

January 7, 2011

Most of us get a lot of email.

If you’re using Gmail, here are a few simple tips on how to get a better overview of your crowded inbox. These all work well for me, but feel free to pick and choose, they’re not related.

  1. Archive anything you won’t need again anytime soon
  2. Star items that you need to respond to
  3. Use labels and filters to help finding messages visually when looking through your inbox

Tips in action



When you archive a message (shortcut: e), it disappears from your inbox, but can still be found under “All mail” (shortcut: g a).

If you fail to do this immediately, you’ll soon end up with a lot of crap littering your inbox. To clean up, move the cursor between messages (shortcuts: j and k), select each message to be archived (shortcut: x), then archive all selected messages (shortcut: e).


If you read a message that you need to respond to, do so right away or “star” it (shortcut: s) to make it appear in the Starred folder (shortcut: g s). When you have some time to spare, just check this folder and be sure to remove the star (shortcut: s) on each mail after responding to it.

Using labels

Set up labels for a few broad categories of mails you get. Don’t be too specific – labels in 15 different colors throughout you mailbox are not helpful.

Mails can be labelled manually, either when reading the mail (shortcut: l + the first few letters of the label you want) or in the overview by selecting them first. This is tiresome and you’ll probably end up forgetting from time to time.

Much better: Have Gmail label them automatically when received. Under “Settings -> Filters”, you can setup multiple filters that match incoming mail by sender’s mail address (full or just domain), subject, content keywords etc.

By the way, an undocumented feature here is that you can use OR to specify multiple values. So this is a valid filter:

Matches: from:( OR OR
Do this: Apply label "Working Bits"

And by the way…

Did you notice that I mentioned the keyboard shortcut of each command above? This is actually the important stuff, the tips were just to get your attention.

OK, not really, but using the shortcuts in Gmail is by far the biggest single productivity gain I have found so far. I never use the mouse anymore – everything I need to do can be done with shortcuts, and it is much, much faster.