Track meeting tasks with emacs agenda

In my productivity system post I talked about a custom view I use to track tasks than need to be talked about in my weekly meetings. I use two different tags to accomplish this:

  • active
  • meeting

Today we’ll take a look at how this works by first showing the whole chunk of code, then working through it so we understand what’s happening. The code below would go in your config.el file.

;; Custom org view for tagged items for a meeting
(after! org
  (setq org-agenda-custom-commands
        '(("x" . "My custom views")
          ("xa" "Tagged: active or meeting"
           tags "+active|+meeting")
          ("xt" "TODO only: active or meeting"
           tags-todo "+active|+meeting"))))

Doom after!

Doom provides a set of helper macros intended to manage load order and configuration in its lazy-loaded environment. after! is one that says don’t run the commands inside the brackets until after the org package has been fully set up. This avoids load-order issues where org-agenda-custom-commands could be reset later when Org or Doom finishes initializing.

The best write up Doom macros I’ve been able to find is in Discourse which includes best practices of one of the Doom maintainers.

Configure org-agenda-custom-commands

Org Mode expects that we’re going to customize our agenda commands so provides org-agenda-custom-commands as a variable that can be customized. setq assigns a value to the org-agenda-custom-commands variable, replacing its existing value.

Because we used after! we don’t have to worry that our variable will be overwritten later by Doom or Org Mode, though if you defined the variable again later it would overwrite earlier definitions. If you want additional custom views, you must extend this list rather than redefining org-agenda-custom-commands again, or earlier entries will be lost.

Defining the Agenda Commands

Next we set a prefix key of x which houses all our custom views away from the rest of the built in views in Org Mode’s Agenda view. You can see this visually when we open an Agenda view and see the x at the bottom. Once we press that we’ll see our custom tags.

Once you’ve pressed x to reveal the subcommands you can press a to see a list of all headings, notes, DONE or TODO headings, tagged with our tags of meeting or active. t will show you only TODO headings that have the same tags.

  • [ ] x-custom-views.png

These lines created a tag based search in Agenda view. You could do this every time manually, but if you’re using a search more than once a week then you should automate it.

Note that the notation for searching tags +active is different than the syntax used to tag an item :active:. Using +active is using Org’s search syntax instead of Lisp’s syntax. The | character should be familiar to programmers and means OR. So we’re searching for items tagged active OR items tagged meeting.

Lisp is the programming language of Emacs.

Why use this?

While you could move items to a specific file for meetings, using a custom Agenda view allows you to search across files. 99% of my meeting content is from my single proudcity.org file for work, but by setting it up this way I can ensure that if my file organization changes in the future my workflow is not affected.

0 responses to “Org Mode Tags +Agenda: My Real Meeting Workflow”

Leave a Reply

Your email address will not be published. Required fields are marked *

To respond on your own website, enter the URL of your response which should contain a link to this post’s permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post’s URL again. (Find out more about Webmentions.)