Next: Setting Options, Previous: Storing searches, Up: Custom agenda views
Another possibility is the construction of agenda views that comprise
the results of several commands, each of which creates a block in
the agenda buffer. The available commands include agenda for the
daily or weekly agenda (as created with C-c a a), alltodo
for the global todo list (as constructed with C-c a t), and the
matching commands discussed above: todo, tags, and
tags-todo. Here are two examples:
(setq org-agenda-custom-commands
'(("h" "Agenda and Home-related tasks"
((agenda)
(tags-todo "HOME")
(tags "GARDEN")))
("o" "Agenda and Office-related tasks"
((agenda)
(tags-todo "WORK")
(tags "OFFICE")))))
This will define C-c a h to create a multi-block view for stuff you need to attend to at home. The resulting agenda buffer will contain your agenda for the current week, all TODO items that carry the tag `HOME', and also all lines tagged with `GARDEN'. Finally the command C-c a o provides a similar view for office tasks.