[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vc-state and unregistered

From: Michael Albinus
Subject: Re: vc-state and unregistered
Date: Tue, 19 Apr 2016 10:31:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Dmitry Gutov <address@hidden> 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

  (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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]