all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* No VC backend is responsible for
@ 2015-05-21  9:02 andrea crotti
  2015-05-21  9:22 ` Dmitry Gutov
  0 siblings, 1 reply; 7+ messages in thread
From: andrea crotti @ 2015-05-21  9:02 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Hi guys,
I'm having a really annoying issue with vc.el, basically every time I
try to create a new file in a directory that it's not under revision
control system, I get something like:

vc-responsible-backend: No VC backend is responsible for
/home/username/hello.py

Eventually if I do it twice it actually opens, but not even always.

I'm using the Emacs Snapshot for Ubuntu 14.04 from here:

https://launchpad.net/~ubuntu-elisp/+archive/ubuntu/ppa

GNU Emacs 25.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8) of
2015-05-19 on lcy01-07

Which also has the issue that is not shipping the .el files but only the
compiled .elc, so it's also hard to know what is going on.

I also tried to remove the hook as suggested in some other places

(remove-hook 'find-file-hooks 'vc-find-file-hook)

but that doesn't seem to work either..

Any idea?
Thanks



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: No VC backend is responsible for
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Gutov @ 2015-05-21  9:22 UTC (permalink / raw)
  To: andrea crotti, help-gnu-emacs@gnu.org

On 05/21/2015 12:02 PM, andrea crotti wrote:

> vc-responsible-backend: No VC backend is responsible for
> /home/username/hello.py

You should M-x toggle-debug-on-error and post the backtrace here.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: No VC backend is responsible for
  2015-05-21  9:22 ` Dmitry Gutov
@ 2015-05-21  9:41   ` andrea crotti
  2015-05-21  9:55     ` Tassilo Horn
  0 siblings, 1 reply; 7+ messages in thread
From: andrea crotti @ 2015-05-21  9:41 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: help-gnu-emacs@gnu.org

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

Debugger entered--Lisp error: (error "No VC backend is responsible for
/home/user/sample.hs")
  signal(error ("No VC backend is responsible for /home/user/sample.hs"))
  error("No VC backend is responsible for %s" "/home/user/sample.hs")
  vc-responsible-backend("/home/user/sample.hs")
  vc-working-revision("/home/user/sample.hs")
  (if (vc-working-revision (buffer-file-name)) (auto-revert-mode t))
  ca-is-version-control-file()
  run-hooks(find-file-hook)
  after-find-file(t t)
  find-file-noselect-1(#<buffer sample.hs> "~/sample.hs" nil nil
"~/sample.hs" nil)
  find-file-noselect("/home/user/sample.hs" nil nil nil)
  find-file("/home/user/sample.hs")
  find-file-at-point("/home/user/sample.hs")
  helm-find-file-or-marked("/home/user/sample.hs")
  apply(helm-find-file-or-marked "/home/user/sample.hs")
  helm-funcall-with-source(((name . "Find Files") (header-name lambda
(name) (concat name helm-find-files-doc-header)) (init lambda nil
(setq helm-ff-auto-update-flag helm-ff-auto-update-initial-value)
(setq helm-ff--auto-update-state helm-ff-auto-update-flag)
(helm-set-local-variable (quote bookmark-make-record-function)
(function helm-ff-make-bookmark-record))) (candidates .
helm-find-files-get-candidates) (keymap keymap (right .
helm-execute-persistent-action) (left . helm-find-files-up-one-level)
(127 . #[0 "\306\307\310\311\312\305!\313\"\314$\216\315\302!\210\316\304!\317\211\211\x03\x16\x16\x03\301=\203'

2015-05-21 10:22 GMT+01:00 Dmitry Gutov <dgutov@yandex.ru>:
> On 05/21/2015 12:02 PM, andrea crotti wrote:
>
>> vc-responsible-backend: No VC backend is responsible for
>> /home/username/hello.py
>
>
> You should M-x toggle-debug-on-error and post the backtrace here.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: No VC backend is responsible for
  2015-05-21  9:41   ` andrea crotti
@ 2015-05-21  9:55     ` Tassilo Horn
  2015-05-21 10:25       ` andrea crotti
  0 siblings, 1 reply; 7+ messages in thread
From: Tassilo Horn @ 2015-05-21  9:55 UTC (permalink / raw)
  To: andrea crotti; +Cc: help-gnu-emacs@gnu.org, Dmitry Gutov

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: No VC backend is responsible for
  2015-05-21  9:55     ` Tassilo Horn
@ 2015-05-21 10:25       ` andrea crotti
  2015-05-21 10:31         ` Dmitry Gutov
  2015-05-21 10:32         ` Tassilo Horn
  0 siblings, 2 replies; 7+ messages in thread
From: andrea crotti @ 2015-05-21 10:25 UTC (permalink / raw)
  To: andrea crotti, Dmitry Gutov, help-gnu-emacs@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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: No VC backend is responsible for
  2015-05-21 10:25       ` andrea crotti
@ 2015-05-21 10:31         ` Dmitry Gutov
  2015-05-21 10:32         ` Tassilo Horn
  1 sibling, 0 replies; 7+ messages in thread
From: Dmitry Gutov @ 2015-05-21 10:31 UTC (permalink / raw)
  To: andrea crotti, help-gnu-emacs@gnu.org

On 05/21/2015 01:25 PM, andrea crotti wrote:
> 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.

It was changed on March 1 in 7f9b037245ddb662ad98685e429a2498ae6b7c62, 
to make the function return non-nil on ignored and unregistered files 
(inside a VCS repository).



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: No VC backend is responsible for
  2015-05-21 10:25       ` andrea crotti
  2015-05-21 10:31         ` Dmitry Gutov
@ 2015-05-21 10:32         ` Tassilo Horn
  1 sibling, 0 replies; 7+ messages in thread
From: Tassilo Horn @ 2015-05-21 10:32 UTC (permalink / raw)
  To: andrea crotti; +Cc: help-gnu-emacs@gnu.org, Dmitry Gutov

andrea crotti <andrea.crotti.0@gmail.com> writes:

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

Yes, it changed on Sun Mar 1 17:51:31 2015 +0100. ;-)

Bye,
Tassilo



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-05-21 10:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-05-21 10:31         ` Dmitry Gutov
2015-05-21 10:32         ` Tassilo Horn

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.