From 305c07f6ae3dbf10a6c069e2031fb4b0bca3d254 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 19 Oct 2011 22:21:35 +0200 Subject: [PATCH] * net/tramp.el (tramp-connectable-p): Make a stronger check on a running process. --- lisp/ChangeLog | 5 +++++ lisp/net/tramp.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5db9b8a5241..4081805a509 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-10-19 Michael Albinus + + * net/tramp.el (tramp-connectable-p): Make a stronger check on a + running process. + 2011-10-19 Glenn Morris * vc/vc-bzr.el (vc-bzr-after-dir-status): diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index cc4fda32dff..5fca1018095 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2103,8 +2103,9 @@ This is true, if either the remote host is already connected, or if we are not in completion mode." (and (tramp-tramp-file-p filename) (with-parsed-tramp-file-name filename nil - (or (get-buffer (tramp-buffer-name v)) - (not (tramp-completion-mode-p)))))) + (or (not (tramp-completion-mode-p)) + (let ((p (tramp-get-connection-process v))) + (and p (processp p) (memq (process-status p) '(run open)))))))) ;; Method, host name and user name completion. ;; `tramp-completion-dissect-file-name' returns a list of -- 2.11.4.GIT