org-agenda-custom-commands
org-agenda-custom-commands is a variable defined in `
org-agenda.el
'.
Its value is
(("n" "Agenda and all TODO's"
((agenda "")
(alltodo ""))))
- This variable may be risky if used as a file-local variable.
Documentation:
Custom commands for the agenda.
These commands will be offered on the splash screen displayed by the
agenda dispatcher M-x org-agenda. Each entry is a list like this:
(key desc type match settings files)
key The key (one or more characters as a string) to be associated
with the command.
desc A description of the command, when omitted or nil, a default
description is built using MATCH.
type The command type, any of the following symbols:
agenda The daily/weekly agenda.
todo Entries with a specific TODO keyword, in all agenda files.
search Entries containing search words entry or headline.
tags Tags/Property/TODO match in all agenda files.
tags-todo Tags/P/T match in all agenda files, TODO entries only.
todo-tree Sparse tree of specific TODO keyword in *current* file.
tags-tree Sparse tree with all tags matches in *current* file.
occur-tree Occur sparse tree for *current* file.
... A user-defined function.
match What to search for:
- a single keyword for TODO keyword searches
- a tags match expression for tags searches
- a word search expression for text searches.
- a regular expression for occur searches
For all other commands, this should be the empty string.
settings A list of option settings, similar to that in a let form, so like
this: ((opt1 val1) (opt2 val2) ...). The values will be
evaluated at the moment of execution, so quote them when needed.
files A list of files file to write the produced agenda buffer to
with the command `org-store-agenda-views'.
If a file name ends in ".html", an HTML version of the buffer
is written out. If it ends in ".ps", a postscript version is
produced. Otherwise, only the plain text is written to the file.
You can also define a set of commands, to create a composite agenda buffer.
In this case, an entry looks like this:
(key desc (cmd1 cmd2 ...) general-settings-for-whole-set files)
where
desc A description string to be displayed in the dispatcher menu.
cmd An agenda command, similar to the above. However, tree commands
are not allowed, but instead you can get agenda and global todo list.
So valid commands for a set are:
(agenda "" settings)
(alltodo "" settings)
(stuck "" settings)
(todo "match" settings files)
(search "match" settings files)
(tags "match" settings files)
(tags-todo "match" settings files)
Each command can carry a list of options, and another set of options can be
given for the whole set of commands. Individual command options take
precedence over the general options.
When using several characters as key to a command, the first characters
are prefix commands. For the dispatcher to display useful information, you
should provide a description for the prefix, like
(setq org-agenda-custom-commands
'(("h" . "HOME + Name tag searches") ; describe prefix "h"
("hl" tags "+HOME+Lisa")
("hp" tags "+HOME+Peter")
("hk" tags "+HOME+Kim")))
You can customize this variable.