emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 77f3536: Fix a problem with `start-file-process' in


From: Michael Albinus
Subject: [Emacs-diffs] master 77f3536: Fix a problem with `start-file-process' in Tramp
Date: Sat, 7 Jan 2017 17:51:52 +0000 (UTC)

branch: master
commit 77f35363fd9bb743716a196a3168fa94d896c28e
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Fix a problem with `start-file-process' in Tramp
    
    * lisp/net/tramp-sh.el (tramp-maybe-open-connection):
    `start-file-process' shall work when `non-essential' is
    non-nil, but there is already an established connection.
    <https://github.com/company-mode/company-mode/issues/462>
---
 lisp/net/tramp-sh.el |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index fec9f10..71a3887 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4655,7 +4655,11 @@ connection if a previous connection has died for some 
reason."
 
          ;; If `non-essential' is non-nil, don't reopen a new connection.
          ;; This variable has been introduced with Emacs 24.1.
-         (when (and (boundp 'non-essential) (symbol-value 'non-essential))
+         ;; We check this for the process related to
+         ;; `tramp-buffer-name'; otherwise `start-file-process'
+         ;; wouldn't run ever when `non-essential' is non-nil.
+         (when (and (boundp 'non-essential) (symbol-value 'non-essential)
+                    (null (get-process (tramp-buffer-name vec))))
            (throw 'non-essential 'non-essential))
 
          (with-tramp-progress-reporter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]