From 78822e94cba9b0ddf4ace7b4af8b9fa2c6eb533a Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 29 Jul 2013 09:47:53 +0200 Subject: [PATCH] * net/tramp.el (tramp-use-ssh-controlmaster-options): New customer option. * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) (tramp-maybe-open-connection): Use it. --- lisp/ChangeLog | 8 ++++++++ lisp/net/tramp-sh.el | 8 ++++++-- lisp/net/tramp.el | 8 ++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 677e5e5a329..6ecc18cdcda 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2013-07-29 Michael Albinus + + * net/tramp.el (tramp-use-ssh-controlmaster-options): New customer + option. + + * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band) + (tramp-maybe-open-connection): Use it. + 2013-07-28 Juanma Barranquero * desktop.el (desktop--make-frame): Include `minibuffer' in the diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index c92eacd4473..441849fd2af 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2248,7 +2248,10 @@ The method used must be an out-of-band method." spec (format-spec-make ?t (tramp-get-connection-property (tramp-get-connection-process v) "temp-file" "")) - options (format-spec tramp-ssh-controlmaster-options spec) + options (format-spec + (if tramp-use-ssh-controlmaster-options + tramp-ssh-controlmaster-options "") + spec) spec (format-spec-make ?h host ?u user ?p port ?c options ?k (if keep-date " " "")) @@ -4416,7 +4419,8 @@ connection if a previous connection has died for some reason." (let* ((target-alist (tramp-compute-multi-hops vec)) ;; We will apply `tramp-ssh-controlmaster-options' ;; only for the first hop. - (options tramp-ssh-controlmaster-options) + (options (if tramp-use-ssh-controlmaster-options + tramp-ssh-controlmaster-options "")) (process-connection-type tramp-process-connection-type) (process-adaptive-read-buffering nil) (coding-system-for-read nil) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index db6a1e381a6..48e13004c36 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -305,6 +305,14 @@ useful only in combination with `tramp-default-proxies-alist'.") "Call ssh to detect whether it supports the Control* arguments. Return a string to be used in `tramp-methods'.") +;;;###tramp-autoload +(defcustom tramp-use-ssh-controlmaster-options + (not (zerop (length tramp-ssh-controlmaster-options))) + "Whether to use `tramp-ssh-controlmaster-options'." + :group 'tramp + :version "24.4" + :type 'boolean) + (defcustom tramp-default-method ;; An external copy method seems to be preferred, because it performs ;; much better for large files, and it hasn't too serious delays -- 2.39.2