From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=C3=93scar?= Fuentes 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 21:31:03 +0200 Message-ID: <874oqtlaq0.fsf@telefonica.net> References: <87ws3rlnny.fsf@telefonica.net> <200909230553.n8N5rEsT023798@godzilla.ics.uci.edu> <87eipykve3.fsf@telefonica.net> <200909231836.n8NIa6Lv029481@godzilla.ics.uci.edu> Reply-To: =?UTF-8?Q?=C3=93scar?= Fuentes , 4515@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1253738845 28448 80.91.229.12 (23 Sep 2009 20:47:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Sep 2009 20:47:25 +0000 (UTC) Cc: 4515@emacsbugs.donarmstrong.com To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 23 22:47:18 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 1MqYk7-0003gW-Os for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Sep 2009 22:47:16 +0200 Original-Received: from localhost ([127.0.0.1]:41257 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqYk7-0001MJ-7t for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Sep 2009 16:47:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqYk3-0001Lt-4T for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 16:47:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqYjy-0001J0-AL for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 16:47:10 -0400 Original-Received: from [199.232.76.173] (port=37367 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqYjy-0001Iv-5W for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 16:47:06 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:40382) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MqYjx-0000UQ-K9 for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2009 16:47:05 -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 n8NKl33n014015; Wed, 23 Sep 2009 13:47:03 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8NKj3d9013702; Wed, 23 Sep 2009 13:45:04 -0700 Resent-Date: Wed, 23 Sep 2009 13:45:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 23 Sep 2009 20:45: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.125373816712600 (code B ref 4515); Wed, 23 Sep 2009 20:45:03 +0000 Original-Received: (at 4515) by emacsbugs.donarmstrong.com; 23 Sep 2009 20:36:07 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from IMPaqm4.telefonica.net (impaqm4.telefonica.net [213.4.138.4]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8NKa4ZZ012595 for <4515@emacsbugs.donarmstrong.com>; Wed, 23 Sep 2009 13:36:06 -0700 Original-Received: from IMPmailhost5.adm.correo ([10.20.102.126]) by IMPaqm4.telefonica.net with bizsmtp id kFUl1c00U2jdgqJ3QKX4xk; Wed, 23 Sep 2009 21:31:04 +0200 Original-Received: from qcore ([83.43.52.24]) by IMPmailhost5.adm.correo with BIZ IMP id kKWK1c00B0XKxp71lKWKgt; Wed, 23 Sep 2009 21:30:20 +0200 X-TE-authinfo: authemail="981711563$telefonica.net" |auth_email="981711563@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" In-Reply-To: <200909231836.n8NIa6Lv029481@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Wed, 23 Sep 2009 11:36:06 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 23 Sep 2009 16:47:10 -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:31415 Archived-At: Dan Nicolaescu writes: > =D3scar Fuentes writes: > > > Dan Nicolaescu writes: > >=20 > > > ofv@wanadoo.es. "(=D3scar" Fuentes) writes: > > > > > > > Please write in English if possible, because the Emacs maintain= ers > > > > usually do not have translators to read other languages for the= m. > > > >=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 saving= it the > > > > VC-dired buffer for the working copy is automatically updated s= howing > > > > that the status of the file is "up to date", but the VC modelin= e for the > > > > buffer that visits the file does not change and keeps indicatin= g that > > > > the file state is "locally modified". > > > > > > Can you please describe step by step the actions necessary to repro= duce > > > 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 unmodified = as > > far as the version control system is concerned, but the VC modeline > > keeps showing `:' (for example Bzr:836) indicating that the file is > > edited. After saving a versioned file, VC should check if the VC back= end > > 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. Yes, I know. > Checking for this condition after each save is prohibitively expensive, > and it's an extremely rare event, so it's not worth optimizing for. 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. 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". > So this is neither a bug, not something worth improving. 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? --=20 =D3scar