unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12487: 24.2.50; Inconsistent, so confusing, confirmation msgs for `find-alternate-file'
@ 2012-09-22 17:30 Drew Adams
  2012-09-22 23:03 ` Juri Linkov
  2012-10-29 13:29 ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Drew Adams @ 2012-09-22 17:30 UTC (permalink / raw)
  To: 12487

emacs -Q
 
Visit an existing file foo.  Make some changes, without saving.  `C-x
C-v RET', to re-visit foo, effectively reverting it.
 
You are asked "Buffer foo is modified; save it first (yes or no)".
(There is no question mark here, BTW.)  You reply "no".  Then you are
asked "Kill and replace the buffer without saving it? (yes or no)".
(This time there is a question mark, as there should be.)  You ponder a
minute, then reply "yes".
 
This is a common use case when a user wants to abandon edits by using
`C-x C-v'.  Note that `revert-buffer' will not revert everything that
`C-x C-v' reverts.  Overlays etc. remain, so it can sometimes be useful
to use `C-x C-v' here.
 
Here's the problem: You changed the first message, flipping its sense,
so now, if a user wants to discard the changes s?he has to first say
"no", s?he does not want to save the changes, and then s?he has to say
"yes", s?he really wants to replace the buffer.
 
This inconsistency is confusing and thus error-prone.  While your change
was no doubt motivated by wanting to avoid user errors, it actually
promotes them, at least in this scenario.
 
Furthermore, why are you asking the second question, if the reply to the
first is "no"?  If the user does not want to save the changes, then why
ask again, especially with a reversed sense for the question?
 

In GNU Emacs 24.2.50.1 (i386-mingw-nt5.1.2600)
 of 2012-09-17 on MARVIN
Bzr revision: 110062 cyd@gnu.org-20120917054104-r93rtwkrtva73ewe
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include
 -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
 -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'
 






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#12487: 24.2.50; Inconsistent, so confusing, confirmation msgs for `find-alternate-file'
  2012-09-22 17:30 bug#12487: 24.2.50; Inconsistent, so confusing, confirmation msgs for `find-alternate-file' Drew Adams
@ 2012-09-22 23:03 ` Juri Linkov
  2012-09-22 23:27   ` Drew Adams
  2012-09-23  2:52   ` bug#12487: 24.2.50; Inconsistent, so confusing, confirmation msgs for `find-alternate-file' Drew Adams
  2012-10-29 13:29 ` Stefan Monnier
  1 sibling, 2 replies; 6+ messages in thread
From: Juri Linkov @ 2012-09-22 23:03 UTC (permalink / raw)
  To: Drew Adams; +Cc: 12487

> You are asked "Buffer foo is modified; save it first (yes or no)".
> (There is no question mark here, BTW.)  You reply "no".  Then you are
> asked "Kill and replace the buffer without saving it? (yes or no)".

See also http://thread.gmane.org/gmane.emacs.devel/151762





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#12487: 24.2.50; Inconsistent, so confusing, confirmation msgs for `find-alternate-file'
  2012-09-22 23:03 ` Juri Linkov
@ 2012-09-22 23:27   ` Drew Adams
  2012-09-22 23:29     ` bug#12487: 24.2.50; Inconsistent, so confusing, confirmation msgs for`find-alternate-file' Drew Adams
  2012-09-23  2:52   ` bug#12487: 24.2.50; Inconsistent, so confusing, confirmation msgs for `find-alternate-file' Drew Adams
  1 sibling, 1 reply; 6+ messages in thread
From: Drew Adams @ 2012-09-22 23:27 UTC (permalink / raw)
  To: 'Juri Linkov'; +Cc: 12487

> > You are asked "Buffer foo is modified; save it first (yes or no)".
> > (There is no question mark here, BTW.)  You reply "no".  
> > Then you are asked "Kill and replace the buffer without saving it?
> > (yes or no)".
> 
> See also http://thread.gmane.org/gmane.emacs.devel/151762

