diff --git a/org-roam.el b/org-roam.el index 2a11ab9..3cf55aa 100644 --- a/org-roam.el +++ b/org-roam.el @@ -287,7 +287,8 @@ If PREFIX, downcase the title before insertion." (title (completing-read "File: " completions)) (absolute-file-path (or (cadr (assoc title completions)) (org-roam--make-new-file-path (org-roam--get-new-id title) t))) - (current-file-path (-> (current-buffer) + (current-file-path (-> (or (buffer-base-buffer) + (current-buffer)) (buffer-file-name) (file-truename) (file-name-directory))))