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'.
This commit is contained in:
parent
38173af10d
commit
bd423b8699
1 changed files with 14 additions and 7 deletions
|
@ -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)
|
||||
(unless
|
||||
(member
|
||||
elt (default-toplevel-value 'process-environment))
|
||||
(when (string-match-p "=" elt) elt)))
|
||||
process-environment))
|
||||
(when (string-match-p "=" elt) elt))
|
||||
tramp-remote-process-environment))
|
||||
;; We use as environment the difference to toplevel
|
||||
;; `process-environment'.
|
||||
(env (dolist (elt process-environment env)
|
||||
(when
|
||||
(and
|
||||
(string-match-p "=" elt)
|
||||
(not
|
||||
(member
|
||||
elt (default-toplevel-value 'process-environment))))
|
||||
(setq env (cons elt env)))))
|
||||
(env (setenv-internal
|
||||
env "INSIDE_EMACS"
|
||||
(concat (or (getenv "INSIDE_EMACS") emacs-version)
|
||||
|
|
Loading…
Add table
Reference in a new issue