浏览代码

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 年之前
父节点
当前提交
f6e41c1d14
共有 1 个文件被更改,包括 1 次插入1 次删除
  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))))