(fix): allow org-roam-insert in Org-roam file indirect buffers (#266)

This commit is contained in:
Jethro Kuan
2020-03-10 10:57:49 +08:00
committed by GitHub
parent f6e75f995a
commit 7f09c76baf

View File

@@ -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