diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-11 15:46:15 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-11 15:46:15 -0500 |
| commit | 07b832991621cff19487a8a5f6c54e63744c0cc5 (patch) | |
| tree | a6d88920923c5a041423f4458d022924e51d0514 /tests | |
| parent | e52668985817b92f296606707694729b866e8364 (diff) | |
| download | dotemacs-07b832991621cff19487a8a5f6c54e63744c0cc5.tar.gz dotemacs-07b832991621cff19487a8a5f6c54e63744c0cc5.zip | |
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.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test-org-roam-config-tag-and-find.el | 11 |
1 files changed, 11 insertions, 0 deletions
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 () |
