all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 30419@debbugs.gnu.org
Subject: bug#30419: tramp-sh-process-file: effect of tramp-remote-process-environment vs non-top level value of process-environment
Date: Sun, 11 Feb 2018 09:28:09 -0500	[thread overview]
Message-ID: <876073bnye.fsf@users.sourceforge.net> (raw)
In-Reply-To: <877erjj298.fsf@gmx.de> (Michael Albinus's message of "Sun, 11 Feb 2018 10:37:23 +0100")

[-- Attachment #1: Type: text/plain, Size: 518 bytes --]

tags 30419 + patch
quit

Michael Albinus <michael.albinus@gmx.de> writes:

> `tramp-remote-process-environment' is still in play. The let-bound
> environment variables from `process-environment' are taken additionally,
> and afterwards. So they would have precedence.
>
> See bug#18940. The major reasoning is, that other packages do not want
> to preload Tramp in order to set `tramp-remote-process-environment',
> even if Tramp isn't used ever.

Thanks, I propose the following patch to the manual to clarify this:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 2285 bytes --]

From 9cafeec6027947e28e3f54ffc7f975a4845227de Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sun, 11 Feb 2018 09:20:29 -0500
Subject: [PATCH v1] Clarify TRAMP process-environment interaction (Bug#30419)

* doc/misc/tramp.texi (Remote processes): Index the
tramp-remote-process-environment description.  Clarify the effects of
let-binding process-environment and the motivation for that behavior.
---
 doc/misc/tramp.texi | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 25ae8ae3e8..4723547419 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -2596,6 +2596,7 @@ Remote processes
 @end group
 @end lisp
 
+@vindex tramp-remote-process-environment
 Customize user option @option{tramp-remote-process-environment} to
 suit the remote program's environment for the remote host.
 @option{tramp-remote-process-environment} is a list of strings
@@ -2641,11 +2642,13 @@ Remote processes
 @end group
 @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
-@code{process-environment} are needed for remote processes, then set
-them as follows:
+In addition to @option{tramp-remote-process-environment}, you can set
+environment variables for invidivual remote process calls by
+let-binding @code{process-environment}.  @value{tramp} will apply any
+entries which are not present in the global default value of
+@code{process-environment} (overriding
+@option{tramp-remote-process-environment} settings, if they conflict).
+For example:
 
 @lisp
 @group
@@ -2654,8 +2657,10 @@ Remote processes
 @end group
 @end lisp
 
-This works only for environment variables not already set in the
-@code{process-environment}.
+Let-binding in this way works regardless of whether the process to be
+called is local or remote, since @value{tramp} would add just the
+@code{HGPLAIN} setting and local processes would take whole value of
+@code{process-environment} along with the new value of @code{HGPLAIN}.
 
 For integrating other Emacs packages so @value{tramp} can execute
 remotely, please file a bug report.  @xref{Bug Reports}.
-- 
2.11.0


  reply	other threads:[~2018-02-11 14:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-11  2:11 bug#30419: tramp-sh-process-file: effect of tramp-remote-process-environment vs non-top level value of process-environment Noam Postavsky
2018-02-11  9:37 ` Michael Albinus
2018-02-11 14:28   ` Noam Postavsky [this message]
2018-02-12  8:52     ` Michael Albinus
2018-02-13  0:28       ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=876073bnye.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=30419@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.