From 42db7d6d5ce613550b7c8789b33416f0f6055993 Mon Sep 17 00:00:00 2001 From: Marc Date: Thu, 10 Apr 2025 09:11:18 +0200 Subject: [PATCH] changed agenda to leave org roam --- config.org | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) 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.