In org-mode, I have a custom agenda set with:
(setq org-agenda-custom-commands
'(("d" "todo"
agenda ""
((org-agenda-span 1)
(org-agenda-start-day "-0d")
(org-agenda-start-with-log-mode '(closed))
))
))
I can call it with C-c a d
.
I want to call it programmatically. The documentation offers passing an argument:
(org-agenda &optional ARG ORG-KEYS RESTRICTION)
Dispatch agenda commands to collect entries to the agenda buffer. Prompts for a command to execute. Any prefix arg will be passed on to the selected command. The default selections are:
a Call ‘org-agenda-list’ to display the agenda for current day or week.
I tried:
(org-agenda "a")
and get the same prompt as if I had run (org-agenda)
. So I don't know how to proceed to the next step of selecting the custom agenda (the "d" after the "a").
How can I call this custom agenda programmatically?