From fcad0fbc4e7d1f96a5bb7a644c9beed0c542fc3f Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sat, 20 Dec 2008 11:10:12 +0100 Subject: [PATCH] Refile: Compare expanded file names When refiling to the current file, the completion commands do not show the file name. This was broken because I had switched from comparing truenames to normal names. Now I am using expanded names, this is fast and works well. --- lisp/ChangeLog | 5 +++++ lisp/org.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 77c0e4f09..bec5200da 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-12-20 Carsten Dominik + + * org.el (org-get-refile-targets, org-refile-get-location): Use + expanded file name to improve comparison. + 2008-12-19 Carsten Dominik * org.el (org-scan-tags): Rescan for tags, to get the correct diff --git a/lisp/org.el b/lisp/org.el index 4aacc199c..5a421c83f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7509,6 +7509,7 @@ on the system \"/user@host:\"." (save-excursion (set-buffer (if (bufferp f) f (org-get-agenda-file-buffer f))) (if (bufferp f) (setq f (buffer-file-name (buffer-base-buffer f)))) + (setq f (expand-file-name f)) (save-excursion (save-restriction (widen) @@ -7672,7 +7673,8 @@ operation has put the subtree." 'org-olpath-completing-read 'org-ido-completing-read)) (extra (if org-refile-use-outline-path "/" "")) - (filename (buffer-file-name (buffer-base-buffer cbuf))) + (filename (expand-file-name + (buffer-file-name (buffer-base-buffer cbuf)))) (tbl (mapcar (lambda (x) (if (not (equal filename (nth 1 x))) -- 2.11.4.GIT