summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2009-04-01 15:49:35 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2009-04-01 15:49:35 +0200
commita36ebd79c8a574056a96e212cae9d14331f2944a (patch)
treeb5f6a1d60a1298a47f6b054bfe67824b6d624eda
parentd627ec8992dcd9e0438bc8a05efd11a45af98d6d (diff)
downloadorg-mode-a36ebd79c8a574056a96e212cae9d14331f2944a.tar.gz
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.
-rwxr-xr-xlisp/ChangeLog3
-rw-r--r--lisp/org.el4
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index da5babf..d41712e 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/org.el b/lisp/org.el
index 21ee452..b834925 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -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))