Task Management using Org Mode
Using Org mode for Task Management.

Table of Contents

Searching for the perfect task management software

For a long time I have been looking into various task management applications, searching for something to help me structure my work and become more productive. I have tried Trello, that one from Microsoft, and a few others. The main problem that I have with all of them is that the process of creating and organizing tasks is very click intensive, which I hate, and they also never have all the features that I want. I think I finally found out something that is as close to perfect for me as it can get.

Why use Org Mode for task management

Emacs Org Mode is the best task management tool for me, for the following reasons.

Firstly, since I use Emacs as my main editor, I can quickly jump to my agenda file and start editing my tasks. This is effortless with just a set of convenient bindings (also consult has a few very useful searching functions). Additionally, I can quickly get an overview of all the tasks that I have defined using the Org Mode agenda view.

Secondly, it's easy to set up effort estimates and deadlines. This is very helpful, because in order to make any effort estimate I first need to define a task in a very concrete way, meaning that every task has a specific result that I want to achieve. As a result, since the tasks become much less vague, it also becomes more natural to break them into several subtasks.

Finally, Org Mode has a built in clocking functionality. This feature is particularly useful for me, because it "forces" me to commit to a particular task while the associate timer is running. Many times I sat at my laptop with some objective in mind, only to get lost browsing Reddit or something else. Knowing that the timer associated to a task is ticking helps mitigate this and makes me stay focused. It's also useful to get an overview of how much time I spent doing what at a later stage.

The only thing that was missing for my perfect setup was a pomodoro timer. I am aware that there is a pomodoro package, but I wanted to see if it was hard to code my own.

Coding an Org Mode Pomodoro like timer functionality

For the Pomodoro timer implementation, I pretty much want Emacs to emit a beep and stop the timer that is running after a certain time as passed (20 mins). This is not a complete Pomodoro implementation, since it does not time intervals, however is just really what I need. Coding this was not hard at all, thanks to the convenient Org Mode hooks.

See the code below.

  (defvar pomodoro-work-length-min 20 "number of minutes for the work length")
  (defvar pomodoro-work-length-sec (* 60 pomodoro-work-length-min) "number of secs for the work length")
  (defvar pomodoro-current-timer-process nil "The current timer process for the pomodoro")
  (defvar pomodoro-cli-sound-executable nil "The executable to run the pomodoro sound")

  ;; I use Linux on my personal laptop and Mac Os for work
  (if (string= system-type "gnu/linux")
      (setq pomodoro-cli-sound-executable "play")
      (setq pomodoro-cli-sound-executable "afplay")
      )

  (defun play-bell-end-clock ()
  "Plays a bell sound and closes the current timer"
     (start-process "Pomodoro Bell" nil pomodoro-cli-sound-executable (expand-file-name "~/.emacs.d/pomodoro.wav"))
     (cancel-timer pomodoro-current-timer-process)
     (setq pomodoro-current-timer-process nil)
  )

  ;; Setup the org-clock-in hook
  (add-hook 'org-clock-in-hook (lambda () (setq pomodoro-current-timer-process (run-at-time pomodoro-work-length-sec nil 'org-clock-out))))
  (add-hook 'org-clock-out-hook 'play-bell-end-clock)

Conclusion

I am very happy with this task management setup using Emacs. Feels like I finally found the answer for something that I have been looking for a long time. Now when I sit on my laptop, I just press a key to choose the task that I want to work on, and work on it until the timer beeps, assuming of course that I had prepared the task list before hand. Preparing the tasks is also incredibly easy, because it's just editing a text file, which I can go to with a key press. Org also has the functionality to hide tasks that are already completed.

The only thing it's still missing is cross-device sync. It would be not hard at all for me to set this up using maybe Git to version my task file, but it's not a big problem so far so I just keep two separate task files, one on my personal laptop and one on my work laptop.