Prevent org from saving org-agenda-files to customize
org-agenda-files is managed programmatically. Override org-store-new-agenda-file-list to use setq instead of customize-save-variable, and reset org-agenda-files to nil before building it so stale customize values are ignored. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -421,6 +421,11 @@ that have a SCHEDULED date before today to the current date."
|
|||||||
#+end_src
|
#+end_src
|
||||||
*** Agenda Files
|
*** Agenda Files
|
||||||
#+begin_src emacs-lisp :tangle org-config-config.el
|
#+begin_src emacs-lisp :tangle org-config-config.el
|
||||||
|
;; Prevent org from saving org-agenda-files to customize; managed programmatically.
|
||||||
|
(advice-add 'org-store-new-agenda-file-list :override
|
||||||
|
(lambda (files) (setq org-agenda-files files)))
|
||||||
|
|
||||||
|
(setq org-agenda-files nil)
|
||||||
(imalison:add-to-org-agenda-files
|
(imalison:add-to-org-agenda-files
|
||||||
(nconc (list imalison:org-gtd-file imalison:org-calendar-file
|
(nconc (list imalison:org-gtd-file imalison:org-calendar-file
|
||||||
imalison:org-inbox-file imalison:shared-org-gtd-file
|
imalison:org-inbox-file imalison:shared-org-gtd-file
|
||||||
|
|||||||
Reference in New Issue
Block a user