Bugfix: Add file name only once to refile targets

With the setting

   (setq org-refile-use-outline-path 'file)

the file names ended up twice, like

    "xxx.org/level 1/level 2 (xxx.org)"

Now the second occurrence is omitted.
This commit is contained in:
Carsten Dominik 2009-04-01 15:49:35 +02:00
parent d627ec8992
commit a36ebd79c8
2 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2009-04-01 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-refile-get-location): Add file name only if not
already included in outline path.
* org-faces.el (org-n-level-faces): Fix customization type from
number to integer.

View File

@ -8275,7 +8275,9 @@ operation has put the subtree."
(filename (and cfn (expand-file-name cfn)))
(tbl (mapcar
(lambda (x)
(if (not (equal filename (nth 1 x)))
(if (and (not (member org-refile-use-outline-path
'(file full-file-path)))
(not (equal filename (nth 1 x))))
(cons (concat (car x) extra " ("
(file-name-nondirectory (nth 1 x)) ")")
(cdr x))