diff --git a/org-roam.el b/org-roam.el index 79f7101..8d8f8b2 100644 --- a/org-roam.el +++ b/org-roam.el @@ -741,7 +741,8 @@ GOTO and KEYS argument have the same functionality as "Find an Org-roam file, and insert a relative org link to it at point. If PREFIX, downcase the title before insertion." (interactive "P") - (unless (org-roam--org-roam-file-p) + (unless (org-roam--org-roam-file-p + (buffer-file-name (buffer-base-buffer))) (user-error "Not in an Org-roam file")) (let* ((region (and (region-active-p) ;; following may lose active region, so save it