Skip to content

Commit

Permalink
allow full function in fill-template
Browse files Browse the repository at this point in the history
  • Loading branch information
jethrokuan committed Jun 18, 2021
1 parent 8f7f0e8 commit 263e82d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion org-roam-capture.el
Original file line number Diff line number Diff line change
Expand Up @@ -506,11 +506,14 @@ also run Org-capture's template expansion."
(org-roam-format
template
(lambda (key)
(let ((fn (intern (concat "org-roam-node-" key)))
(let ((fn (intern key))
(node-fn (intern (concat "org-roam-node-" key)))
(ksym (intern (concat ":" key))))
(cond
((fboundp fn)
(funcall fn org-roam-capture--node))
((fboundp node-fn)
(funcall node-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)))
Expand Down

0 comments on commit 263e82d

Please sign in to comment.