emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp iswitchb.el


From: Stephen Eglen
Subject: [Emacs-diffs] emacs/lisp iswitchb.el
Date: Tue, 15 Sep 2009 11:38:07 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Stephen Eglen <stephen> 09/09/15 11:38:07

Modified files:
        lisp           : iswitchb.el 

Log message:
        (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.)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/iswitchb.el?cvsroot=emacs&r1=1.80&r2=1.81

Patches:
Index: iswitchb.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/iswitchb.el,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -b -r1.80 -r1.81
--- iswitchb.el 5 Jan 2009 03:19:27 -0000       1.80
+++ iswitchb.el 15 Sep 2009 11:38:07 -0000      1.81
@@ -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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]