I have a quite extensive org-agenda-files, so the first time I load an agenda view after starting the Emacs process, I have to wait ~20sec. I'm using Emacs in daemon mode (via systemd user service).

How can I have Emacs initialize the org-agenda on daemon startup, so that once I'm in Emacs, I don't have to wait when displaying an agenda for the first time?


Add this to your .emacs:

(add-hook 'after-init-hook 'org-agenda-list)
  • doesn't work. Emacs startup is "quick" as ever, and the first time I want to display an agenda, I need to wait for all my agenda files to be loaded. – andreas-h Apr 30 '16 at 7:02
  • It works for me. Check if you are defer loading or if your packages are not being loaded properly. Trace debug your init file loading to see if you notice any errors. – Emacs User Apr 30 '16 at 13:49

This has been covered before: https://stackoverflow.com/questions/2010539/how-can-i-show-the-org-mode-agenda-on-emacs-start-up

The top answer on that occasion was the answer posted by Emacs User.

  • That doesn't change the fact that his answer doesn't work for my current config. – andreas-h May 3 '16 at 5:20
  • Sorry - I think I missed the daemon part. I've not tested, but would setting org-agenda-sticky to t help in conjunction with the after-init-hook mentioned above? This keeps agenda buffers persistent so, if it exists, it's just redisplayed when requested (and so is pretty instant). You can then always press "g" to refresh the displayed agenda if it's too out of date. – Stuart Hickinbottom May 16 '16 at 19:41

Your Answer

