From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#8927: 24.0.50; Flaw in C-x v u Date: Sun, 26 Jun 2011 01:38:55 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1309066825 23191 80.91.229.12 (26 Jun 2011 05:40:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 26 Jun 2011 05:40:25 +0000 (UTC) Cc: 8927@debbugs.gnu.org, rms@gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 26 07:40:20 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Qai4y-0006Sc-BI for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Jun 2011 07:40:20 +0200 Original-Received: from localhost ([::1]:47053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qai4x-0002EI-Cz for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Jun 2011 01:40:19 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qai4j-0002Cm-8O for bug-gnu-emacs@gnu.org; Sun, 26 Jun 2011 01:40:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qai4h-0002uu-Q0 for bug-gnu-emacs@gnu.org; Sun, 26 Jun 2011 01:40:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qai4h-0002uq-Ig for bug-gnu-emacs@gnu.org; Sun, 26 Jun 2011 01:40:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Qai4h-000699-7d; Sun, 26 Jun 2011 01:40:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dan Nicolaescu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Jun 2011 05:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8927 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8927-submit@debbugs.gnu.org id=B8927.130906674523555 (code B ref 8927); Sun, 26 Jun 2011 05:40:03 +0000 Original-Received: (at 8927) by debbugs.gnu.org; 26 Jun 2011 05:39:05 +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 1Qai3k-00067s-Ti for submit@debbugs.gnu.org; Sun, 26 Jun 2011 01:39:05 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qai3i-00067O-5P for 8927@debbugs.gnu.org; Sun, 26 Jun 2011 01:39:02 -0400 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Qai3b-0000qN-Fg; Sun, 26 Jun 2011 01:38:55 -0400 In-Reply-To: (Chong Yidong's message of "Sun, 26 Jun 2011 00:08:22 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 26 Jun 2011 01:40:03 -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 Xref: news.gmane.org gmane.emacs.bugs:47482 Archived-At: Chong Yidong writes: > Richard Stallman writes: > >> Anyway, that's why it kills your *vc-diff* buffer - because it assumes >> it has just created it. The fix for your problem would presumably be for >> vc-revert to only kill the buffer if it did not exist beforehand. >> >> C-x v u should preserve the previous contents of *vc-diff*. > > I've checked in a fix to avoid clobbering an existing vc-diff buffer > when vc-revert shows a diff temporarily. > > I agree with Glenn, though, that showing a vc-diff buffer for this > operation is not a good idea. Apart from the problems he mentioned, the > diff is not useful anyway, since there is no way to scroll the window > during the yes-nor-no prompt. I added a new option vc-revert-show-diff > to control whether vc-revert should show a diff, and made it default to > nil. I strongly disagree with this change of a long standing behavior. Showing the diff is an good visual aid in checking that the user indeed intends to revert that file. It's not that hard to type C-x v u in the wrong window if one has many windows opened, and the files have similar names. C-x v u is destructive, it's easy to lose data, so it seems that it would be much better to err on the side of caution. Can't RMS' original complaint be solved by making vc-revert use a *vc revert diff* buffer instead of just *vc diff*?