瀏覽代碼

org-refile: Fix inconsistency when listing refile targets

* org.el (org-refile-get-targets): Setting org-refile-use-outline-path
to `file' or `buffer-name' causes an additional target for the file’s
root node to be inserted. This functionality was absent when using
`full-file-path'. We now add this since it is convenient and makes the
behavior more consistent.
Sebastian Reuße 8 年之前
父節點
當前提交
2906e50177
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lisp/org.el

+ 2 - 0
lisp/org.el

@@ -11563,6 +11563,8 @@ order.")
 		 (push (list (file-name-nondirectory f) f nil nil) tgs))
 		 (push (list (file-name-nondirectory f) f nil nil) tgs))
 	       (when (eq org-refile-use-outline-path 'buffer-name)
 	       (when (eq org-refile-use-outline-path 'buffer-name)
 		 (push (list (buffer-name (buffer-base-buffer)) f nil nil) tgs))
 		 (push (list (buffer-name (buffer-base-buffer)) f nil nil) tgs))
+	       (when (eq org-refile-use-outline-path 'full-file-path)
+		 (push (list (file-truename (buffer-file-name (buffer-base-buffer))) f nil nil) tgs))
 	       (org-with-wide-buffer
 	       (org-with-wide-buffer
 		(goto-char (point-min))
 		(goto-char (point-min))
 		(setq org-outline-path-cache nil)
 		(setq org-outline-path-cache nil)