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

* bug#10987: ibuffer: remove "No Buffers" error
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Chong Yidong @ 2012-03-11 17:32 UTC (permalink / raw)
  To: 10987

Christopher Schmidt <christopher@ch.ristopher.com> writes:

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

Thanks.  I committed your patch to trunk.





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

* bug#10987: ibuffer: remove "No Buffers" error
  2012-03-11 17:32 ` Chong Yidong
@ 2012-03-11 18:34   ` Christopher Schmidt
  2012-03-12  2:41     ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Schmidt @ 2012-03-11 18:34 UTC (permalink / raw)
  To: 10987

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

Chong Yidong <cyd@gnu.org> writes:

> Thanks.  I committed your patch to trunk.

Thank you very much.  I just skimmed through ibuffer.el and found the
same error in ibuffer-redisplay.

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

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4710434..5b11660 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-11  Christopher Schmidt  <christopher@ch.ristopher.com>
+
+	* ibuffer.el (ibuffer-redisplay): Remove gratuitous error
+	(Bug#10987).
+
 2012-03-11  Michael Albinus  <michael.albinus@gmx.de>
 
 	* autorevert.el (auto-revert-handler): Ensure, that
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 7db4cc4..7e5a4aa 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -2173,11 +2173,10 @@ If optional arg SILENT is non-nil, do not display progress messages."
 		   (cadr bufs))
 		 (ibuffer-current-buffers-with-marks bufs)
 		 ibuffer-display-maybe-show-predicates)))
-    (when (null blist)
-      (if (and (featurep 'ibuf-ext)
+    (when (and (null blist)
+	       (featurep 'ibuf-ext)
 	       ibuffer-filtering-qualifiers)
-	  (message "No buffers! (note: filtering in effect)")
-	(error "No buffers!")))
+      (message "No buffers! (note: filtering in effect)"))
     (unless silent
       (message "Updating buffer list..."))
     (ibuffer-redisplay-engine blist arg)

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


        Christopher

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

* bug#10987: ibuffer: remove "No Buffers" error
  2012-03-11 18:34   ` Christopher Schmidt
@ 2012-03-12  2:41     ` Chong Yidong
  0 siblings, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2012-03-12  2:41 UTC (permalink / raw)
  To: 10987

Christopher Schmidt <christopher@ch.ristopher.com> writes:

> Chong Yidong <cyd@gnu.org> writes:
>
>> Thanks.  I committed your patch to trunk.
>
> Thank you very much.  I just skimmed through ibuffer.el and found the
> same error in ibuffer-redisplay.

Thanks, committed.





^ permalink raw reply	[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).