mirror of
https://github.com/chrisbarrett/nursery
synced 2025-09-14 15:46:48 -05:00
Clear the org-capture context in case it is initialised during note extraction
This commit is contained in:
@@ -248,7 +248,11 @@ handles file titles, tags and transclusions better."
|
|||||||
(org-roam-db-update-file)
|
(org-roam-db-update-file)
|
||||||
(let* ((template-info nil)
|
(let* ((template-info nil)
|
||||||
(node (org-roam-node-at-point))
|
(node (org-roam-node-at-point))
|
||||||
(template (org-roam-format-template
|
(template
|
||||||
|
(unwind-protect
|
||||||
|
(progn
|
||||||
|
(setq org-capture-plist nil)
|
||||||
|
(org-roam-format-template
|
||||||
(string-trim (org-capture-fill-template org-roam-extract-new-file-path))
|
(string-trim (org-capture-fill-template org-roam-extract-new-file-path))
|
||||||
(lambda (key default-val)
|
(lambda (key default-val)
|
||||||
(let ((fn (intern key))
|
(let ((fn (intern key))
|
||||||
@@ -262,6 +266,7 @@ handles file titles, tags and transclusions better."
|
|||||||
(t (let ((r (read-from-minibuffer (format "%s: " key) default-val)))
|
(t (let ((r (read-from-minibuffer (format "%s: " key) default-val)))
|
||||||
(plist-put template-info ksym r)
|
(plist-put template-info ksym r)
|
||||||
r)))))))
|
r)))))))
|
||||||
|
(setq org-capture-plist nil)))
|
||||||
(relpath (file-name-as-directory org-roam-directory))
|
(relpath (file-name-as-directory org-roam-directory))
|
||||||
(file-path (expand-file-name
|
(file-path (expand-file-name
|
||||||
(if org-roam-rewrite-confirm-extraction-path-p
|
(if org-roam-rewrite-confirm-extraction-path-p
|
||||||
|
Reference in New Issue
Block a user