From f8904dad3223ee018a64c77c90009d1bdc7a0dee Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 10 Jan 2024 14:19:42 +0000 Subject: [PATCH] Track org-agenda-files in separate file inside org-directory --- README.org | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index 7820213..b7449e7 100644 --- a/README.org +++ b/README.org @@ -493,8 +493,6 @@ For reference information, see [[https://orgmode.com][Org-mode website]] #+begin_src emacs-lisp :results output silent (setq org-agenda-span 'fortnight org-agenda-start-on-weekday 1 - org-agenda-files (list (expand-file-name org-directory) - (expand-file-name "journal" org-directory)) org-agenda-sticky nil org-agenda-window-setup 'current-window org-agenda-tags-column 0 @@ -502,6 +500,10 @@ For reference information, see [[https://orgmode.com][Org-mode website]] (todo . " %-12:c") (tags . " %-12:c") (search . " %-12:c"))) + + (let ((agenda-file (expand-file-name ".agenda" org-directory))) + (if (file-exists-p agenda-file) + (setq org-agenda-files agenda-file))) #+end_src ** org-alert