Browse Source

org-id: org-id-get-with-outline-path-completion for file targets

* lisp/org-id.el (org-id-get-with-outline-path-completion): Make the
function work also for files (outline level 0)
Gustav Wikström 4 years ago
parent
commit
f6e41c1d14
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org-id.el

+ 1 - 1
lisp/org-id.el

@@ -303,7 +303,7 @@ If necessary, the ID is created."
 	  (if (caar org-refile-targets) 'file t))
 	 (org-refile-target-verify-function nil)
 	 (spos (org-refile-get-location "Entry"))
-	 (pom (and spos (move-marker (make-marker) (nth 3 spos)
+	 (pom (and spos (move-marker (make-marker) (or (nth 3 spos) 1)
 				     (get-file-buffer (nth 1 spos))))))
     (prog1 (org-id-get pom 'create)
       (move-marker pom nil))))