From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emilio Lopes Newsgroups: gmane.emacs.bugs Subject: bug#18535: tramp alters `vc-handled-backends' Date: Thu, 25 Sep 2014 09:10:04 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1411629088 18461 80.91.229.3 (25 Sep 2014 07:11:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Sep 2014 07:11:28 +0000 (UTC) Cc: 18535@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 25 09:11:22 2014 Return-path: Envelope-to: geb-bug-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 1XX3D0-0005Ve-3a for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Sep 2014 09:11:22 +0200 Original-Received: from localhost ([::1]:38535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX3Cz-00045K-LH for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Sep 2014 03:11:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX3Cr-00045A-O4 for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2014 03:11:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XX3Cm-0006if-7V for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2014 03:11:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX3Cm-0006i7-4G for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2014 03:11:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XX3Cg-0004M0-4D for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2014 03:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Emilio Lopes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Sep 2014 07:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18535 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18535-submit@debbugs.gnu.org id=B18535.141162903216694 (code B ref 18535); Thu, 25 Sep 2014 07:11:01 +0000 Original-Received: (at 18535) by debbugs.gnu.org; 25 Sep 2014 07:10:32 +0000 Original-Received: from localhost ([127.0.0.1]:51539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XX3CA-0004LA-FU for submit@debbugs.gnu.org; Thu, 25 Sep 2014 03:10:31 -0400 Original-Received: from mail-vc0-f178.google.com ([209.85.220.178]:33434) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XX3C5-0004Ky-Co for 18535@debbugs.gnu.org; Thu, 25 Sep 2014 03:10:26 -0400 Original-Received: by mail-vc0-f178.google.com with SMTP id lf12so5353734vcb.9 for <18535@debbugs.gnu.org>; Thu, 25 Sep 2014 00:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=WcTOSXLlDL9TvcveEJ2SIatNI3FXfTt8meb0rlxiZS0=; b=eA5/l4S0EDpODslHmMRy3O19dzpSgrBk4HReYITB/z2FaykeT/veYBS+xv49fM4tcb 5XN+ic2nSUT1YyIALEU5dca8OJCLf7Es5k/0rSVQOIDO29s6hJ0bic3e1hPxAixcildj yPcbtdRRXv+938lAGIeSgeP1d3eDerko5HPkdop1nHKXd+FvPnyirGWP85unXqtADqyP x0oS9edVx9iaK5xYj0lAGEYo9zojsS9sp+LSW9AZKLdCPQVgK5kbf4QDSWiUAh6ZIqPd 9vaa0WLE2TJEsFYxMVJutvNnQ7HWhRFxM9Jg/dCfZvc93+DuiVsxd2pNWWWSjd3Sxk0A YzWg== X-Received: by 10.52.107.101 with SMTP id hb5mr8311129vdb.31.1411629024070; Thu, 25 Sep 2014 00:10:24 -0700 (PDT) Original-Received: by 10.220.163.194 with HTTP; Thu, 25 Sep 2014 00:10:04 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: vYoWDEMepxWn4T3BugDytOlq-PA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93720 Archived-At: 2014-09-23 17:37 GMT+02:00 Stefan Monnier : >> `tramp-sh-handle-vc-registered' can permanently alter the value of >> `vc-handled-backends' causing Emacs to stop recognizing version >> controlled files as such. This happened to me a couple of times after >> having pressed `C-g' while some `tramp' operation was apparently >> hanging. > > The current code uses a `let' binding, which uses the same mechanism as > unwind-protect, so I don't think that's the source of a the problem. Is this common behavior in Lisps? I could not find any reference to this in the Elisp manual. Anyway, thanks for point this out! > The `delq' look dangerous on the other hand. Shouldn't these be > `remq' instead? yes, this seems to solve the problem. === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2014-09-08 15:52:04 +0000 +++ lisp/net/tramp-sh.el 2014-09-25 07:07:25 +0000 @@ -3464,19 +3464,19 @@ (not (with-tramp-connection-property v vc-bzr-program (tramp-find-executable v vc-bzr-program (tramp-get-remote-path v))))) - (setq vc-handled-backends (delq 'Bzr vc-handled-backends))) + (setq vc-handled-backends (remq 'Bzr vc-handled-backends))) (when (and (memq 'Git vc-handled-backends) (boundp 'vc-git-program) (not (with-tramp-connection-property v vc-git-program (tramp-find-executable v vc-git-program (tramp-get-remote-path v))))) - (setq vc-handled-backends (delq 'Git vc-handled-backends))) + (setq vc-handled-backends (remq 'Git vc-handled-backends))) (when (and (memq 'Hg vc-handled-backends) (boundp 'vc-hg-program) (not (with-tramp-connection-property v vc-hg-program (tramp-find-executable v vc-hg-program (tramp-get-remote-path v))))) - (setq vc-handled-backends (delq 'Hg vc-handled-backends))) + (setq vc-handled-backends (remq 'Hg vc-handled-backends))) ;; Run. (ignore-errors (tramp-run-real-handler 'vc-registered (list file))))))))