(fix): fix 'ref context not returning path to file (#678)

This commit is contained in:
Jethro Kuan
2020-05-21 13:14:06 +08:00
committed by GitHub
parent c4189ffa04
commit dd2406ec92

View File

@ -265,7 +265,8 @@ This function is used solely in Org-roam's capture templates: see
('ref
(let ((completions (org-roam--get-ref-path-completions))
(ref (cdr (assoc 'ref org-roam-capture--info))))
(or (cdr (assoc ref completions))
(if-let ((pl (cdr (assoc ref completions))))
(plist-get pl :path)
(org-roam-capture--new-file))))
(_ (error "Invalid org-roam-capture-context")))))
(org-roam-capture--expand-template)