From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: vc-state and unregistered Date: Tue, 19 Apr 2016 10:31:14 +0200 Message-ID: <87ega2rodp.fsf@gmx.de> References: <6ok2vyzwf9.fsf@fencepost.gnu.org> <08f70cda-44be-0657-e50a-2b2c80d2c21c@yandex.ru> <87oa9dzgl0.fsf@gmx.de> <87potshczh.fsf@gmx.de> <87bn57otja.fsf_-_@gmx.de> <515b3451-820d-ad50-8c98-d0330a0f4266@yandex.ru> <87lh4arpbg.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1461054696 20756 80.91.229.3 (19 Apr 2016 08:31:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Apr 2016 08:31:36 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 19 10:31:28 2016 Return-path: Envelope-to: ged-emacs-devel@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 1asR4B-0005Sy-9H for ged-emacs-devel@m.gmane.org; Tue, 19 Apr 2016 10:31:27 +0200 Original-Received: from localhost ([::1]:53816 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asR4A-0003ss-Hf for ged-emacs-devel@m.gmane.org; Tue, 19 Apr 2016 04:31:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asR46-0003pW-0h for emacs-devel@gnu.org; Tue, 19 Apr 2016 04:31:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1asR42-00046Y-0L for emacs-devel@gnu.org; Tue, 19 Apr 2016 04:31:21 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:53661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asR41-00046L-OO for emacs-devel@gnu.org; Tue, 19 Apr 2016 04:31:17 -0400 Original-Received: from detlef.gmx.de ([87.146.61.71]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0Lqi70-1bNfH70vi6-00eHqV; Tue, 19 Apr 2016 10:31:15 +0200 In-Reply-To: (Dmitry Gutov's message of "Tue, 19 Apr 2016 11:21:06 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-Provags-ID: V03:K0:kL7r9lOKXPwCf+qCcxH5FZ53A59x7Bkj3J2xnhTIi3Zq7ZlO4pl jjDbxuzEXxSnQVGzTNxfMozeSQmX9579UhOuwtK5u80Oex5qNheZaJj3zPj3DSe8caqgjng G5+Hb6PuxGPwDVBpZzdaXPC9Si6G3shgipL1vz4aaUKgk+nO1SfApvhKSFEour5+V2237+3 VKcDocOsvhFXC1f5u8Wjw== X-UI-Out-Filterresults: notjunk:1;V01:K0:sZZQ4s2Eqrg=:v+sCp9bX+YvC+vDEeO2zjy uGonibJ2eepvcm/yzNEeGpjdH/VEUoMHBuclxTNHXgtzGzO6kuCUXFj7S4P90BS0NMANdfKy2 cyKzN9nVtpHJ0lnsQeUU/W+y9INeQwDg43H67cxnqG2UUxuw1q/xccNwwuFVHNnVIt5PlffTP K0y0GOOXl1tYZMSqgQbPnE69vI2q89Wnyo5zJf5b3CQRbLzgkaHYYC0sMZsfsbds5BPn2TqMg N+JPVEILy2JQsEIcM+mMP78RTVAb3xSVzF/xzrXXYcOGvjkJ9u4M5vZRZQ9qSRxuEkNdf7iWB tsvBvj+vxyQlsqBsP6dT0ZFZKy10tdZ7hIx3Zl1XBkJIFmgJvlxxcSm7/cZuUPCcFplVeDabR YKezGf9xLtjf9oXA58EGum4kTb1+210GL/mYlc6hKGXz4QqEENYSG8HG0mi3fT8pZtEtcIaai lBon3CgtjtQJJjURwMH/7y0JB6yE5hr36OaCheuePuhshyXOxPaVCgzKk7nyuivnmddGe31L4 SuUR7B5NB5S1HtIG5GrQss+r3o/Zi4Afr20awQVq1U/i82iqQ686F6teE7AMsCSSO9olEqq9B 5bAC2brQ8cQBREptAs9+Roo2suc71hJIkuQFwOkPSF0aSPe+LPxWDVsGQP84ij4ro1xQSfxa7 NsccQSOu/p+/LqwrZH5O6USeHTzNlPvPoMhp6LHwlWetzK71T+3HzKVvzXnIveOEu/Y6+Fx3c gn4kFa7sPSTKzD3UAIlo410MELMvG0gLYbv/t54frA+6mex9wCT1CBxRnRpeHMuc6DZehyC5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:203089 Archived-At: Dmitry Gutov writes: > On 04/19/2016 11:10 AM, Michael Albinus wrote: > >> I don't mean this. The problem is how vc caches values. It uses file >> properties, and in case `vc-file-getprop' returns nil, it assumes the >> property is not cached. Consequently, we can never cache the value nil >> for the file property `vc-state'. > > Which part of this hasn't been addressed in my previous email? > > What are the practical problems that you anticipate? The very first line in `vc-state' doesn't make sense for unregistered files: (or (vc-file-getprop file 'vc-state) Even if we know that a file is unregistered, and we have set the file property to nil accordingly, This information isn't used. For unregistered files, the cached value isn't used, and the file's state is computed again. IOW: if vc-file-getprop returns nil, we don't know what this means. Either "don't know", because the state hasn't been computed yet. Or it means "unregistered". My problem is *not* what vc-state returns to the caller. Here I could live with a return value of nil, meaning unregistered. Best regards, Michael.