[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ca95e45f7e8: Avoid confusing message in Ibuffer (bug#64230)
From: |
Stephen Berman |
Subject: |
master ca95e45f7e8: Avoid confusing message in Ibuffer (bug#64230) |
Date: |
Mon, 11 Sep 2023 10:15:45 -0400 (EDT) |
branch: master
commit ca95e45f7e828aebdf2736c9c7b2d64f9621214e
Author: Stephen Berman <stephen.berman@gmx.net>
Commit: Stephen Berman <stephen.berman@gmx.net>
Avoid confusing message in Ibuffer (bug#64230)
* lisp/ibuffer.el (ibuffer-map-lines): With `ibuffer-auto-mode'
enabled, Ibuffer counts the automatically popped up (and hence not
user-marked) buffer "*Ibuffer confirmation*". Since Ibuffer
reports how many user-marked buffers were acted upon, and in this
case the reported count would be too high by one, decrement the
count to avoid the confusing message.
---
lisp/ibuffer.el | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index a26bb1811ec..b5a7f2d04e0 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1872,7 +1872,8 @@ the buffer object itself and the current mark symbol."
(let ((result
(if (buffer-live-p (ibuffer-current-buffer))
(when (or (null group)
- (when-let ((it (get-text-property (point)
'ibuffer-filter-group)))
+ (when-let ((it (get-text-property
+ (point)
'ibuffer-filter-group)))
(equal group it)))
(save-excursion
(funcall function
@@ -1897,7 +1898,16 @@ the buffer object itself and the current mark symbol."
(t
(cl-incf ibuffer-map-lines-count)
(forward-line 1)))))
- ibuffer-map-lines-count)
+ ;; With `ibuffer-auto-mode' enabled, the preceding loop
+ ;; counts the automatically popped up (and hence not
+ ;; user-marked) buffer "*Ibuffer confirmation*". Since
+ ;; Ibuffer reports how many user-marked buffers were acted
+ ;; upon, and in this case the reported count would be too
+ ;; high by one, we decrement the count to avoid the
+ ;; confusing message (see bug#64230).
+ (if (and (featurep 'ibuf-ext) ibuffer-auto-mode)
+ (1- ibuffer-map-lines-count)
+ ibuffer-map-lines-count))
(progn
(setq buffer-read-only t)
(unless nomodify
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ca95e45f7e8: Avoid confusing message in Ibuffer (bug#64230),
Stephen Berman <=