1

I understand that find-file "file path" in .emacs can load the file automatically after emacs starts up. However, I would like to haveorg-agenda week C-c a a open instead of a local file. How can this be achieved by elisp?

4

You can use (org-agenda-list) or (execute-kbd-macro (kbd "C-c a a")), for example:

(add-hook 'emacs-startup-hook #'org-agenda-list)

or

(add-hook 'emacs-startup-hook
          (lambda () (execute-kbd-macro (kbd "C-c a a"))))
  • Rather than using execute-keyboard-macro you can use (org-agenda nil "a") to open whatever agenda has shortcut "a". This will work even if C-a a isn't bound to org-agenda. – erikstokes Oct 7 '15 at 23:02

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.