(fix): org-roam-capture allow creating new file (#661)

Set title correctly when no match found in prompt's candidates.
fixes #651
This commit is contained in:
N V
2020-05-17 11:36:15 -04:00
committed by GitHub
parent 4b45f1dbf5
commit 1b5e55b6c4

View File

@ -334,7 +334,7 @@ This uses the templates defined at `org-roam-capture-templates'."
(title-with-keys (org-roam-completion--completing-read "File: "
completions))
(res (cdr (assoc title-with-keys completions)))
(title (plist-get res :title))
(title (or (plist-get res :title) title-with-keys))
(file-path (plist-get res :file-path)))
(let ((org-roam-capture--info (list (cons 'title title)
(cons 'slug (org-roam--title-to-slug title))