From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#8447: Undoing M-x revert-buffer Date: Wed, 29 May 2013 06:27:40 -0700 (PDT) Message-ID: References: <96119924-8d40-4c32-a1c8-57e9df719e73@default> <51A59D77.9040709@easy-emacs.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1369834134 28473 80.91.229.3 (29 May 2013 13:28:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 May 2013 13:28:54 +0000 (UTC) To: andreas.roehler@easy-emacs.de, 8447@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 29 15:28:51 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UhgQq-0005Fn-EX for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 May 2013 15:28:48 +0200 Original-Received: from localhost ([::1]:58794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhgQq-0005SP-1a for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 May 2013 09:28:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhgQj-0005OU-Lt for bug-gnu-emacs@gnu.org; Wed, 29 May 2013 09:28:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhgQi-0007Q0-7b for bug-gnu-emacs@gnu.org; Wed, 29 May 2013 09:28:41 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhgQi-0007Pm-49 for bug-gnu-emacs@gnu.org; Wed, 29 May 2013 09:28:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UhgS2-0008SX-HX for bug-gnu-emacs@gnu.org; Wed, 29 May 2013 09:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 May 2013 13:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8447 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Andreas =?UTF-8?Q?R=C3=B6hler?= , bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.136983417132446 (code B ref -1); Wed, 29 May 2013 13:30:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 May 2013 13:29:31 +0000 Original-Received: from localhost ([127.0.0.1]:39424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UhgRV-0008RF-Q3 for submit@debbugs.gnu.org; Wed, 29 May 2013 09:29:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46759) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UhgRM-0008Qr-Oz for submit@debbugs.gnu.org; Wed, 29 May 2013 09:29:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhgPu-000705-GX for submit@debbugs.gnu.org; Wed, 29 May 2013 09:27:51 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:38749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhgPu-000701-Cw for submit@debbugs.gnu.org; Wed, 29 May 2013 09:27:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhgPt-0004fV-1v for bug-gnu-emacs@gnu.org; Wed, 29 May 2013 09:27:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhgPr-0006yo-Lb for bug-gnu-emacs@gnu.org; Wed, 29 May 2013 09:27:48 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:37318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhgPr-0006xL-FV for bug-gnu-emacs@gnu.org; Wed, 29 May 2013 09:27:47 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r4TDRgFo021642 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 29 May 2013 13:27:43 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r4TDRfFk026805 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 29 May 2013 13:27:42 GMT Original-Received: from abhmt102.oracle.com (abhmt102.oracle.com [141.146.116.54]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r4TDRf6s028267; Wed, 29 May 2013 13:27:41 GMT In-Reply-To: <51A59D77.9040709@easy-emacs.de> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.7 (607090) [OL 12.0.6668.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:74638 Archived-At: > >> I just installed into the trunk a patch which should make > >> revert-buffer undoable. > > > > FWIW, see my comment on this in the help list: > > http://lists.gnu.org/archive/html/help-gnu-emacs/2013-05/msg00671.html > > > > In sum, why? And why no discussion? Where was the "bug"? > as it happened, run sometimes into this: > reverting the buffer, which turned out not the right thing - but undo- > history was lost. Consider it a useful change, thanks. By "turned out not the right thing" I guess you mean that someone used `rev= ert-buffer' interactively and by mistake. And by mistake also _confirmed_ = reverting. Yes, it can happen (to anyone). So define a command `revert-buffer-keeping-undo', and use that interactivel= y instead of `revert-buffer'. Or define a variable (option or internal) `r= evert-buffer-keeps-undo'. What you cite is a user-interface issue - i.e., only for interactive use of= the command. Such a change, to safeguard against mistaken reverting, is a= kin to removing files to a trash bin instead of deleting them. But we did = not just willy nilly change the behavior of the basic function (command) `d= elete-file' when we added support for a recycle/trash bin. That's not the = right approach. With extra interactive protection as the only reason, this is also akin to = some users (me, for instance) wanting `C-w' to prompt for confirmation if t= he region is over a certain size (as in wimpy-del.el). Certainly such safe= guard features can be useful. But this change goes way beyond offering users optional extra protection. = `revert-buffer' is also used in basic code. The right way to add such protection against mistaken reversion is to creat= e a separate command or option, letting users choose to use it or not. And= leave the basic `revert-buffer' alone. FWIW, I agree that such a feature can be useful for reverting interactively= . And why no discussion before making such a change?