R – Custom Agenda View in Org Mode: Combining Dates and Tags

emacsorg-mode

I would like to create a custom agenda in org mode that will show me all the TODO items with a particular tag that are either overdue or due today.

However, I can't find any search function that will allow me to combine the two. Am I missing something, or am I trying to use the tool incorrectly?

Best Answer

You can use org-agenda-filter-apply. In addition, I found it useful to hide tags in the agenda for current day or week. As the result you have something like that.

(setq org-agenda-custom-commands
      `(("o" "tasks with tag1"
         ((org-agenda-list)
          (org-agenda-filter-apply ,(list "+tag1")))
         ((org-agenda-remove-tags t)))
        ("d" "tasks with tag2"
         ((org-agenda-list)
          (org-agenda-filter-apply ,(list "+tag2")))
         ((org-agenda-remove-tags t)))
        ))

You show tasks with tag1 using Ctrl-a-o and tasks with tag2 using Ctrl-a-d

Related Topic