diff --git a/config.org b/config.org index 4c2bc58..b76950f 100644 --- a/config.org +++ b/config.org @@ -1204,16 +1204,24 @@ If the property is already set, replace its value." :map org-mode-map ("S-" . org-shiftright) ("S-" . org-shiftleft)) :init - (defun my--org-agenda-files-set () - "Sets default agenda files. -Necessary when updating roam agenda todos." - (setq org-agenda-files (list (concat MY--PATH_ORG_FILES "notes.org") - (concat MY--PATH_ORG_FILES "projects.org") - (concat MY--PATH_ORG_FILES "tasks.org"))) - (when *sys/linux* - (nconc org-agenda-files - (directory-files-recursively MY--PATH_ORG_FILES_MOBILE "\\.org$")))) - (my--org-agenda-files-set) +;; (defun my--org-agenda-files-set () +;; "Sets default agenda files. +;; Necessary when updating roam agenda todos." +;; (setq org-agenda-files (list (concat MY--PATH_ORG_FILES "notes.org") +;; (concat MY--PATH_ORG_FILES "projects.org") +;; (concat MY--PATH_ORG_FILES "tasks.org"))) +;; (when *sys/linux* +;; (nconc org-agenda-files +;; (directory-files-recursively MY--PATH_ORG_FILES_MOBILE "\\.org$")))) +;; (my--org-agenda-files-set) + (setq org-agenda-files + (cl-remove-if (lambda (file) + ;; exclude some subdirs + (let ((excluded-dirs '("notes" "dummy"))) + (cl-some (lambda (dir) (string-match-p (concat "/" dir "/") file)) + excluded-dirs))) +;; (string-match-p "/notes/" file)) + (directory-files-recursively MY--PATH_ORG_FILES "\\.org$"))) (defun my--org-skip-subtree-if-priority (priority) "Skip an agenda subtree if it has a priority of PRIORITY.