check and confirm the org-directory and org-mobile-directory are defined and not empty value

To be tested...
This commit is contained in:
Jason TIAN 2024-01-24 21:31:56 +08:00
parent 7f504839cd
commit c45d2aa2a8

View file

@ -248,11 +248,15 @@ Version: 2023/09/27"
(setq org-agenda-files
(delete-dups (append org-agenda-files
;; <<od-2>>
(directory-files-recursively org-directory "\\.org$"))))
;; TODO: to be tested...
(when (and org-directory (not (string= org-directory "")))
(directory-files-recursively org-directory "\\.org$")))))
(setq org-agenda-files
(delete-dups
(append org-agenda-files
(directory-files-recursively org-mobile-directory "\\.org$")))) ; <<omd>>
;; TODO: to be tested...
(when (and org-mobile-directory (not (string= org-mobile-directory "")))
(directory-files-recursively org-mobile-directory "\\.org$"))))) ; <<omd>>
;; remove the duplicates like below,
;; ("~/abc.org" "/Users/jason/abc.org")