unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Devon Sean McCullough <Emacs-Hacker2018@jovi.net>
Cc: 33669@debbugs.gnu.org
Subject: bug#33669: 26.1; Buffer-menu-mode bad UX
Date: Sat, 22 Dec 2018 12:50:10 +0200	[thread overview]
Message-ID: <83muoxal99.fsf@gnu.org> (raw)
In-Reply-To: <83tvjo46pt.fsf@gnu.org> (message from Eli Zaretskii on Sat, 08 Dec 2018 13:07:42 +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	other threads:[~2018-12-22 10:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-08  2:06 bug#33669: 26.1; Buffer-menu-mode bad UX Devon Sean McCullough
2018-12-08 11:07 ` Eli Zaretskii
2018-12-22 10:50   ` Eli Zaretskii [this message]
2019-01-05  8:44     ` Eli Zaretskii
     [not found]       ` <0D3D3224-4085-4608-9367-02F51D74B528@jovi.net>
2019-01-12 11:53         ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83muoxal99.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=33669@debbugs.gnu.org \
    --cc=Emacs-Hacker2018@jovi.net \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).