2015-09-26 A few org-agenda hacks

Like many Emacs users these days, I heavily depend on Org-mode. One particular feature I use a lot (in fact, more and more) is the agenda. However, in the default setup, it was not the best experience for me.

For starters, I found out that instead of plain C-c a a (to get my agenda for the next few days), I always pressed C-c a a o (to display the agenda in a sole window). Only recently it struck me that it doesn’t make any sense, and decided to automate this behavior. Basically, this boiled down to finding the right knob to turn:

(add-hook 'org-agenda-finalize-hook (lambda () (delete-other-windows)))

Of course, I also set up some more “standard” agenda features.

Since I want my agenda to warn me about any dangers lurking on the horizon, like my wife’s birthday (just kidding: this one I do remember, together with our wedding anniversary;-)), the default org-agenda-span of one week was not enough for me.

(setq org-agenda-span 14)

Then, starting the agenda on Monday (the default setting for org-agenda-start-on-weekday) is nonsensical: I have no idea why I could want the agenda to start on any day but today, and even if I decided to have it started at the beginning of the week, Monday does not make sense, either.

(setq org-agenda-start-on-weekday nil)

Also, I sometimes have events with a precise hour (as opposed to the date alone) in the agenda, and I found the time-grid feature rather distracting – so I turned it off.

(setq org-agenda-use-time-grid nil)

Finally, since the lines in the agenda are sometimes quite wide (especially with tags), I decided I needed a visual aid telling me which line I’m in. That was easy, however:

(add-hook 'org-agenda-finalize-hook (lambda () (hl-line-mode)))

And this is pretty much it. (Not really, I have some setup related to the global TODO list, but this will wait for another post.) Even though all that is in the manual, I hope that this rundown of my agenda setup might be helpful for someone.

CategoryEnglish, CategoryBlog, CategoryEmacs, CategoryOrgMode