From 2350d34ceb68aac74b87a518467a71476a204d5e Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 20 Jul 2026 23:31:59 -0500 Subject: fix(org-roam): declare capture-templates special for immediate insert Without the defvar, the byte-compiled let-binding in cj/org-roam-node-insert-immediate is a dead lexical binding and :immediate-finish never reaches org-roam-node-insert, so the immediate insert opened a capture buffer. --- tests/test-org-roam-config-format.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/test-org-roam-config-format.el b/tests/test-org-roam-config-format.el index e9378b7a..caafe563 100644 --- a/tests/test-org-roam-config-format.el +++ b/tests/test-org-roam-config-format.el @@ -147,5 +147,13 @@ Returns the formatted file content." (let ((result (test-format "Title" "id" "* Content"))) (should (string-match-p "#\\+FILETAGS: Topic\n\n\\* Content" result)))) +(ert-deftest test-org-roam-config-capture-templates-declared-special () + "Normal: org-roam-capture-templates is declared special in the module. +cj/org-roam-node-insert-immediate let-binds it; without the defvar the +byte-compiled let is a dead lexical binding and :immediate-finish never +reaches org-roam-node-insert -- the \"immediate\" insert opens a capture +buffer." + (should (special-variable-p 'org-roam-capture-templates))) + (provide 'test-org-roam-config-format) ;;; test-org-roam-config-format.el ends here -- cgit v1.2.3