From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#49869: Revert buffer? Yes/No/Maybe Date: Thu, 05 Aug 2021 08:48:49 +0300 Message-ID: <83wnp0jvb2.fsf@gnu.org> References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> <87lf5h53u0.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23257"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49869@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 05 07:49:19 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBWFq-0005ov-RV for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Aug 2021 07:49:18 +0200 Original-Received: from localhost ([::1]:47016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBWFp-0002Dk-Is for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Aug 2021 01:49:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBWFc-0001la-1u for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 01:49:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBWFb-0001BO-RT for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 01:49:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBWFb-0006oI-Py for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 01:49:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Aug 2021 05:49:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49869 X-GNU-PR-Package: emacs Original-Received: via spool by 49869-submit@debbugs.gnu.org id=B49869.162814253826131 (code B ref 49869); Thu, 05 Aug 2021 05:49:03 +0000 Original-Received: (at 49869) by debbugs.gnu.org; 5 Aug 2021 05:48:58 +0000 Original-Received: from localhost ([127.0.0.1]:45650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBWFV-0006nP-Pq for submit@debbugs.gnu.org; Thu, 05 Aug 2021 01:48:58 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBWFU-0006nC-5Y for 49869@debbugs.gnu.org; Thu, 05 Aug 2021 01:48:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55756) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBWFO-00010N-J7; Thu, 05 Aug 2021 01:48:50 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3188 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBWFO-0000Fw-6d; Thu, 05 Aug 2021 01:48:50 -0400 In-Reply-To: <87lf5h53u0.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 04 Aug 2021 23:43:43 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211203 Archived-At: > From: Juri Linkov > Cc: 49869@debbugs.gnu.org > 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.