GNU bug report logs - #23779
25.0.95; consing "SHELLVAR" onto process-environment doesn't remove it from subprocess env

Previous Next

Package: emacs;

Reported by: Noam Postavsky <npostavs <at> users.sourceforge.net>

Date: Fri, 17 Jun 2016 03:34:02 UTC

Severity: normal

Found in version 25.0.95

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>, Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: 23779 <at> debbugs.gnu.org
Subject: bug#23779: 25.0.95; consing "SHELLVAR" onto process-environment doesn't remove it from subprocess env
Date: Fri, 17 Jun 2016 15:17:38 +0300
On 06/17/2016 10:11 AM, Eli Zaretskii wrote:

> Where does it say that you can use 'cons' or 'push', and only them, to
> the effect of removing the variable from the environment passed to
> child processes?

That works with other Emacs features, such as auto-mode-alist.

You can also override the values in process-environment using a cons 
(which strongly suggests the semantics of "first element wins"). Just 
not "remove" them, currently.

> process-environment is just a simple list, so these
> two functions just _add_ another member to the list, they don't remove
> the old member.

What would be the point of ever using the "only its name" form if you 
have to scrub process-environment of all other mentions of this variable?

> My reading of the last sentence you cite is that you must manually
> remove the old member "SHELL=whatever", and _then_ add a member that
> has no value.

If I've removed all mentions of "GIT_DIR" in there, it's already 
removed, and the subprocesses shouldn't see it. Why add the new member then?




This bug report was last modified 8 years and 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.