From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#49869: Revert buffer? Yes/No/Maybe Date: Fri, 06 Aug 2021 02:33:55 +0300 Organization: LINKOV.NET Message-ID: <87bl6bcw6s.fsf@mail.linkov.net> References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> <87lf5h53u0.fsf@mail.linkov.net> <83wnp0jvb2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1365"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 49869@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 06 01:41:22 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 1mBmzI-0000Bm-Sb for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Aug 2021 01:41:20 +0200 Original-Received: from localhost ([::1]:57816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBmzH-0000up-Eg for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Aug 2021 19:41:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBmz1-0000py-9D for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 19:41:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37091) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBmz0-0003jm-Gn for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 19:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBmz0-0000nP-Dn for bug-gnu-emacs@gnu.org; Thu, 05 Aug 2021 19:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Aug 2021 23:41:02 +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.16282068503003 (code B ref 49869); Thu, 05 Aug 2021 23:41:02 +0000 Original-Received: (at 49869) by debbugs.gnu.org; 5 Aug 2021 23:40:50 +0000 Original-Received: from localhost ([127.0.0.1]:48631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBmyo-0000mN-E8 for submit@debbugs.gnu.org; Thu, 05 Aug 2021 19:40:50 -0400 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:39919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBmym-0000m8-Ph for 49869@debbugs.gnu.org; Thu, 05 Aug 2021 19:40:49 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id E9AB5100002; Thu, 5 Aug 2021 23:40:41 +0000 (UTC) In-Reply-To: <83wnp0jvb2.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Aug 2021 08:48:49 +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:211272 Archived-At: >> 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. I discovered this problem while editing source code in one Emacs instance, and updating the source file in `emacs -Q`. To get an updated version of the file in `emacs -Q` required typing 4 more keys after every revert. >> 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. The question was why require typing more keys when there are no unsaved changes.