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: Thu, 20 Nov 2014 16:52:26 +0100 Message-ID: <87fvddvphh.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> <87mw7oe2y3.fsf@gmx.de> <87h9xwdvxx.fsf@gmx.de> <87egsz3vhc.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416498811 11162 80.91.229.3 (20 Nov 2014 15:53:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Nov 2014 15:53:31 +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 Thu Nov 20 16:53: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 1XrU2q-00057D-RQ for ged-emacs-devel@m.gmane.org; Thu, 20 Nov 2014 16:53:20 +0100 Original-Received: from localhost ([::1]:35997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrU2q-0006N8-HL for ged-emacs-devel@m.gmane.org; Thu, 20 Nov 2014 10:53:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrU2J-000600-1M for emacs-devel@gnu.org; Thu, 20 Nov 2014 10:52:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrU2D-00040f-41 for emacs-devel@gnu.org; Thu, 20 Nov 2014 10:52:46 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:60469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrU26-0003y3-Cu; Thu, 20 Nov 2014 10:52:34 -0500 Original-Received: from detlef.gmx.de ([79.195.24.26]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0M6zkD-1YCsUo3k0r-00wkY6; Thu, 20 Nov 2014 16:52:28 +0100 In-Reply-To: (Stefan Monnier's message of "Wed, 19 Nov 2014 23:29:58 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-Provags-ID: V03:K0:GGA/GZu4hTNwH93anVQ0rSm4n971EXHY6HtkOQRS+eJisXptw/w XX+Pek+pXajFKk0B3NvvujXxI9uOmJguYDXTVOVe2skMmnmKs3bpO0MK3Ms4H+TrSc9IHnP fVjqfbhvVg8R5Us/dFpC5oEmQWIqD2H0FesfWvXjYLT3COjlfeGEYKI/OjOcMKFj5ViRYHP 1IgSv3d5gjGV8254BY/bw== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.15.18 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:177876 Archived-At: Stefan Monnier writes: >> But then you change the definition of process-environment. The docstring >> says "let-binding `process-environment' is an easy way to temporarily >> change the value of an environment variable". It does not say it should >> be the only way to do that, especially for process-file. > > What other way do you have in mind? > > If you just use straight `setq' this will affect all subsequent > executions of subprocesses, so it only makes sense for env settings > which are not specific for one particular subprocess. > > but that's quite less convenient and efficient than using `let', so I'm > not worried if we don't handle that case. There's setenv. And it is the recommended way to manipulate process-environment. >> Nitpicking: there is no clean way to remove an environment variable, >> which might have been set remotely and which you do not want to have >> set while executing process-file. > > Actually, C-h v process-environment says: > > irrespective of where it comes from. To use `process-environment' to > remove an environment variable, include only its name in the list, > without "=VALUE". You are right, I forgot this. > -- Stefan Best regards, Michael.