3

I can start emacs with my org-mode agenda view by putting the following in my init.el file:

(org-agenda-list)
(delete-other-windows)

Or I can start it with my global todo list:

(org-todo-list)
(delete-other-windows)

But not both. I can define a custom view like so:

(add-to-list
 'org-agenda-custom-commands
 '("z" "calendar + todo"
   ((agenda "")
    (todo ""))))

But how can I start emacs with this custom view loaded?

  • If you type C-h f aka M-x describe-function, you can look up org-agenda-list and see what the optional arguments are. You can then experiment by calling that function with your custom arguments, including, but not limited to let-binding certain applicable variables ... – lawlist Apr 13 at 6:07
  • The arguments of org-agenda-list are (&optional ARG START-DAY SPAN WITH-HOUR). There doesn't seem to be anything related to TODOs in there. Am I missing something? – AEmacs Apr 13 at 8:08
2

You can start it with

(org-agenda nil "z")

Read more about this function by M-x describe-function, org-agenda

(org-agenda &optional ARG ORG-KEYS RESTRICTION)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.