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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9378 in the body.
You can then email your comments to 9378 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9378; Package emacs. (Fri, 26 Aug 2011 00:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Paul Du Bois" <dubois <at> doublefine.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 26 Aug 2011 00:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Paul Du Bois" <dubois <at> doublefine.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 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'





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9378; Package emacs. (Sat, 03 Sep 2011 19:19:01 GMT) Full text and rfc822 format available.

Message #8 received at 9378 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: "Paul Du Bois" <dubois <at> doublefine.com>
Cc: 9378 <at> debbugs.gnu.org
Subject: Re: bug#9378: 23.3; iswitchb-make-buflist returns a nonexistent buffer
Date: Sat, 03 Sep 2011 15:14:57 -0400
"Paul Du Bois" wrote:

> 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>"

I'm not sure this matters, because if you change the recipe to start:

emacs -Q -f iswitchb-mode \
  --eval "(setq read-buffer-function 'iswitchb-read-buffer)"

ie, use iswitchb-mode rather than just adding to minibuffer-setup-hook,
there is no such error. The difference seems to be that C-x b runs
iswitch-buffer in that case rather than switch-buffer.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9378; Package emacs. (Wed, 07 Sep 2011 21:56:01 GMT) Full text and rfc822 format available.

Message #11 received at 9378 <at> debbugs.gnu.org (full text, mbox):

From: "Paul Du Bois" <dubois <at> doublefine.com>
Cc: 9378 <at> debbugs.gnu.org
Subject: RE: bug#9378: 23.3; iswitchb-make-buflist returns a nonexistent buffer
Date: Wed, 7 Sep 2011 14:51:37 -0700
> "Paul Du Bois" wrote:
> > 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>"

Glen Morris wrote:
> I'm not sure this matters, because if you change the recipe to start:
> 
> emacs -Q -f iswitchb-mode \
>   --eval "(setq read-buffer-function 'iswitchb-read-buffer)"
> 
> ie, use iswitchb-mode rather than just adding to
minibuffer-setup-hook,
> there is no such error. The difference seems to be that C-x b runs
> iswitch-buffer in that case rather than switch-buffer.

Ah.  iswitchb-mode must have been added after I set up iswitchb
(which I've been using for many years)  I was most likely following
this advice which is still in the file header comment block as of emacs
23:

;; Replacement for read-buffer

;; iswitchb-read-buffer has been written to be a drop in replacement
;; for the normal buffer selection routine `read-buffer'.  To use
;; iswitch for all buffer selections in Emacs, add:
;; (setq read-buffer-function 'iswitchb-read-buffer)

I'll switch over, but from some experimentation, it seems like using
read-buffer-function no longer
works properly (for example, without the minibuffer-setup-hook,
iswitchb-read-buffer
is even less functional than the default).  Perhaps that comment should
be removed?





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#9378; Package emacs. (Thu, 08 Sep 2011 01:33:01 GMT) Full text and rfc822 format available.

Message #14 received at 9378 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: "Paul Du Bois" <dubois <at> doublefine.com>
Cc: 9378 <at> debbugs.gnu.org
Subject: Re: bug#9378: 23.3; iswitchb-make-buflist returns a nonexistent buffer
Date: Wed, 07 Sep 2011 21:28:59 -0400
"Paul Du Bois" wrote:

> this advice which is still in the file header comment block as of emacs
> 23:
>
> ;; Replacement for read-buffer
>
> ;; iswitchb-read-buffer has been written to be a drop in replacement
> ;; for the normal buffer selection routine `read-buffer'.  To use
> ;; iswitch for all buffer selections in Emacs, add:
> ;; (setq read-buffer-function 'iswitchb-read-buffer)
>
> I'll switch over, but from some experimentation, it seems like using
> read-buffer-function no longer works properly (for example, without
> the minibuffer-setup-hook, iswitchb-read-buffer is even less
> functional than the default). Perhaps that comment should be removed?

I don't use iswitchb, but I thought that comment was describing
something extra you can optionally do, beyond what iswitchb-mode (which
is mentioned at the start of the commentary) does by default.

lispref/minibuf.texi still refers to this, so would also need updating
if this is incorrect.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9378; Package emacs. (Fri, 07 Feb 2014 03:31:07 GMT) Full text and rfc822 format available.

Message #17 received at 9378 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 9378 <at> debbugs.gnu.org, Paul Du Bois <dubois <at> doublefine.com>
Subject: Re: bug#9378: 23.3; iswitchb-make-buflist returns a nonexistent buffer
Date: Thu, 06 Feb 2014 19:29:41 -0800
iswitchb is an obsolete package, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug closed, send any further explanations to 9378 <at> debbugs.gnu.org and "Paul Du Bois" <dubois <at> doublefine.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 07 Feb 2014 03:32:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9378; Package emacs. (Fri, 07 Feb 2014 03:39:01 GMT) Full text and rfc822 format available.

Message #22 received at 9378 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Glenn Morris <rgm <at> gnu.org>
Cc: 9378 <at> debbugs.gnu.org, Paul Du Bois <dubois <at> doublefine.com>
Subject: RE: bug#9378: 23.3; iswitchb-make-buflist returns a nonexistent buffer
Date: Thu, 6 Feb 2014 19:38:40 -0800 (PST)
> iswitchb is an obsolete package, so I'm closing this bug report.

See my reply to the same statement made for bug #3713.
Where does it say that iswitchb is an obsolete package?




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 07 Mar 2014 12:24:06 GMT) Full text and rfc822 format available.

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.