From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Idea for C-x v u Date: Mon, 27 Jun 2011 09:06:13 -0400 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: dough.gmane.org 1309180230 25873 80.91.229.12 (27 Jun 2011 13:10:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2011 13:10:30 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 27 15:10:26 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QbBa5-0007VQ-4L for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2011 15:10:25 +0200 Original-Received: from localhost ([::1]:34883 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbBa4-0003EC-17 for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2011 09:10:24 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:40023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbBWB-0002VV-0W for emacs-devel@gnu.org; Mon, 27 Jun 2011 09:06:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbBW2-0008Bn-Ni for emacs-devel@gnu.org; Mon, 27 Jun 2011 09:06:22 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:48503) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbBW2-0008Bd-4z for emacs-devel@gnu.org; Mon, 27 Jun 2011 09:06:14 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QbBW1-0002a5-FS; Mon, 27 Jun 2011 09:06:13 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:141067 Archived-At: It is definitely a good idea to check the diffs of a file before reverting a change, but normally it's a waste of time for C-x v u to do that because I will have done it manually. However, if I ever forget to do that, it wouldn't hurt for C-x v u to remind me. So here's an idea. Make C-x v d record the tick count of the buffer when it was done. Then C-x v u can show a diff, if you have not made one of that buffer since the last edit in it. This might be universally better than the two optional choices that were previously proposed (either unconditionally show a diff, or never show a diff). Another idea is: if you have not made a diff since the last change in the buffer, give an error, "Please look at a diff using C-x v = before doing C-x v u". It is more convenient for the user to make the diff with a separate command than to examine it inside of yes-or-no-p. Even if C-x v u does not make a diff, it should always call yes-or-no-p. -- Dr Richard Stallman President, Free Software Foundation 51 Franklin St Boston MA 02110 USA www.fsf.org, www.gnu.org Skype: No way! That's nonfree (freedom-denying) software. Use free telephony http://directory.fsf.org/category/tel/