all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Schmidt <christopher@ch.ristopher.com>
To: 10987@debbugs.gnu.org
Subject: bug#10987: ibuffer: remove "No Buffers" error
Date: Sat, 10 Mar 2012 13:18:09 +0100	[thread overview]
Message-ID: <20120310121820.042301FDFB@saturn.ch.ristopher.com> (raw)

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

             reply	other threads:[~2012-03-10 12:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-10 12:18 Christopher Schmidt [this message]
2012-03-11 17:32 ` bug#10987: ibuffer: remove "No Buffers" error Chong Yidong
2012-03-11 18:34   ` Christopher Schmidt
2012-03-12  2:41     ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120310121820.042301FDFB@saturn.ch.ristopher.com \
    --to=christopher@ch.ristopher.com \
    --cc=10987@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.