How can I show the Org-mode agenda on Emacs start-up?

后端 未结 6 2158
失恋的感觉
失恋的感觉 2020-12-13 19:40

I would like the Org-mode agenda to automatically show what I have to do today when I open Emacs. The org-agenda command is interactive, so it doesn\'t seem to work well for

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-13 20:03

    One alternative to the hook is to set the initial-buffer-choice variable. This is particularly useful if there are multiple buffers or a number of functions on the hook. The function on this variable needs to return a buffer. Naively this might be:

    (setq initial-buffer-choice (lambda ()
        (org-agenda-list 1)
        (get-buffer "*Org Agenda*")))    
    

提交回复
热议问题