diff options
| author | Stephen Berman | 2023-09-11 16:15:29 +0200 |
|---|---|---|
| committer | Stephen Berman | 2023-09-11 16:15:29 +0200 |
| commit | ca95e45f7e828aebdf2736c9c7b2d64f9621214e (patch) | |
| tree | b7915b41cd03c087ede92a5bc5cecbbc15ec8771 | |
| parent | 7a3e992ba5333672802729003104f4a733afa2cf (diff) | |
| download | emacs-ca95e45f7e828aebdf2736c9c7b2d64f9621214e.tar.gz emacs-ca95e45f7e828aebdf2736c9c7b2d64f9621214e.zip | |
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.
| -rw-r--r-- | lisp/ibuffer.el | 14 |
1 files 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." | |||
| 1872 | (let ((result | 1872 | (let ((result |
| 1873 | (if (buffer-live-p (ibuffer-current-buffer)) | 1873 | (if (buffer-live-p (ibuffer-current-buffer)) |
| 1874 | (when (or (null group) | 1874 | (when (or (null group) |
| 1875 | (when-let ((it (get-text-property (point) 'ibuffer-filter-group))) | 1875 | (when-let ((it (get-text-property |
| 1876 | (point) 'ibuffer-filter-group))) | ||
| 1876 | (equal group it))) | 1877 | (equal group it))) |
| 1877 | (save-excursion | 1878 | (save-excursion |
| 1878 | (funcall function | 1879 | (funcall function |
| @@ -1897,7 +1898,16 @@ the buffer object itself and the current mark symbol." | |||
| 1897 | (t | 1898 | (t |
| 1898 | (cl-incf ibuffer-map-lines-count) | 1899 | (cl-incf ibuffer-map-lines-count) |
| 1899 | (forward-line 1))))) | 1900 | (forward-line 1))))) |
| 1900 | ibuffer-map-lines-count) | 1901 | ;; With `ibuffer-auto-mode' enabled, the preceding loop |
| 1902 | ;; counts the automatically popped up (and hence not | ||
| 1903 | ;; user-marked) buffer "*Ibuffer confirmation*". Since | ||
| 1904 | ;; Ibuffer reports how many user-marked buffers were acted | ||
| 1905 | ;; upon, and in this case the reported count would be too | ||
| 1906 | ;; high by one, we decrement the count to avoid the | ||
| 1907 | ;; confusing message (see bug#64230). | ||
| 1908 | (if (and (featurep 'ibuf-ext) ibuffer-auto-mode) | ||
| 1909 | (1- ibuffer-map-lines-count) | ||
| 1910 | ibuffer-map-lines-count)) | ||
| 1901 | (progn | 1911 | (progn |
| 1902 | (setq buffer-read-only t) | 1912 | (setq buffer-read-only t) |
| 1903 | (unless nomodify | 1913 | (unless nomodify |