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#4515: 23.1.50; Reverting changes on versioned file does not revert vc modeline status Date: Wed, 23 Sep 2009 14:21:37 -0700 (PDT) Message-ID: <200909232121.n8NLLb89001068@godzilla.ics.uci.edu> References: <87ws3rlnny.fsf@telefonica.net> <200909230553.n8N5rEsT023798@godzilla.ics.uci.edu> <87eipykve3.fsf@telefonica.net> <200909231836.n8NIa6Lv029481@godzilla.ics.uci.edu> <874oqtlaq0.fsf@telefonica.net> Reply-To: Dan Nicolaescu , 4515@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1253742450 7369 80.91.229.12 (23 Sep 2009 21:47:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Sep 2009 21:47:30 +0000 (UTC) Cc: 4515@emacsbugs.donarmstrong.com To: =?UTF-8?Q?=C3=93scar?= Fuentes Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 23 23:47:22 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MqZgE-0008Vv-4o for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Sep 2009 23:47:18 +0200 Original-Received: from localhost ([127.0.0.1]:34636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqZgD-0007RM-GX for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Sep 2009 17:47:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqZg8-0007RH-GV for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 17:47:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqZg3-0007Qn-VR for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 17:47:11 -0400 Original-Received: from [199.232.76.173] (port=32996 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqZg3-0007Qk-QF for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 17:47:07 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:45389) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MqZg2-0000Ci-DY for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 17:47:06 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8NLl3Qu023013; Wed, 23 Sep 2009 14:47:03 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8NLU3gJ020562; Wed, 23 Sep 2009 14:30:03 -0700 Resent-Date: Wed, 23 Sep 2009 14:30:03 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 23 Sep 2009 21:30:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4515 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4515-submit@emacsbugs.donarmstrong.com id=B4515.125374091019474 (code B ref 4515); Wed, 23 Sep 2009 21:30:03 +0000 Original-Received: (at 4515) by emacsbugs.donarmstrong.com; 23 Sep 2009 21:21:50 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8NLLn7v019469 for <4515@emacsbugs.donarmstrong.com>; Wed, 23 Sep 2009 14:21:50 -0700 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by sallyv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n8NLLb2u016656; Wed, 23 Sep 2009 14:21:37 -0700 (PDT) Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n8NLLb89001068; Wed, 23 Sep 2009 14:21:37 -0700 (PDT) In-Reply-To: <874oqtlaq0.fsf@telefonica.net> =?UTF-8?Q?("=C3=93scar?= Fuentes"'s message of "Wed, 23 Sep 2009 21:31:03 +0200") Original-Lines: 73 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n8NLLb2u016656 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 23 Sep 2009 17:47:11 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31416 Archived-At: =C3=93scar Fuentes writes: > Dan Nicolaescu writes: >=20 > > =C3=93scar Fuentes writes: > > > > > Dan Nicolaescu writes: > > >=20 > > > > ofv@wanadoo.es. "(=C3=93scar" Fuentes) writes: > > > > > > > > > Please write in English if possible, because the Emacs main= tainers > > > > > usually do not have translators to read other languages for= them. > > > > >=20 > > > > > Your bug report will be posted to the emacs-pretest-bug@gnu= .org mailing list. > > > > >=20 > > > > > Please describe exactly what actions triggered the bug > > > > > and the precise symptoms of the bug: > > > > >=20 > > > > > When a modified versioned file is edited in such a way that= the > > > > > modifications undoes previous changes to the file, after sa= ving it the > > > > > VC-dired buffer for the working copy is automatically updat= ed showing > > > > > that the status of the file is "up to date", but the VC mod= eline for the > > > > > buffer that visits the file does not change and keeps indic= ating that > > > > > the file state is "locally modified". > > > > > > > > Can you please describe step by step the actions necessary to r= eproduce > > > > this starting from emacs -Q? > > >=20 > > > emacs -Q > > >=20 > > > C-x C-f some-versioned-unmodified-file > > > do some edition > > > C-x C-s (the VC status modeline indicator changes from `-' to `:') > > > undo previous edition > > > C-x C-s > > >=20 > > > Now you just turned the file to its original state and is unmodif= ied as > > > far as the version control system is concerned, but the VC modeli= ne > > > keeps showing `:' (for example Bzr:836) indicating that the file = is > > > edited. After saving a versioned file, VC should check if the VC = backend > > > flags the file as edited and update the modeline accordingly. > > > > You can do M-x revert-buffer or C-x v u and that would reset the VC > > state accordingly. >=20 > Yes, I know. >=20 > > Checking for this condition after each save is prohibitively expensiv= e, > > and it's an extremely rare event, so it's not worth optimizing for. >=20 > Automatically checking the VC state after each save is actually > performed if there is a vc-dired buffer for the working copy where the > file resides. That check updates the vc-dired with the correct state of > the saved file. >=20 > Part of my job is experimenting tweaks and micro-improvements on > existing code bases. After every session I end with lots of buffers > showing the "edited" vc modeline indicator when in fact only one or two > are effectively edited. This renders useless the vc state indicator and > turns its meaning into "When `:' is shown, this file was edited, but it > may be up-to-date now". >=20 > > So this is neither a bug, not something worth improving. >=20 > Well, the vc status on the modeline is showing the wrong state. > Would you accept a patch that implements an option for checking after > every save and updating the vc state on the modeline accordingly? Although I've done a lot of work on VC, I am not an official maintainer of VC, so I am in no position to do that. But I don't think such a change is a good idea.