From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#11757: Acknowledgement (24.1.50; vc-git calls `process-file' too many times) Date: Sat, 30 Jun 2012 11:03:17 +0200 Message-ID: <87wr2pgoiy.fsf@gmx.de> References: <4FE2832A.1030308@yandex.ru> <4FE994E8.9020605@yandex.ru> <87zk7qs21q.fsf@gmx.de> <4FEBAAAA.3030102@yandex.ru> <87d34igrie.fsf@gmx.de> <4FEDD2A0.3010300@yandex.ru> <878vf66pgw.fsf@gmx.de> <4FEDDFD8.1010407@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1341047488 636 80.91.229.3 (30 Jun 2012 09:11:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 30 Jun 2012 09:11:28 +0000 (UTC) Cc: 11757@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 30 11:11:27 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Skti8-0000aM-Vs for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Jun 2012 11:11:25 +0200 Original-Received: from localhost ([::1]:46687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Skti8-0000xG-TJ for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Jun 2012 05:11:24 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Skti5-0000oW-Hy for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2012 05:11:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sktae-0006uC-6p for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2012 05:03:41 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sktae-0006u8-3P for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2012 05:03:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Skter-0004IC-Ps for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2012 05:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Jun 2012 09:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11757 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11757-submit@debbugs.gnu.org id=B11757.134104726716480 (code B ref 11757); Sat, 30 Jun 2012 09:08:01 +0000 Original-Received: (at 11757) by debbugs.gnu.org; 30 Jun 2012 09:07:47 +0000 Original-Received: from localhost ([127.0.0.1]:38505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sktec-0004Hk-UN for submit@debbugs.gnu.org; Sat, 30 Jun 2012 05:07:47 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:33991) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SkteZ-0004Hb-Bo for 11757@debbugs.gnu.org; Sat, 30 Jun 2012 05:07:44 -0400 Original-Received: (qmail invoked by alias); 30 Jun 2012 09:03:18 -0000 Original-Received: from p57BB9AA8.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.154.168] by mail.gmx.net (mp027) with SMTP; 30 Jun 2012 11:03:18 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/t1NAuLaftqGuoNHJS/sbI6s1a1GnE18kCh6SNox uLr83VsFO2Kw5U In-Reply-To: <4FEDDFD8.1010407@yandex.ru> (Dmitry Gutov's message of "Fri, 29 Jun 2012 21:03:20 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:61436 Archived-At: Dmitry Gutov writes: > On 29.06.2012 20:40, Michael Albinus wrote: >>>> A stale cache is bad, of course. We must carefully check, where a cached >>>> value has to be invalidated. But why should vc-working-revision being >>>> invalidated after saving? It is still the same, I believe. Switching to >>>> another branch shall be observed by Emacs, 'cause there is another >>>> version of the file on the disk, and Emacs warns you before editing. >>> >>> This won't happen in following cases: >>> 1) We switch to revision when the opened file is the same. >>> 2) It doesn't exist there. >>> 3) We just delete it from disk from outside of Emacs. >>> So the file isn't changed, and you see no warning or update, even >>> after you write it to disk from Emacs again. >> >> I see. Maybe we find a hook, where we could invalidate the vc cache when >> a file is written which does not exist on the disk? > > (vc-before-save) might be the place to do that. In vc-after-save, vc-git-state is called. Wouldn't it be sufficient to invalidate the cache there, when it detects that the file is not up-to-date? Best regards, Michael.