Yes, thanks.  I will merge them.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#12487: 24.2.50; Inconsistent, so confusing, confirmation msgs for`find-alternate-file'
  2012-09-22 23:27   ` Drew Adams
@ 2012-09-22 23:29     ` Drew Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2012-09-22 23:29 UTC (permalink / raw)
  To: 'Juri Linkov'; +Cc: 12487

> > See also http://thread.gmane.org/gmane.emacs.devel/151762
> 
> Yes, thanks.  I will merge them.

Oops, sorry, I thought that other one was a bug report.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#12487: 24.2.50; Inconsistent, so confusing, confirmation msgs for `find-alternate-file'
  2012-09-22 23:03 ` Juri Linkov
  2012-09-22 23:27   ` Drew Adams
@ 2012-09-23  2:52   ` Drew Adams
  1 sibling, 0 replies; 6+ messages in thread
From: Drew Adams @ 2012-09-23  2:52 UTC (permalink / raw)
  To: 'Juri Linkov'; +Cc: 12487

> > You are asked "Buffer foo is modified; save it first (yes or no)".
> > (There is no question mark here, BTW.)  You reply "no".  
> > Then you are asked "Kill and replace the buffer without saving it?
> > (yes or no)".
> 
> See also http://thread.gmane.org/gmane.emacs.devel/151762

I really hope this gets fixed.  It was much better before (but there was room
for improvement).  Now I'm afraid that users will *lose data*.

It is just too easy to answer "yes" to the first question, thinking that it is
asking you to confirm the action that you, after all, asked for (which includes
abandoning any changes to the currently visited file).

`find-alternate-file' is not simply choosing to visit another buffer or file.
It is specifically an abandonment of the current state of the currently visited
file.

Especially for the common use case of using it to revert to the saved state of
the same file (and unmodified in any other way, including display - overlays
etc.).  At least for that case, the new interaction is a disaster.

Imagine asking someone whether s?he wants to *save* the current file when s?he
invokes `revert-buffer'!  Naturally, we ask exactly the opposite: are you sure
you want to abandon your changes?

We should ask a question (one, not two!) here, but the question should be
phrased in terms of confirming ("yes") that you want to abandon any
modifications.  It should not be phrased negatively, asking whether you want to
do something different from what the command intends, i.e., save your changes.

This change made to the user interaction no doubt reflects good intentions, but
it was misguided, IMHO.







^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#12487: 24.2.50; Inconsistent, so confusing, confirmation msgs for `find-alternate-file'
  2012-09-22 17:30 bug#12487: 24.2.50; Inconsistent, so confusing, confirmation msgs for `find-alternate-file' Drew Adams
  2012-09-22 23:03 ` Juri Linkov
@ 2012-10-29 13:29 ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2012-10-29 13:29 UTC (permalink / raw)
  To: Drew Adams; +Cc: 12487-done

> You are asked "Buffer foo is modified; save it first (yes or no)".
> (There is no question mark here, BTW.)  You reply "no".  Then you are
> asked "Kill and replace the buffer without saving it? (yes or no)".
> (This time there is a question mark, as there should be.)  You ponder a
> minute, then reply "yes".
 
Agreed.  I simply dropped the first question.  If the user wants to
save first she can just abort, save, and try again.


        Stefan





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-10-29 13:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-22 17:30 bug#12487: 24.2.50; Inconsistent, so confusing, confirmation msgs for `find-alternate-file' Drew Adams
2012-09-22 23:03 ` Juri Linkov
2012-09-22 23:27   ` Drew Adams
2012-09-22 23:29     ` bug#12487: 24.2.50; Inconsistent, so confusing, confirmation msgs for`find-alternate-file' Drew Adams
2012-09-23  2:52   ` bug#12487: 24.2.50; Inconsistent, so confusing, confirmation msgs for `find-alternate-file' Drew Adams
2012-10-29 13:29 ` Stefan Monnier

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).