all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: andrea crotti <andrea.crotti.0@gmail.com>
To: andrea crotti <andrea.crotti.0@gmail.com>,
	Dmitry Gutov <dgutov@yandex.ru>,
	"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: No VC backend is responsible for
Date: Thu, 21 May 2015 11:25:21 +0100	[thread overview]
Message-ID: <CAF_E5Jak73E0QZf-7uUhVFfWWnjhWi_a1H7riOJUNpHeUpJwiQ@mail.gmail.com> (raw)
In-Reply-To: <87iobm9rwl.fsf@gnu.org>

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	other threads:[~2015-05-21 10:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21  9:02 No VC backend is responsible for andrea crotti
2015-05-21  9:22 ` Dmitry Gutov
2015-05-21  9:41   ` andrea crotti
2015-05-21  9:55     ` Tassilo Horn
2015-05-21 10:25       ` andrea crotti [this message]
2015-05-21 10:31         ` Dmitry Gutov
2015-05-21 10:32         ` Tassilo Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAF_E5Jak73E0QZf-7uUhVFfWWnjhWi_a1H7riOJUNpHeUpJwiQ@mail.gmail.com \
    --to=andrea.crotti.0@gmail.com \
    --cc=dgutov@yandex.ru \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.