diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2016-08-09 11:50:13 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2016-08-09 11:50:13 +0200 |
commit | 5126b7d6c201f95fde0d817a64620d152c1c15e1 (patch) | |
tree | ccb14a980247a7df96f026ab65b5d320f5eae8a6 /doc | |
parent | e09dc1112b1f209d8141fc847edf23bd9cfa5ae1 (diff) |
Support $ENV in Tramp
* doc/misc/tramp.texi (Remote processes): Explain setting $ENV.
* etc/NEWS: Explain the "ENV" environment variable in
`tramp-remote-process-environment'.
* lisp/net/tramp-sh.el (tramp-remote-process-environment): Add "ENV=''".
(tramp-open-shell): Read $ENV value from
`tramp-remote-process-environment'.
(tramp-open-connection-setup-interactive-shell): Set values in
proper order.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/misc/tramp.texi | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 2c41dddd1b..37518284bb 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2369,9 +2369,9 @@ program's environment for the remote host. structured similar to @code{process-environment}, where each element is a string of the form @samp{ENVVARNAME=VALUE}. -To avoid any conflicts with local host variables set through local -configuration files, such as @file{~/.profile}, use @samp{ENVVARNAME=} -to unset them for the remote environment. +To avoid any conflicts with local host environment variables set +through local configuration files, such as @file{~/.profile}, use +@samp{ENVVARNAME=} to unset them for the remote environment. @noindent Use @code{add-to-list} to add entries: @@ -2383,8 +2383,8 @@ Use @code{add-to-list} to add entries: Modifying or deleting already existing values in the @code{tramp-remote-process-environment} list may not be feasible on restricted remote hosts. For example, some system administrators -disallow changing @env{HISTORY} variable. To accommodate such -restrictions when using @value{tramp}, fix the +disallow changing @env{HISTORY} environment variable. To accommodate +such restrictions when using @value{tramp}, fix the @code{tramp-remote-process-environment} by the following code in the local @file{.emacs} file: @@ -2394,6 +2394,16 @@ local @file{.emacs} file: (setq tramp-remote-process-environment process-environment)) @end lisp +Setting the @env{ENV} environment variable instructs some shells to +read an initialization file. Per default, @value{tramp} has disabled +this. You could overwrite this behaviour by evaluating + +@lisp +(let ((process-environment tramp-remote-process-environment)) + (setenv "ENV" "$HOME/.profile") + (setq tramp-remote-process-environment process-environment)) +@end lisp + @value{tramp} does not use the defaults specified in @code{process-environment} for running @code{process-file} or @code{start-file-process} on remote hosts. When values from |