Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe

From: Eli Zaretskii <[email-masked]>
Date: Thu, 05 Aug 2021 08:48:49 +0300

> From: Juri Linkov <[email-masked]>
> Cc: [email-masked]
> Date: Wed, 04 Aug 2021 23:43:43 +0300
> 
> > Since we now have the use-short-answers option, why is it a problem to
> > have to confirm, if you could make it a single key?
> 
> The problem is that by default the length of the key sequence
> when the user decides to revert the current buffer
> is 7 keys:
> 
>   'C-x x g y e s RET'
> 
> With the patch provided by Gregory the default length
> will be reduced to 4 keys:
> 
>   'C-x x g y'
> 
> or to 3 keys when there are no unsaved changes.

First, you can have those 4 keys if you customize use-short-answers;
no changes in Emacs are necessary.

And second, are you talking only about reverting when there are no
unsaved changes?  If so, what are the use cases when you need to do
such a thing, and why?  Perhaps such use cases justify a separate
command and key binding, like "C-x RET r" does for one such use case.

> But when the user decided to revert the buffer explicitly,
> why require to type more keys?

In general, when there are unsaved changes?  To let the user think one
last time before doing something potentially very destructive.