]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix a problem with `start-file-process' in Tramp
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 7 Jan 2017 17:51:30 +0000 (18:51 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 7 Jan 2017 17:51:30 +0000 (18:51 +0100)
* 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

index fec9f10d7046c581fd197c241d37cc6e798ace97..71a388767d0dc9cfc2d7c387284dbabd2af9b6bd 100644 (file)
@@ -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