mirror of
https://github.com/org-roam/org-roam
synced 2025-09-04 15:03:32 -05:00
(fix): Error if org-roam-insert is not called from Org-roam file (#264)
This commit is contained in:
@@ -741,6 +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.
|
"Find an Org-roam file, and insert a relative org link to it at point.
|
||||||
If PREFIX, downcase the title before insertion."
|
If PREFIX, downcase the title before insertion."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
|
(unless (org-roam--org-roam-file-p)
|
||||||
|
(user-error "Not in an Org-roam file"))
|
||||||
(let* ((region (and (region-active-p)
|
(let* ((region (and (region-active-p)
|
||||||
;; following may lose active region, so save it
|
;; following may lose active region, so save it
|
||||||
(cons (region-beginning) (region-end))))
|
(cons (region-beginning) (region-end))))
|
||||||
|
Reference in New Issue
Block a user