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

master
Jethro Kuan 6 years ago committed by GitHub
parent c4189ffa04
commit dd2406ec92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      org-roam-capture.el

@ -265,8 +265,9 @@ 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))
(org-roam-capture--new-file))))
(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)
(org-roam-capture--put :file-path file-path)

Loading…
Cancel
Save