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.
This commit is contained in:
parent
865ac0952b
commit
2906e50177
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue