From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Environment variables for remote processes Date: Tue, 18 Nov 2014 20:14:28 +0100 Message-ID: <87mw7oe2y3.fsf@gmx.de> 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 1416338106 12821 80.91.229.3 (18 Nov 2014 19:15:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Nov 2014 19:15:06 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org, dpittman@fb.com To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 18 20:14:58 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 1XqoEs-0004Vo-31 for ged-emacs-devel@m.gmane.org; Tue, 18 Nov 2014 20:14:58 +0100 Original-Received: from localhost ([::1]:54858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqoEr-0003BS-IE for ged-emacs-devel@m.gmane.org; Tue, 18 Nov 2014 14:14:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqoEb-0003BM-Hs for emacs-devel@gnu.org; Tue, 18 Nov 2014 14:14:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqoEV-0003aa-Li for emacs-devel@gnu.org; Tue, 18 Nov 2014 14:14:41 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:65158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqoEV-0003aU-Aw; Tue, 18 Nov 2014 14:14:35 -0500 Original-Received: from detlef.gmx.de ([79.195.18.210]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MeLKt-1XbjQ10tZ9-00Q8VP; Tue, 18 Nov 2014 20:14:30 +0100 In-Reply-To: (Stefan Monnier's message of "Mon, 17 Nov 2014 21:15:52 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:vzhemxsSLgzbrd8xpz3aeTHQZoB9FGy95GPNaGw21a3BRhRaqZn c/j2f95zSFRqt+CXVt2DayUDYaZfG4PXl+rLl2TF9Tcnlq00gpWNknAs6W4Vly3FWx4stIr wx8XNCJ56igYZRd3EItgCG2VMN3yY3m4z0Rzu0Xhh1pLJk+V4AZHHqeXqzLCENRdo5PQBXf DN1pJoDmptzPGhSAu5ZRQ== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.20 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:177635 Archived-At: Stefan Monnier writes: >> 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. That sounds terrible: two classes of citizens in process-environment. Some of them being there before Tramp connection happened, and some of them added later, via let-bind or permanently. How do you want to explain the difference to a user? It would make a difference, whether an entry has been added to process-environment before a Tramp connection, or afterwards. And how would you deal with deleted entries of process-environment? Something like (let ((process-environment process-environment)) (setenv "DISPLAY") (process-file ...)) >> 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). I'm speaking about tramp-remote-process-environment, which uses another mechanism. But if we have an accepted mechanism for environment variables on remote hosts, there shall be only The One Way to set them. > Stefan Best regards, Michael.