help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: No VC backend is responsible for


From: andrea crotti
Subject: Re: No VC backend is responsible for
Date: Thu, 21 May 2015 11:25:21 +0100

Yes that works well thanks a lot,
I guess the implementation of vc-working-revision changed or I always
had this issue and I never realised..

2015-05-21 10:55 GMT+01:00 Tassilo Horn <tsdh@gnu.org>:
> andrea crotti <andrea.crotti.0@gmail.com> writes:
>
>> Yes true thanks, I thought Helm could be the issue but it doesn't work.
>> Actually the problems seems to be my code:
>> (defun ca-is-version-control-file ()
>>   "Return nil unless the file is in the git files"
>>   (if (vc-working-revision (buffer-file-name))
>>       (auto-revert-mode t)))
>>
>> (add-hook 'find-file-hook 'ca-is-version-control-file)
>>
>> Makes sense, it's just a bit surprising because I haven't touched this
>> code for a long time and it used to work..
>> Probably checking if the file is under vc using something that is not
>> vc-workiing-revision would do the trick..
>
> I think (vc-backend (buffer-file-name)) should work.  Its docs say it
> returns nil if the file is not registered with a VCS.
>
> Bye,
> Tassilo



reply via email to

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