mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
fill-template: fill from plist
This commit is contained in:
@ -484,10 +484,16 @@ run Org-capture's template expansion."
|
|||||||
(funcall (if org-capture-p #'org-capture-fill-template #'identity)
|
(funcall (if org-capture-p #'org-capture-fill-template #'identity)
|
||||||
(s-format str
|
(s-format str
|
||||||
(lambda (key)
|
(lambda (key)
|
||||||
(let ((fn (intern (concat "org-roam-node-" key))))
|
(let ((fn (intern (concat "org-roam-node-" key)))
|
||||||
(if (fboundp fn)
|
(ksym (intern (concat ":" key))))
|
||||||
(funcall fn org-roam-capture--node)
|
(cond
|
||||||
(completing-read (format "%s: " key) nil)))))))
|
((fboundp fn)
|
||||||
|
(funcall fn org-roam-capture--node))
|
||||||
|
((plist-get org-roam-capture--info ksym)
|
||||||
|
(plist-get org-roam-capture--info ksym))
|
||||||
|
(t (let ((r (completing-read (format "%s: " key) nil)))
|
||||||
|
(plist-put org-roam-capture--info ksym r)
|
||||||
|
r))))))))
|
||||||
|
|
||||||
(defun org-roam-capture--goto-location ()
|
(defun org-roam-capture--goto-location ()
|
||||||
"Initialize the buffer, and goto the location of the new capture.
|
"Initialize the buffer, and goto the location of the new capture.
|
||||||
|
Reference in New Issue
Block a user