bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33669: 26.1; Buffer-menu-mode bad UX


From: Eli Zaretskii
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@gnu.org>
> Cc: 33669@debbugs.gnu.org
> 
> > From: Devon Sean McCullough <Emacs-Hacker2018@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 ()
> 
> 
> 
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]