From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Environment variables for remote processes Date: Mon, 17 Nov 2014 21:15:52 -0500 Message-ID: References: <030C5AEB-C009-4995-B153-6EECD44802C8@fb.com> <87y4rkhdt6.fsf@gmx.de> <87y4rf2jtx.fsf@gmx.de> <87r3x6eq8w.fsf@gmx.de> <87mw7rtnxg.fsf@gmx.de> <83a93rduz4.fsf@gnu.org> <87h9xxvf31.fsf_-_@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416276991 2873 80.91.229.3 (18 Nov 2014 02:16:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Nov 2014 02:16:31 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org, dpittman@fb.com To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 18 03:16:23 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XqYL8-00065r-RF for ged-emacs-devel@m.gmane.org; Tue, 18 Nov 2014 03:16:22 +0100 Original-Received: from localhost ([::1]:50997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqYL8-0003KS-C4 for ged-emacs-devel@m.gmane.org; Mon, 17 Nov 2014 21:16:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqYKx-00039f-8j for emacs-devel@gnu.org; Mon, 17 Nov 2014 21:16:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqYKo-0000Rk-Bt for emacs-devel@gnu.org; Mon, 17 Nov 2014 21:16:11 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:34021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqYKo-0000R2-7e; Mon, 17 Nov 2014 21:16:02 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id sAI2FrlB010765; Mon, 17 Nov 2014 21:15:53 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 0BD218852; Mon, 17 Nov 2014 21:15:53 -0500 (EST) In-Reply-To: <87h9xxvf31.fsf_-_@gmx.de> (Michael Albinus's message of "Mon, 17 Nov 2014 19:48:02 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5128=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5128> : inlines <1534> : streams <1344298> : uri <1835103> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:177511 Archived-At: >> Nothing wrong with it. The problem is that Tramp ignores those >> let-bindings because it fails to propagate this environment to its >> remote sub-processed. > The problem is, that not all settings of process-environment might be > desired on remote hosts. process-environment keeps *local* variables. I'm not so sure. We're talking here about the settings which are in process-environment but not in (default-toplevel-value 'process-environment), so these are all settings added via let-binding process-environment, and in all the cases I can think of, these seem to be either useful or harmless to propagate. But maybe we need to tweak the heuristic by excluding some env-vars (like PATH). > Furthermore, some remote settings might be requested which are not in > process-environment by default. Not sure what you're referring to here, but it seems like a different issue than the one at hand (which is to propagate let-bound process-environment values). > tramp-sh-handle-process-file does not start a new process, it reuses the > existing one. The propagation to the remote sub-process must ensure, > that those settings are not permanent. Via a subshell, or alike. Of course. Stefan