getting things done with mutt

Posted on 14 October 2006
Tags: mutt, gtd

Edit 2007-10-29: a reader asked me to add the gtd and mutt tags to this article. Thought I might take advantage of the situation to tidy up the article a little.

You've probably heard about Getting Things Done (GTD) and lifehacks by now. If not, it provides a simple, but non-obvious algorithm for human beings to stay on top of things in a stress-free and effortless manner. My implementation of the GTD spec is working pretty well, but it has one huge, gaping hole: e-mail. The following is a collection ideas for plugging the hole and adapting my favourite mail client, mutt, to be more GTD friendly.

basic next action labeling (X-Label)


My mail processing workflow is GTD inspired -- interestingly queues work better for email whereas stacks work better for real life -- but one major flaw is that when I save a message to =ACTION. The problem is that I was using paper to write my actions down. Paper's great, but it's not very convenient for something which is inherently computer-based (it means dragging my notebook out of my backpack, for example). What I needed was some way to associate email messages with actions.

Fortunately, a fellow mutt user has made a small patch to add an onboard X-Label editor to mutt. This is almost perfect for annotating messages with Next Actions and Waiting Fors. It does not compile against the mutt [1.5.13] that's in MacPorts, but I have updated the patch and Portfile so that it does. I will put it on the web if somebody's interested.

The following should go into your muttrc, so that to set a next-action, you simply hit 'y':

bind pager y edit-label
bind index y edit-label


To make this more useful, I also add the following white on red highlighting so that the next action is the most visible part of the message:

color header white red "^X-Label:"


Filing to =ACTION (user-input)

I currently have the following set in my muttrc so that Ctrl-A saves the current message in =ACTION and Ctrl-W saves it in =WAITING (=WAITING is problematic, a bit of a black hole).
macro index \Ca "<save-message>=ACTION"
macro pager \Ca "<save-message>=ACTION"
macro index \Cw "<save-message>=WAITING"
macro pager \Cw "<save-message>=WAITING"

What I would like to do is script it just a little bit more so that Ctrl-a asks me what the next action is, and then saves it in =ACTION. What I need is a mutt feature (maybe it already exists) which I call <user-input> (which basically means, wait for the user to type something and hit enter). Then I can extend my macros like so (pager ommited):
macro index \Ca "<edit-label><user-input><save-message>=ACTION"
macro index \Cw "<edit-label>WF: <user-input><save-message>=WAITING"

I guess saving a couple of keystrokes isn't that big a deal. I could just have a workflow where first I hit 'y', plug in my next action, and then I hit 'Ctrl-a' (this is what I do now). But it would be nice if this was enforced by my keybindings. Note that in order for this not to be horribly irritating, the macro system should stop processing the macro if the user hits 'Ctrl-c'. In other words, if I change my mind about setting a next action, it should just stop there and not file my mail for me automatically (which would mean I'd have to fish it out, etc)

Next Action counter

One thing I would like to have whenever I'm looking at my mail is to have a small, discreet counter telling me how many next actions and waiting fors I have. You know that bar on the bottom of the screen in mutt? That's where I'd put it, on the right. ----- Actions: 9 WF: 15 ----. A little reminder like that would be great!

Next Action preview

Another thing which might be useful is to be able to 'preview' a message, but only showing its next action. When i'm in index mode of mutt, for example, below that bar on the bottom of the screen, I would like to have one line showing me the value of the X-Label.

that's all!

That's all I have for now. Please comment if you have any other ideas or mutt-gtd tips.

Navigation

Comments