Check whether we are in Org Mode before inserting remote link

Daniel Borchmann 2020-09-26 16:48:02 +02:00
parent 9994a3ac82
commit ff184ec47a
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 2 additions and 0 deletions

View File

@ -640,6 +640,8 @@ prompt for an item."
Uses `org-id-get-create' to get the ID or CUSTOM_ID propery of
the target headline."
(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)))))
(if (not pom)
(user-error "Invalid location")