unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10987: ibuffer: remove "No Buffers" error
@ 2012-03-10 12:18 Christopher Schmidt
  2012-03-11 17:32 ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Schmidt @ 2012-03-10 12:18 UTC (permalink / raw)
  To: 10987

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

Hi gurus,

I noticed a little issue with ibuffer on GNU Emacs 24.0.94.1
(x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2012-03-10.

I use ibuffer-never-show-predicates to reduce the list of buffers in
ibuffer.  This works fine whilst there are buffers for ibuffer to
display.  If there are no buffers, ibuffer will error (and will leave an
unusable ibuffer-buffer behind).  What the point behind this error?  I
think that no buffers is a perfectly legitimate situation.

Recipe:
emacs -q
eval: (require 'ibuf-ext)
(push "" ibuffer-never-show-predicates)
M-x ibuffer RET

I think the whole error should be removed.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ibuffer.diff --]
[-- Type: text/x-diff, Size: 789 bytes --]

diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 17be553..7db4cc4 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -2140,11 +2140,10 @@ If optional arg SILENT is non-nil, do not display progress messages."
   (unless silent
     (message "Redisplaying current buffer list..."))
   (let ((blist (ibuffer-current-state-list)))
-    (when (null blist)
-      (if (and (featurep 'ibuf-ext)
+    (when (and (null blist)
+	       (featurep 'ibuf-ext)
 	       (or ibuffer-filtering-qualifiers ibuffer-hidden-filter-groups))
-	  (message "No buffers! (note: filtering in effect)")
-	(error "No buffers!")))
+      (message "No buffers! (note: filtering in effect)"))
     (ibuffer-redisplay-engine blist t)
     (unless silent
       (message "Redisplaying current buffer list...done"))

[-- Attachment #3: Type: text/plain, Size: 21 bytes --]


        Christopher

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-12  2:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-10 12:18 bug#10987: ibuffer: remove "No Buffers" error Christopher Schmidt
2012-03-11 17:32 ` Chong Yidong
2012-03-11 18:34   ` Christopher Schmidt
2012-03-12  2:41     ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).