GNU bug report logs - #9378
23.3; iswitchb-make-buflist returns a nonexistent buffer

Previous Next

Package: emacs;

Reported by: "Paul Du Bois" <dubois <at> doublefine.com>

Date: Fri, 26 Aug 2011 00:54:02 UTC

Severity: minor

Found in version 23.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Paul Du Bois" <dubois <at> doublefine.com>
To: 9378 <at> debbugs.gnu.org
Subject: bug#9378: 23.3; iswitchb-make-buflist returns a nonexistent buffer
Date: Thu, 25 Aug 2011 17:27:40 -0700
emacs -Q
(require 'iswitchb)
(setq read-buffer-function 'iswitchb-read-buffer)
(add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup)
find several files
C-x b C-k C-k

After the first C-k, the buffer is deleted, but remains at the
head of the iswitchb list.  The second C-k produces an error
"No buffer named <the buffer that was just killed>"

The problem is that iswitchb-make-buflist does not correspond to its
documentation:

  "... If DEFAULT is non-nil, and corresponds to an existing buffer,
   it is put to the start of the list."

Changing the implementation to match the documentation fixes the bug:

--- iswitchb.el	2011-06-16 15:36:18.084715400 -0700
+++ iswitchb2.el	2011-08-25 17:23:04.724373400 -0700
@@ -849,7 +849,7 @@
 	  (run-hooks 'iswitchb-make-buflist-hook)
 	 ;; Should this be after the hooks, or should the hooks be the
 	  ;; final thing to be run?
-	  (if default
+	  (if (and default (get-buffer default))
 	      (progn
 		(setq iswitchb-temp-buflist
 		      (delete default iswitchb-temp-buflist))



In GNU Emacs 23.3.1 (i386-mingw-nt6.1.7601)
 of 2011-03-10 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 6.1.7601
configured using `configure --with-gcc (4.5) --no-opt --cflags
-Ic:/imagesupport/include'





This bug report was last modified 11 years and 165 days ago.

Previous Next


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