Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom Agenda View in Org Mode: Combining Dates and Tags

Tags:

emacs

org-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?

like image 762
Wellington Grey Avatar asked Dec 05 '09 06:12

Wellington Grey


2 Answers

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

like image 77
Oleg Pavliv Avatar answered Nov 20 '22 22:11

Oleg Pavliv


The org-agenda-list is meant to do this. You can invoke it with C-c a a. It displays the agenda for the week, which includes all tasks that are due in the week or are overdue. You can narrow it down to see all tasks scheduled today, due today and all tasks overdue by pressing d Further, if you only wish to see tasks with a particular tag, you can do so by pressing / and choosing the tag you want to see.

This way you'll get what you want.

like image 44
vedang Avatar answered Nov 20 '22 22:11

vedang