From 7f09c76baf6d575c494531d027c59934eeb0f36d Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Tue, 10 Mar 2020 10:57:49 +0800 Subject: [PATCH] (fix): allow org-roam-insert in Org-roam file indirect buffers (#266) --- org-roam.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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