GNU bug report logs - #7231
23.3; Don't rebuild buffer list in iswitchb-visit-buffer

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Sun, 17 Oct 2010 17:57:02 UTC

Severity: normal

Found in version 23.3

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#7231: closed (23.3; Don't rebuild buffer list in
 iswitchb-visit-buffer)
Date: Thu, 28 Oct 2010 01:29:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 27 Oct 2010 21:31:01 -0400
with message-id <jwvtyk7je8u.fsf-monnier+emacs <at> gnu.org>
and subject line Re: bug#7231: 23.3; Don't rebuild buffer list in iswitchb-visit-buffer
has caused the GNU bug report #7231,
regarding 23.3; Don't rebuild buffer list in iswitchb-visit-buffer
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
7231: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7231
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.3; Don't rebuild buffer list in iswitchb-visit-buffer
Date: Mon, 18 Oct 2010 01:59:52 +0800
The original change was to address buffer name changes due to packages
such as uniquify.el. But it causes another annoying bug: changing the
order of matches seen by users.

This reverts it.

If people are annoyed (which I doubt) by outdated buffer names due to
uniquify.el, one solution is to map the buffer-names to buffer objects
before killing and map them back to names after killing.

From 7e6597c54a7764688855c3ab2efa6cfa1cffbea6 Mon Sep 17 00:00:00 2001
Date: Mon, 18 Oct 2010 01:44:24 +0800
Subject: [PATCH] Don't rebuild buffer list in iswitchb-visit-buffer

Rebuilding buffer list will lose the order of matches seen by users
and thus cause surprises.
---
 lisp/iswitchb.el |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index 081897a..b7baa03 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -1042,10 +1042,8 @@ Return the modified list with the last element prepended to it."
 	  (if (get-buffer buf)
 	      ;; buffer couldn't be killed.
 	      (setq iswitchb-rescan t)
-	    ;; Else `kill-buffer' succeeds so re-make the buffer list
-	    ;; taking into account packages like uniquify may rename
-	    ;; buffers
-	    (iswitchb-make-buflist iswitchb-default))))))
+	    ;; else buffer was killed so remove name from list.
+	    (setq iswitchb-buflist  (delq buf iswitchb-buflist)))))))
 
 ;;; VISIT CHOSEN BUFFER
 (defun iswitchb-visit-buffer (buffer)
-- 
1.7.3



[Message part 3 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo <sdl.web <at> gmail.com>
Cc: Óscar Fuentes <ofv <at> wanadoo.es>
Subject: Re: bug#7231: 23.3; Don't rebuild buffer list in iswitchb-visit-buffer
Date: Wed, 27 Oct 2010 21:31:01 -0400
> Sorry for being too lazy. Please try the following patch.

Thanks, installed in the trunk.


        Stefan


This bug report was last modified 14 years and 214 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.