From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: No VC backend is responsible for Date: Thu, 21 May 2015 11:55:06 +0200 Message-ID: <87iobm9rwl.fsf@gnu.org> References: <555DA3C8.1070400@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1432202146 28663 80.91.229.3 (21 May 2015 09:55:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 May 2015 09:55:46 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" , Dmitry Gutov To: andrea crotti Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 21 11:55:37 2015 Return-path: Envelope-to: geh-help-gnu-emacs@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 1YvNCS-0003e3-46 for geh-help-gnu-emacs@m.gmane.org; Thu, 21 May 2015 11:55:36 +0200 Original-Received: from localhost ([::1]:56321 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvNCR-0006gT-Er for geh-help-gnu-emacs@m.gmane.org; Thu, 21 May 2015 05:55:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvNC5-0006gL-FG for help-gnu-emacs@gnu.org; Thu, 21 May 2015 05:55:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvNC0-0000hV-Fn for help-gnu-emacs@gnu.org; Thu, 21 May 2015 05:55:13 -0400 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:41812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvNC0-0000fd-AV for help-gnu-emacs@gnu.org; Thu, 21 May 2015 05:55:08 -0400 Original-Received: from thinkpad-t440p (dhcp243.uni-koblenz.de [141.26.71.243]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id 2BEF21A84D0; Thu, 21 May 2015 11:55:07 +0200 (CEST) Mail-Followup-To: andrea crotti , Dmitry Gutov , "help-gnu-emacs\@gnu.org" In-Reply-To: (andrea crotti's message of "Thu, 21 May 2015 10:41:35 +0100") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 141.26.64.15 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104511 Archived-At: andrea crotti 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