My init file contains the following

'(org-directory "~/Dropbox/org")
'(org-agenda-files (list (concat org-directory "/mylife.org")
       (concat org-directory "/inbox.org"))))

which seems to work. When I add a file to org-agenda-files using C-c [, it works as expected for as long as Emacs is open. Once I close and relaunch Emacs, I'm back to just the original two files in org-agenda-files. Is there a way to get additions to org-agenda-files to persist?

  • The doc string of org-agenda-files suggests a different setup. Set org-agenda-files to a string containing the name of the file where the org agenda files are actually registered. Let us assume (custom-set-variables '(org-directory "~/Dropbox/org") '(org-agenda-files "~/.emacs/org-agenda-files")). Then store mylife.org as first line in ~/.emacs/org-agenda-files. I think with you are fine to add and remove files to your org agenda files with this setup. I did not try it. Please test it and report whether it works.
    – Tobias
    Nov 26, 2019 at 8:47
  • The recommendation of @Tobias worked extremely well and provides the functionality I wanted.
    – ghoetker
    Nov 26, 2019 at 22:13


Your Answer

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

Browse other questions tagged or ask your own question.