all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emilio Lopes <eclig@gmx.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 18535@debbugs.gnu.org
Subject: bug#18535: tramp alters `vc-handled-backends'
Date: Thu, 25 Sep 2014 09:10:04 +0200	[thread overview]
Message-ID: <CANiPZaBWi7PtVFMOmx9rGJbWG3Gj3mpYgKZ-Bma-=UxQHkXCZg@mail.gmail.com> (raw)
In-Reply-To: <jwvppem8i80.fsf-monnier+emacsbugs@gnu.org>

2014-09-23 17:37 GMT+02:00 Stefan Monnier <monnier@iro.umontreal.ca>:
>> `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))))))))





  reply	other threads:[~2014-09-25  7:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23 10:53 bug#18535: tramp alters `vc-handled-backends' Emilio Lopes
2014-09-23 15:37 ` Stefan Monnier
2014-09-25  7:10   ` Emilio Lopes [this message]
2014-09-25 13:07     ` Stefan Monnier

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='CANiPZaBWi7PtVFMOmx9rGJbWG3Gj3mpYgKZ-Bma-=UxQHkXCZg@mail.gmail.com' \
    --to=eclig@gmx.net \
    --cc=18535@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.