Commit bd423b86 authored by Michael Albinus's avatar Michael Albinus

Fix environment handling in tramp-handle-make-process

* lisp/net/tramp.el (tramp-test-message): Add `tramp-suppress-trace' property.
(tramp-handle-make-process): Handle also 'tramp-remote-process-environment'.
parent 38173af1
......@@ -1990,6 +1990,8 @@ the resulting error message."
(tramp-dissect-file-name default-directory) 0 fmt-string arguments)
(apply #'message fmt-string arguments)))
(put #'tramp-test-message 'tramp-suppress-trace t)
;; This function provides traces in case of errors not triggered by
;; Tramp functions.
(defun tramp-signal-hook-function (error-symbol data)
......@@ -3801,15 +3803,20 @@ It does not support `:stderr'."
(get-buffer-create buffer)
;; BUFFER can be nil. We use a temporary buffer.
(generate-new-buffer tramp-temp-buffer-name)))
;; We use as environment the difference to toplevel
;; `process-environment'.
(env (mapcar
(lambda (elt)
elt (default-toplevel-value 'process-environment))
(when (string-match-p "=" elt) elt)))
(when (string-match-p "=" elt) elt))
;; We use as environment the difference to toplevel
;; `process-environment'.
(env (dolist (elt process-environment env)
(string-match-p "=" elt)
elt (default-toplevel-value 'process-environment))))
(setq env (cons elt env)))))
(env (setenv-internal
(concat (or (getenv "INSIDE_EMACS") emacs-version)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment