From 07b832991621cff19487a8a5f6c54e63744c0cc5 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 11 Jul 2026 15:46:15 -0500 Subject: fix(org-roam): resolve void find-node bindings, drop dead config C-c n p and C-c n w were bound to cj/org-roam-find-node-project and -webclip, which no use-package :bind autoload could fulfill (they point at org-roam, which defines neither), so both keys errored with "autoloading failed to define function". I defined find-node-project as a sibling of find-node-topic/recipe against the existing project.org template, and dropped the webclip binding and label since no webclip template or flow exists. I repointed the v2mom/recipe/topic capture templates from .emacs.d/org-roam-templates/ to roam-dir/templates/ so one canonical directory feeds both the capture templates and the find-node commands. They had drifted, and edits to one copy never reached the other. Deleted the now-redundant .emacs.d/org-roam-templates/ files. I removed the 28-line commented consult-org-roam block. Its proposed C-c n l / C-c n r collide with live bindings, so it couldn't ship as written. Git keeps the draft. --- tests/test-org-roam-config-tag-and-find.el | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests') diff --git a/tests/test-org-roam-config-tag-and-find.el b/tests/test-org-roam-config-tag-and-find.el index f98d8af0..97a7a683 100644 --- a/tests/test-org-roam-config-tag-and-find.el +++ b/tests/test-org-roam-config-tag-and-find.el @@ -147,6 +147,17 @@ ;; The 4th arg is the subdir (should (equal (nth 3 args) "recipes/")))) +(ert-deftest test-org-roam-find-node-project-delegates-to-find-node () + "Normal: `find-node-project' uses Project tag, 'p' key, project.org template." + (let ((args nil)) + (cl-letf (((symbol-function 'cj/org-roam-find-node) + (lambda (&rest a) (setq args a)))) + (cj/org-roam-find-node-project)) + (should (equal (car args) "Project")) + (should (equal (cadr args) "p")) + ;; The 3rd arg is the template file, under the canonical roam-dir/templates/. + (should (string-suffix-p "templates/project.org" (nth 2 args))))) + ;;; cj/org-roam-node-insert-immediate (ert-deftest test-org-roam-node-insert-immediate-rebinds-templates-and-calls-insert () -- cgit v1.2.3