Faster Unified TODO List in Emacs

2026-02-06

Over the past year, I have successfully combined all my TODO lists into a single Org-roam notebook, which is just a bunch of .org files, stored inside a single directory. Simple: I can back them up by running rsync. I can version them using Git. I can move them around safely using Tomb. I can navigate to any of them or add a new note using the org-roam.el Emacs package. I can use usual plaintext search tools such as ripgrep to find words or phrases in files. I really like this setup, and use it at work as well. Org-agenda is Org-mode’s native capability of showing a daily or weekly TODO list called an Agenda: It contains the tasks that are scheduled for today or have their deadline in a few days. The time that it takes to build the agenda using native Org-mode is too long: For my notebook with about 80-90 files with TODO items, it takes 150 seconds! This makes the whole setup unusable. Emacs is single-threaded and is not able to opening 100s of files and look through them in a performant manner. Two packages, org-super-agenda and org-ql, helped me solve this issue, and reduced the time taken to open the daily agenda to under 10 seconds.

org-ql provides a flexible query language to fetch the tasks which will be displayed in the agenda. And it provides a helpful wrapper that allows the user to dynamically define the list of files to search during runtime. Org-mode’s native agenda accepts a list of files and directories to search for TODO items. It will look through all files. Even the files that don’t have any TODO item in them. Excruciatingly slow! One quick optimization is to use ripgrep to condense this full list of files into just the ones that contain a TODO item.

org-super-agenda focuses on grouping the tasks that are to be displayed as part of the agenda. For instance, I have four groups:

  1. Tasks with a deadline: Important, urgent
  2. Periodic tasks: Important, not time-consuming (Getting Things Done!)
  3. Everything else that is scheduled
  4. Everything else which is in the WAITING state
    1. I don’t have anything to do on these tasks, but usually, if I see that a task has been here for a long time, I may want to check in on what’s going on.

org-super-agenda groups tasks that are gathered by org-ql. This is great: I can use both independently as well, and I used only org-super-agenda for some time at work. But adding org-ql was a logical next step.

The changes for this in my Emacs configuration are in these two commits:

  1. feat: Start using org-ql to see daily agenda
  2. feat: Use org-ql instead of native org-agenda for performance

It would be great if someone would wrap all this up by creating a new package. I am sure this would be useful for other people who are on slow laptops but have a lot of files in their org-roam notebook, only a small subset of which have TODO items.