Do not call org-agenda-files if org-mode is already loaded (#15908)

This commit is contained in:
Richard Kim 2023-01-30 12:41:05 -08:00 committed by GitHub
parent 2c54914370
commit 91e2a4f396
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1294,9 +1294,12 @@ LIST-SIZE is specified in `dotspacemacs-startup-lists' for recent entries."
org-agenda-files
;; but if it's a string, it must be file where the list
;; of agenda files are stored in that file and we have
;;to load `org-agenda' to process the list.
(when (y-or-n-p "`org-agenda-files' is a string and \
not a list. Load `org' and continue?")
;; to load `org-agenda' to process the list. If org is
;; already loaded, then we assume that the user has
;; already called org-agenda-files.
(when (and (not (featurep 'org))
(y-or-n-p "`org-agenda-files' is a string and \
not a list. Load `org' and continue?"))
(require 'org)
(org-agenda-files))))))
(mapcar #'expand-file-name files)))