From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: andrea crotti Newsgroups: gmane.emacs.help Subject: Re: No VC backend is responsible for Date: Thu, 21 May 2015 11:25:21 +0100 Message-ID: References: <555DA3C8.1070400@yandex.ru> <87iobm9rwl.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1432203953 26432 80.91.229.3 (21 May 2015 10:25:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 May 2015 10:25:53 +0000 (UTC) To: andrea crotti , Dmitry Gutov , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 21 12:25:52 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 1YvNfh-0004xc-I7 for geh-help-gnu-emacs@m.gmane.org; Thu, 21 May 2015 12:25:49 +0200 Original-Received: from localhost ([::1]:56414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvNfg-0000LA-UF for geh-help-gnu-emacs@m.gmane.org; Thu, 21 May 2015 06:25:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvNfH-0000Kt-G3 for help-gnu-emacs@gnu.org; Thu, 21 May 2015 06:25:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvNfG-0003kv-Jc for help-gnu-emacs@gnu.org; Thu, 21 May 2015 06:25:23 -0400 Original-Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]:34167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvNfG-0003kp-FT for help-gnu-emacs@gnu.org; Thu, 21 May 2015 06:25:22 -0400 Original-Received: by obfe9 with SMTP id e9so56965695obf.1 for ; Thu, 21 May 2015 03:25:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=BVeAetWoewUrlovlSygiCTqjzgz6LzUFYJJWLSNkIk4=; b=w6IULMaGoFzNZCNHI0/RYaMjAB2Wf1lulAXSpPerNPmZaZChmPROQjtOsckkAOpov9 Id502+QbK3cM/fMY7CGo8X5ImMy/qV3VGV+Pc0QOrWW+m6mF91YuiVCFfCSBuyc9HdJy zZVutTVACp1ONENOaV1whOu7LGImioWGY4ttzIo17xMbi+78hUPU3ruarFP+0IUhHJjp KytNcPIU2yobdLa0N6Px/l3W3piGgmRHsNBQJQ7sYLZMrxgcYNZ8osPUmYWosflrEoLj aIPdNL4MHwZAOJOgBN4TjAysmeRGXNbMnFsZu5yylf7ZTO/tJ8ihanOfOgXi/dywRbWA r9Cg== X-Received: by 10.182.135.202 with SMTP id pu10mr1710608obb.52.1432203922002; Thu, 21 May 2015 03:25:22 -0700 (PDT) Original-Received: by 10.202.224.5 with HTTP; Thu, 21 May 2015 03:25:21 -0700 (PDT) In-Reply-To: <87iobm9rwl.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::231 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:104512 Archived-At: 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 : > 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