Check whether we are in Org Mode before inserting remote link
This commit is contained in:
parent
9994a3ac82
commit
ff184ec47a
@ -640,6 +640,8 @@ prompt for an item."
|
|||||||
Uses `org-id-get-create' to get the ID or CUSTOM_ID propery of
|
Uses `org-id-get-create' to get the ID or CUSTOM_ID propery of
|
||||||
the target headline."
|
the target headline."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
(unless (derived-mode-p 'org-mode)
|
||||||
|
(user-error "Not in Org Mode"))
|
||||||
(let ((pom (nth 3 (org-refile-get-location nil (get-file-buffer db/org-default-org-file)))))
|
(let ((pom (nth 3 (org-refile-get-location nil (get-file-buffer db/org-default-org-file)))))
|
||||||
(if (not pom)
|
(if (not pom)
|
||||||
(user-error "Invalid location")
|
(user-error "Invalid location")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user