Brool brool (n.) : a low roar; a deep murmur or humming

Using Org Mode with GTD

| coding gtd orgmode org todo

Both Org Mode and Planner Mode are really neat ways to maintain a schedule, and almost sufficient reason to use Emacs in and of themselves. I’ve tried them both, and have found that Org Mode integrates easier with the way that I prefer to work.

Make sure you see the Org Tutorial and the excellent GTD with Org Mode site. What follows are just some quick notes for a particular configuration that worked for me.

First of all, be sure to set up your .emacs as recommended in the aforementioned Org tutorial:

(add-to-list 'load-path "~/emacs/org")
(require 'org)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)

I prefer to have my personal and work stuff in separate files, with a master file that points to all of them. This makes it easier for me to concentrate on only work when I’m at work, so…

(setq org-agenda-files 
      (list "~/org/gtd.org" "~/org/work.org" "~/org/personal.org"))

Each .org file has the following header:

#+TAGS: WORK (or whatever)
#+TYP_TODO: TODO MAYBE WAITING NEXT DONE
#+STARTUP: showall
#+STARTUP: hidestars

Finally, some configuration tweaks that work for me:

; I prefer return to activate a link
(setq org-return-follows-link t)

(setq org-agenda-custom-commands 
    '(("w" todo "WAITING" nil) 
    ("n" todo "NEXT" nil)
    ("d" "Agenda + Next Actions" ((agenda) (todo "NEXT"))))
)

(defun gtd ()
   (interactive)
   (find-file "~/org/gtd.org")
)

Daily

Now, to see the day’s agenda, you can do C-c a for an overall agenda. While at work, I have the work.org file in a buffer window; to see what I’m working on, I go to the work.org file and do a C-c a 1 followed by C-a d. This a) narrows the task list to those in work.org, and b) shows me all scheduled tasks and all tasks that are marked as “NEXT.”

Weekly

At the end of every week I go through the different files and use the Org Mode archive stuff. Sometimes I move it into an archive file, sometimes I don’t; it kind of depends how many other things are going on with that particular project.

Miscellaneous

I keep all my organization stuff on a USB drive, and for convenience also have links to encrypted files that I might need to refer to from time to time. I keep bcrypt on the USB drive, and added the following Elisp hack:

(defun open-encrypted-file (fname)
  (interactive "FFind file: \n")  
  (let ((buf (create-file-buffer fname)))
    (shell-command 
     (concat "echo " (read-passwd "Decrypt password: ") " | bcrypt -o " fname)
     buf)
    (set-buffer buf)
    (kill-line)(kill-line)
    (toggle-read-only)
    (not-modified))
  )

And, with an Elisp link in my gtd.org, I can easily see my passwords:

[[elisp:(open-encrypted-file "~/org/passwords.txt.bfe")][Passwords]]

Discussion

Comments are moderated whenever I remember that I have a blog.

Xavier Maillard | February 28, 2007
Hi, This is a great clean and simple setup for such a big task that is GTD ! Bravo.
Reply
Roman Lagunov | December 18, 2007
Hi, Thanks for really usefull hints. I'm recently start to use org mode, and your article is very helpfull.
Reply
Gour | March 12, 2008
Hi! I'm starting with GTD & Emacs and like your approach to have two separate files for specific area. Added some specific TAGS to my headers, but I wonder how do you use gtd.org as master, i.e. gtd() function invokes gtd.org so I'd like to know if you can enlighten me a bit with your usage of gtd.org master file? Sincerely, Gour
Reply
tim | March 18, 2008
@Gour: Sure. My gtd.org just refers to the other files -- it gives me a simple way of categorizing the different things. For example, my gtd.org is: #+STARTUP: showall #+STARTUP: hidestars [[file:work.org][Work]] [[file:personal.org][Personal]] [[file:notes.org][Notes]] [[elisp:(open-encrypted-file "~/org/contacts.txt.bfe")][Contacts]] [[elisp:(open-encrypted-file "~/org/notes.txt.bfe")][Notes]] [[elisp:(open-encrypted-file "~/org/passwords.txt.bfe")][Passwords]]
Reply
Gour | March 18, 2008
Hi Tim! Thanks a lot for sharing ;) Sincerely, Gour
Reply
joost | May 30, 2008
Hi, I see that you use orgmode and an iPhone. How do you integrate the use of an iPhone with orgmode? I'd be happy to see an Emacs port to iphone, but maybe a lightweight interface wich generates orgmode transactions is a better idea. regards, Joost
Reply
Dawson | June 10, 2008
Love the idea for the encrypted files. Got it running just find but I did have to make a minor modification. In the line: (concat "echo " (read-passwd "Decrypt password: ") " | bcrypt -o " fname) I had to remove the space before the pipe as that space was getting sent to bcrypt and I was getting a message that I had supplied the wrong key. I did this on XP with gnu emacs 22.1.1. Maybe when I try it on the linux box later that won't come up. Thanks for the tip.
Reply
Georg Greve | June 22, 2008
Very nice setup, thanks a lot. The encrypted files is a neat hack. Here is my "super lazy" setup, which people might find informative: I use my Fellowship crypto card (see http://fellowship.fsfe.org/card) which is an OpenPGP compliant card and hooks into GnuPG (also available here: http://www.g10code.de/p-card.html). My files are encrypted with GnuPG and with the help of a properly configured GnuPG agent in the background there is no need for passwords anymore. As long as the smart card is inserted and the GPG agent knows the PIN, the standard Emacs "find-file" command will transparently decrypt and open the file with no intervention on my side. Once I take out the card, there is no way to read the file. (Naturally I also use the card for email signing & decryption, as well as SSH authentication.)
Reply
Viona | October 11, 2008
Hi, thank you for these tips. I am trying to install personal reference system. The one thing that irritates me, it's when I make a link to elisp like [elisp:(dired "~/prog/cc")] it works just fine BUT aquamacs always prompts me if I want to execute elisp. If you had the same issue, do you have an idea how to get rid of it? Thank you!
Reply
Viona | October 11, 2008
upd: it seems it suffices to add this to .emacs (or Preferences file in Aquamacs) (setf org-confirm-elisp-link-function nil) But thanks anyway for some ideas!
Reply
Ben Alexander | October 23, 2008
It looks like your 'default setup has a bug' Shouldn't (define-key global-map "C-cl" 'org-store-link) (define-key global-map "C-ca" 'org-agenda) be (define-key global-map "\C-cl" 'org-store-link) (define-key global-map "\C-ca" 'org-agenda) with a backslash in front of the C-c? (Of course, I've no idea if the backslash will show up in this comment, so I'm going to look dumb if it's missing!)
Reply
Dave Abrahams | June 09, 2009
You talk about `C-a 1' and `C-a d' but `C-a' has a default binding of "beginning-of-line". Wondering just what you intended?
Reply
tim | June 12, 2009
@Dave: Ah, you're right, that should be Ctrl-c 1 and Ctrl-c d, thanks. Changing the text.
Reply
Morves | July 21, 2009
The tutorial link is broken. I believe the oficial URL for David O'Toole's tutorial is: http://orgmode.org/worg/org-tutorials/orgtutorial_dto.php. Nice article, tim.
Reply
tim | July 22, 2009
@Morves: Thanks for that, updating the article now.
Reply
Add a comment