aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-24 06:58:52 -0400
committerCraig Jennings <c@cjennings.net>2026-06-24 06:58:52 -0400
commit0a6a7b5968abda8dd184452cbccfa721cc7b9781 (patch)
tree7287c9173f9720913de73a77b15857f20c9b5dc0
parent6f0584b4b9df7b4319248cb096f6dc547581625f (diff)
downloaddotemacs-0a6a7b5968abda8dd184452cbccfa721cc7b9781.tar.gz
dotemacs-0a6a7b5968abda8dd184452cbccfa721cc7b9781.zip
refactor(org-refile): drop roam Project notes as refile targets
Stop scanning org-roam notes tagged "Project" for refile targets; keep the "Topic" scan. Behavior change by decision: roam Projects are no longer pulled in anywhere (the agenda never scanned them either — that was a stale doc claim, corrected separately). Refiling into Topic notes and into per-project todo.org files is unchanged. Test reworked to assert Topic is included and Project is not. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
-rw-r--r--modules/org-refile-config.el11
-rw-r--r--tests/test-org-refile-config-scan-targets.el11
2 files changed, 11 insertions, 11 deletions
diff --git a/modules/org-refile-config.el b/modules/org-refile-config.el
index a6b7ac3a4..5f826cacf 100644
--- a/modules/org-refile-config.el
+++ b/modules/org-refile-config.el
@@ -36,7 +36,8 @@
;; ----------------------------- Org Refile Targets ----------------------------
;; sets refile targets
-;; - adds project files in org-roam to the refile targets
+;; - adds org-roam notes tagged "Topic" to the refile targets
+;; (roam "Project" notes were dropped as refile targets 2026-06-24)
;; - adds todo.org files in subdirectories of the code and project directories
(defvar cj/--org-refile-targets-cache (cj/cache-make :ttl 3600)
@@ -100,11 +101,9 @@ Returns the list to assign to `org-refile-targets'. Slow -- walks
(cons schedule-file '(:maxlevel . 1)))))
(when (and (fboundp 'cj/org-roam-list-notes-by-tag)
(fboundp 'org-roam-node-list))
- (let* ((project-and-topic-files
- (append (cj/org-roam-list-notes-by-tag "Project")
- (cj/org-roam-list-notes-by-tag "Topic")))
- (file-rule '(:maxlevel . 1)))
- (dolist (file project-and-topic-files)
+ (let ((topic-files (cj/org-roam-list-notes-by-tag "Topic"))
+ (file-rule '(:maxlevel . 1)))
+ (dolist (file topic-files)
(unless (assoc file new-files)
(push (cons file file-rule) new-files)))))
(let ((file-rule '(:maxlevel . 1)))
diff --git a/tests/test-org-refile-config-scan-targets.el b/tests/test-org-refile-config-scan-targets.el
index 71451a29a..6123d3262 100644
--- a/tests/test-org-refile-config-scan-targets.el
+++ b/tests/test-org-refile-config-scan-targets.el
@@ -101,9 +101,10 @@ maxlevel rules when no roam tags and no code/projects todo files exist."
(should (= 1 hits)))
(delete-directory tmp t))))
-(ert-deftest test-org-refile-scan-targets-includes-roam-project-and-topic-files ()
- "Normal: when the roam helpers are available, Project and Topic files
-become additional refile targets."
+(ert-deftest test-org-refile-scan-targets-includes-roam-topic-not-project ()
+ "Normal: roam Topic files become refile targets; Project files do NOT.
+Project notes were dropped as refile targets (2026-06-24) -- roam Projects are
+no longer scanned for refile."
(let* ((tmp (file-name-as-directory (make-temp-file "cj-refile-roam-" t)))
(inbox-file "/tmp/test-inbox.org")
(reference-file "/tmp/test-reference.org")
@@ -121,8 +122,8 @@ become additional refile targets."
(lambda () nil)))
(let* ((result (cj/--org-refile-scan-targets))
(paths (mapcar #'car result)))
- (should (member "/notes/alpha.org" paths))
- (should (member "/notes/topic.org" paths))))
+ (should (member "/notes/topic.org" paths))
+ (should-not (member "/notes/alpha.org" paths))))
(delete-directory tmp t))))
(ert-deftest test-org-refile-scan-targets-survives-permission-denied ()