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. --- modules/org-roam-config.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules') diff --git a/modules/org-roam-config.el b/modules/org-roam-config.el index 867f2d99..e8d003e0 100644 --- a/modules/org-roam-config.el +++ b/modules/org-roam-config.el @@ -30,6 +30,10 @@ ;; Declared special so the `let'-binding in `cj/org-roam-copy-todo-to-today' ;; compiles as a dynamic bind, not a dead lexical local -- otherwise the custom ;; capture template never reaches org-roam-dailies (the foreign-special-var trap). +;; Declared special so cj/org-roam-node-insert-immediate's let-binding is +;; dynamic under lexical-binding; without it the byte-compiled let is a dead +;; lexical binding and :immediate-finish never reaches org-roam-node-insert. +(defvar org-roam-capture-templates) (defvar org-roam-dailies-capture-templates) ;; External variables, declared special so byte-compilation doesn't treat them -- cgit v1.2.3