# HG changeset patch # User Stephen Eglen # Date 1253014687 0 # Node ID 6fbde1155ee57d31720cb83acbd279c04dc1091a # Parent a07fd035c1b09c6dc78c38d0be6d21b2b657a6e6 (iswitchb-read-buffer): When selecting a match from the virtual-buffers, use the name of the buffer specified by find-file-noselect, as the match may be a symlink. (This was a problem if the target and the symlink had differet names.) diff -r a07fd035c1b0 -r 6fbde1155ee5 lisp/iswitchb.el --- a/lisp/iswitchb.el Tue Sep 15 08:11:42 2009 +0000 +++ b/lisp/iswitchb.el Tue Sep 15 11:38:07 2009 +0000 @@ -657,9 +657,12 @@ ;; that file now and act as though that buffer had been selected. (if (and iswitchb-virtual-buffers (not (iswitchb-existing-buffer-p))) - (let ((virt (car iswitchb-virtual-buffers))) - (find-file-noselect (cdr virt)) - (setq iswitchb-matches (list (car virt)) + (let ((virt (car iswitchb-virtual-buffers)) + (new-buf)) + ;; Keep the name of the buffer returned by find-file-noselect, as + ;; the buffer 'virt' could be a symlink to a file of a different name. + (setq new-buf (buffer-name (find-file-noselect (cdr virt)))) + (setq iswitchb-matches (list new-buf) iswitchb-virtual-buffers nil))) ;; Handling the require-match must be done in a better way.