From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs 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 Message-ID: <962d42ee-847c-507e-d457-2d6f9a38e955@yandex.ru> References: <837fdocmrl.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1466166165 11400 80.91.229.3 (17 Jun 2016 12:22:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Jun 2016 12:22:45 +0000 (UTC) Cc: 23779@debbugs.gnu.org To: Eli Zaretskii , Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 17 14:22:34 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1bDsnA-0002lB-JR for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Jun 2016 14:22:32 +0200 Original-Received: from localhost ([::1]:56455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDsn9-00087A-AN for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Jun 2016 08:22:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDsis-0003wt-Cy for bug-gnu-emacs@gnu.org; Fri, 17 Jun 2016 08:18:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDsio-0003WV-Ca for bug-gnu-emacs@gnu.org; Fri, 17 Jun 2016 08:18:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDsio-0003WP-97 for bug-gnu-emacs@gnu.org; Fri, 17 Jun 2016 08:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bDsin-0003Yj-Te for bug-gnu-emacs@gnu.org; Fri, 17 Jun 2016 08:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jun 2016 12:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23779 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23779-submit@debbugs.gnu.org id=B23779.146616586813662 (code B ref 23779); Fri, 17 Jun 2016 12:18:01 +0000 Original-Received: (at 23779) by debbugs.gnu.org; 17 Jun 2016 12:17:48 +0000 Original-Received: from localhost ([127.0.0.1]:43880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDsia-0003YI-B6 for submit@debbugs.gnu.org; Fri, 17 Jun 2016 08:17:48 -0400 Original-Received: from mail-wm0-f51.google.com ([74.125.82.51]:35948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bDsiY-0003Y4-GL for 23779@debbugs.gnu.org; Fri, 17 Jun 2016 08:17:46 -0400 Original-Received: by mail-wm0-f51.google.com with SMTP id f126so86734487wma.1 for <23779@debbugs.gnu.org>; Fri, 17 Jun 2016 05:17:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=iBKwTcH9eOZ9tjDOTmyl4LvSEMxw99DEh6CY7W2dg58=; b=FonXSvSZCDIT803mVRxW5NACk8rsIjVpcnp1V0RtnG0/BYAQJ29U6V5eJVVAcmOW0C PRPL1YmW+m5y30RnZGcuzxuaapxWcCEa7xzDZBdnvnAX3/jWQ7l/PL6j+zhh6oXW0lpa e6ZmMm5B0qCq+Rj9hl7DjD2IuTyXuX9YNJCmjVMFV2/7C0QxF/DNAB/D5Djuc8YbwE8j BELGWCns3iQDSDPh1gmVGD13mNGgzXw2wk02i+dN9noacWos/hbtZ5/IJmh6tr5njS9W NHwNgFTI9vMG0+mayTLeHZfJbYr+IdxABGoXLfBwWTPk0Xhx04U9dbrRlLvetJmS3a3t N10g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=iBKwTcH9eOZ9tjDOTmyl4LvSEMxw99DEh6CY7W2dg58=; b=A38eHJuSTT9PVC5/iPTQEBQ8G7wvFRmLJblEtzpZMrdeVSxOiXBViFETviPeEARCYH Xq5ZOAebxAZ+YB5xnZMmGydlgWcrxjPvLDI7kArDtpStx9ys/1s1r/PLhrqZ38usebh9 xD7xeXYCLhDgUWEiOKGuprAGVL0I+vaCQB46X+CZLWe7ULE+yjUV712FAgA9qJpfnOHN JyHbH84aS2AQJr1M+a1G5vho1+1A2Dxoazh8rkU52KTqnJ43C7Agm2xofsmldD6bp7pO 5rdVT2lNDVjG64GxOSAW5hHq11mjgv5wd+QDkiu8O4IEes/Q8rJN75OSZGqHK/bEv8Hh X/wQ== X-Gm-Message-State: ALyK8tLesk6512BtnCCoYC30ONjtyOdTdLdWqsuLpH2jAvSODaYmfBdYjkMK5vlykgWk2g== X-Received: by 10.194.22.169 with SMTP id e9mr2060516wjf.128.1466165860847; Fri, 17 Jun 2016 05:17:40 -0700 (PDT) Original-Received: from [192.168.1.2] ([185.105.173.135]) by smtp.googlemail.com with ESMTPSA id v70sm3376060wmf.18.2016.06.17.05.17.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2016 05:17:40 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 In-Reply-To: <837fdocmrl.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:119662 Archived-At: 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?