diff options
| author | Michael Albinus | 2020-05-04 10:43:58 +0200 |
|---|---|---|
| committer | Michael Albinus | 2020-05-04 10:43:58 +0200 |
| commit | 221e6a9bcdd50a3a134f09840f4a894ff73fb3e6 (patch) | |
| tree | c029a6af9a97fab6ae29e926682434e9d4111c62 | |
| parent | 106936415d2892fc373842b3aedd805096fc9e0e (diff) | |
| download | emacs-221e6a9bcdd50a3a134f09840f4a894ff73fb3e6.tar.gz emacs-221e6a9bcdd50a3a134f09840f4a894ff73fb3e6.zip | |
Fix setting of INSIDE_EMACS in Tramp
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process)
(tramp-sh-handle-process-file, tramp-open-shell): Set proper
INSIDE_EMACS environment variable.
| -rw-r--r-- | lisp/net/tramp-sh.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 21ef1efa0d4..592dcf67159 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -2912,6 +2912,11 @@ STDERR can also be a file name." | |||
| 2912 | (setq uenv (cons elt uenv))))))) | 2912 | (setq uenv (cons elt uenv))))))) |
| 2913 | (command | 2913 | (command |
| 2914 | (when (stringp program) | 2914 | (when (stringp program) |
| 2915 | (setenv-internal | ||
| 2916 | env "INSIDE_EMACS" | ||
| 2917 | (concat (or (getenv "INSIDE_EMACS") emacs-version) | ||
| 2918 | ",tramp:" tramp-version) | ||
| 2919 | 'keep) | ||
| 2915 | (format "cd %s && %s exec %s %s env %s %s" | 2920 | (format "cd %s && %s exec %s %s env %s %s" |
| 2916 | (tramp-shell-quote-argument localname) | 2921 | (tramp-shell-quote-argument localname) |
| 2917 | (if uenv | 2922 | (if uenv |
| @@ -3061,6 +3066,11 @@ STDERR can also be a file name." | |||
| 3061 | (if (tramp-get-env-with-u-option v) | 3066 | (if (tramp-get-env-with-u-option v) |
| 3062 | (setq env (append `("-u" ,elt) env)) | 3067 | (setq env (append `("-u" ,elt) env)) |
| 3063 | (setq uenv (cons elt uenv)))))) | 3068 | (setq uenv (cons elt uenv)))))) |
| 3069 | (setenv-internal | ||
| 3070 | env "INSIDE_EMACS" | ||
| 3071 | (concat (or (getenv "INSIDE_EMACS") emacs-version) | ||
| 3072 | ",tramp:" tramp-version) | ||
| 3073 | 'keep) | ||
| 3064 | (when env | 3074 | (when env |
| 3065 | (setq command | 3075 | (setq command |
| 3066 | (format | 3076 | (format |
| @@ -4169,7 +4179,7 @@ file exists and nonzero exit status otherwise." | |||
| 4169 | "exec env TERM='%s' INSIDE_EMACS='%s,tramp:%s' " | 4179 | "exec env TERM='%s' INSIDE_EMACS='%s,tramp:%s' " |
| 4170 | "ENV=%s %s PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s")) | 4180 | "ENV=%s %s PROMPT_COMMAND='' PS1=%s PS2='' PS3='' %s %s")) |
| 4171 | tramp-terminal-type | 4181 | tramp-terminal-type |
| 4172 | emacs-version tramp-version ; INSIDE_EMACS | 4182 | (or (getenv "INSIDE_EMACS") emacs-version) tramp-version |
| 4173 | (or (getenv-internal "ENV" tramp-remote-process-environment) "") | 4183 | (or (getenv-internal "ENV" tramp-remote-process-environment) "") |
| 4174 | (if (stringp tramp-histfile-override) | 4184 | (if (stringp tramp-histfile-override) |
| 4175 | (format "HISTFILE=%s" | 4185 | (format "HISTFILE=%s" |