Set default buffer when querying for Org Mode headlines

Apparently, if the current buffer is not associated with a file, things break.
Daniel Borchmann 2020-09-26 15:24:07 +02:00
parent b0a36749e6
commit dd30d5d7be
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 1 additions and 1 deletions

View File

@ -629,7 +629,7 @@ prompt for an item."
(apply #'db/org-find-items-linking-by-id
(if (and (derived-mode-p 'org-mode) (not arg))
(list (org-id-get) (org-entry-get nil "CUSTOM_ID"))
(let ((pom (nth 3 (org-refile-get-location))))
(let ((pom (nth 3 (org-refile-get-location nil (get-file-buffer db/org-default-org-file)))))
(if (not pom)
(user-error "Invalid location")
(org-with-point-at pom