GNU bug report logs - #33669
26.1; Buffer-menu-mode bad UX

Previous Next

Package: emacs;

Reported by: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>

Date: Sat, 8 Dec 2018 02:08:02 UTC

Severity: normal

Found in version 26.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>
Cc: 33669 <at> debbugs.gnu.org
Subject: bug#33669: 26.1; Buffer-menu-mode bad UX
Date: Sat, 22 Dec 2018 12:50:10 +0200
Ping!  Devon, could you please try the proposed fix?

> Date: Sat, 08 Dec 2018 13:07:42 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 33669 <at> debbugs.gnu.org
> 
> > From: Devon Sean McCullough <Emacs-Hacker2018 <at> jovi.net>
> > Date: Sat, 8 Dec 2018 10:06:48 +0800
> > 
> > When Buffer-menu-execute asks
> > 
> > 	Buffer foo modified; kill anyway? (yes or no)
> > 
> > and the reply is no,
> > that line is removed anyway, deceiving the user
> > by making the buffer menu incorrect.
> > 
> > The user will promptly seek out such buffers — but they disappeared,
> > giving the distressing wrong impression that they were killed anyway.
> 
> Thanks for reporting this.  Does the patch below give good results?
> 
> diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
> index bc1288a..95746b3 100644
> --- a/lisp/buff-menu.el
> +++ b/lisp/buff-menu.el
> @@ -476,9 +476,10 @@ Buffer-menu-execute
>  			 (tabulated-list-set-col 2 " " t))
>  		     (error (warn "Error saving %s" buffer))))
>  		 (if delete
> -		     (unless (eq buffer (current-buffer))
> -		       (kill-buffer buffer)
> -		       (tabulated-list-delete-entry))
> +		     (if (and (not (eq buffer (current-buffer)))
> +                              (kill-buffer buffer))
> +                         (tabulated-list-delete-entry)
> +                       (forward-line 1))
>  		   (forward-line 1)))))))))
>  
>  (defun Buffer-menu-select ()
> 
> 
> 
> 




This bug report was last modified 6 years and 128 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.