Browse Source

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 3 years ago
parent
commit
2906e50177
1 changed files with 2 additions and 0 deletions
  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))
 	       (when (eq org-refile-use-outline-path 'buffer-name)
 		 (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
 		(goto-char (point-min))
 		(setq org-outline-path-cache nil)