From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: bug#8447: Undoing M-x revert-buffer Date: Mon, 11 Apr 2011 22:25:39 -0600 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1302583048 8146 80.91.229.12 (12 Apr 2011 04:37:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 12 Apr 2011 04:37:28 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 12 06:37:25 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from [140.186.70.17] (helo=lists.gnu.org) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9VLw-0001eX-PA for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Apr 2011 06:37:25 +0200 Original-Received: from localhost ([::1]:55815 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9VLw-0007TT-2W for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Apr 2011 00:37:24 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:38281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9VLt-0007TK-Vi for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2011 00:37:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9VLt-0006q7-0X for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2011 00:37:21 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9VLs-0006q3-VI for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2011 00:37:20 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q9VAv-0001tl-Oh; Tue, 12 Apr 2011 00:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kevin Rodgers Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Apr 2011 04:26:01 +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: Original-Received: via spool by submit@debbugs.gnu.org id=B.13025823597289 (code B ref -1); Tue, 12 Apr 2011 04:26:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Apr 2011 04:25:59 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9VAt-0001tV-CE for submit@debbugs.gnu.org; Tue, 12 Apr 2011 00:25:59 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9VAq-0001tK-Ui for submit@debbugs.gnu.org; Tue, 12 Apr 2011 00:25:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9VAl-0004re-2u for submit@debbugs.gnu.org; Tue, 12 Apr 2011 00:25:51 -0400 Original-Received: from [140.186.70.17] (port=59960 helo=lists.gnu.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9VAl-0004rY-0V for submit@debbugs.gnu.org; Tue, 12 Apr 2011 00:25:51 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9VAk-00047O-6l for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2011 00:25:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9VAj-0004r3-DR for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2011 00:25:50 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:37160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9VAj-0004qh-6E for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2011 00:25:49 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q9VAe-0005Hc-Fp for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2011 06:25:45 +0200 Original-Received: from c-24-8-96-241.hsd1.co.comcast.net ([24.8.96.241]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Apr 2011 06:25:44 +0200 Original-Received: from kevin.d.rodgers by c-24-8-96-241.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Apr 2011 06:25:44 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-24-8-96-241.hsd1.co.comcast.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 12 Apr 2011 00:26:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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 X-Broken-Reverse-DNS: no host name found for IP address 140.186.70.17 Xref: news.gmane.org gmane.emacs.bugs:45771 Archived-At: On 4/8/11 9:54 AM, Hrvoje Nikšić wrote: > It would be nice to be able to undo a revert-buffer operation. > > I've just had a situation where I used M-x revert-buffer, and > immediately wanted to see the old version again. (I wanted to briefly > compare the old and new contents, which only differed in several > characters.) I routinely pressed C-_, and got a "no undo data" message > in the echo area. For the shortest instant I was surprised, but I > quickly remembered that M-x revert-buffer clears the undo stack, and > that it has always worked that way. > > But I would like to question this design choice. What I wanted to do > was not really unreasonable. The buffer held several kilobytes of data, > and my computer has gigabytes of memory at its disposal, enough room to > hold the buffer contents literally a million times over. If you think > about it, reverting an existing buffer is just another operation on > buffer text, not that different than M-x erase-buffer followed by M-x > insert-file, which would happily remember everything. > > If the maintainers agree in principle, I'd like to look into patching > revert-buffer so it records the revert as it would any other change to > the buffer text. In the short term, or if the maintainers do not agree to Hrvoje's proposal, how about adding a warning to the "Revert buffer from file FILE? " yes-or-no-p prompt? -- Kevin Rodgers Denver, Colorado, USA