From a336b2eae3b52f6fba5a19cc98e780feca618115 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 3 Jun 2014 09:43:24 +0200 Subject: [PATCH] Fix Bug#17653. * net/tramp.el (tramp-ssh-controlmaster-options): Improve search regexp. --- lisp/ChangeLog | 5 +++++ lisp/net/tramp.el | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bc9703db3e0..d73300523e9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-06-03 Michael Albinus + + * net/tramp.el (tramp-ssh-controlmaster-options): Improve search + regexp. (Bug#17653) + 2014-06-03 Glenn Morris * emacs-lisp/package.el (package-pinned-packages): Doc fix. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 6cc8275b327..9a97d824528 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -302,18 +302,19 @@ useful only in combination with `tramp-default-proxies-alist'.") ;;;###tramp-autoload (defconst tramp-ssh-controlmaster-options - (let ((result "")) + (let ((result "") + (case-fold-search t)) (ignore-errors (with-temp-buffer (call-process "ssh" nil t nil "-o" "ControlMaster") (goto-char (point-min)) - (when (search-forward-regexp "Missing ControlMaster argument" nil t) + (when (search-forward-regexp "missing.+argument" nil t) (setq result "-o ControlPath=%t.%%r@%%h:%%p -o ControlMaster=auto"))) - (when result + (unless (zerop (length result)) (with-temp-buffer (call-process "ssh" nil t nil "-o" "ControlPersist") (goto-char (point-min)) - (when (search-forward-regexp "Missing ControlPersist argument" nil t) + (when (search-forward-regexp "missing.+argument" nil t) (setq result (concat result " -o ControlPersist=no")))))) result) "Call ssh to detect whether it supports the Control* arguments. -- 2.39.2