What is the preferred method of building (viewing) a custom agenda without modifying org-agenda-custom-commands
? I am hoping that there is a function like org-agenda-list
or org-todo-list
that accepts a custom agenda command definition like those that would be added to `org-agenda-custom-commands.
Edit: Essentially just bypassing the org-agenda dispatcher / stored custom commands
An example taken from the org-mode manual:
(setq org-agenda-custom-commands
'(("O" "Office block agenda"
((agenda "" ((org-agenda-ndays 1)))
(tags-todo "+PRIORITY=\"A\"")
(tags-todo "computer|office|phone")
(tags "project+CATEGORY=\"elephants\"")
(tags "review" ((org-agenda-files '("~/org/circuspeanuts.org"))))
(todo "WAITING"))
((org-agenda-compact-blocks t)))
I think that org-agenda concatenates the results of individual sub-commands (like org-tags-view
) internally. What I'm looking to do is skip the traditional org-agenda dispatcher and construct the agenda directly from an arbitrary definition like (from the above):
'((agenda "" ((org-agenda-ndays 1)))
(tags-todo "+PRIORITY=\"A\"")
(tags-todo "computer|office|phone")
(tags "project+CATEGORY=\"elephants\"")
(tags "review" ((org-agenda-files '("~/org/circuspeanuts.org"))))
(todo "WAITING"))
((org-agenda-compact-blocks t)))
The key being that the definition is subject only to the constraints for org-agenda-custom-commands
. It could simply be a tags
agenda or a multipart one like that shown.
I originally thought that the user-defined function type that can be added to org-agenda-custom-commands
might be the trick, but it looks like it's treated as a match predicate (it's not really mentioned in the documentation).
I'm asking because I'd like to view an agenda that has a dynamically-generated definition.