From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Bo Johansson" Newsgroups: gmane.emacs.bugs Subject: bug#10980: 23.4; Variable initial-environment incorrectly set Date: Sat, 24 Mar 2012 00:26:06 +0100 Message-ID: <6D6CE7A7BBF846CFB620FC9487A18610@spc2> References: <91BFD8A43A0C4F29ADF1BB30E3861DAD@spc2> <83d383uwri.fsf@gnu.org> <638D93647FE24F879BBCDB56FB6C91E0@spc2> <8362dvuixw.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1332545239 3692 80.91.229.3 (23 Mar 2012 23:27:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 23 Mar 2012 23:27:19 +0000 (UTC) Cc: 10980@debbugs.gnu.org To: "Eli Zaretskii" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 24 00:27:17 2012 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 1SBDt3-0005LW-6a for geb-bug-gnu-emacs@m.gmane.org; Sat, 24 Mar 2012 00:27:13 +0100 Original-Received: from localhost ([::1]:50750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBDt2-0007Y5-Ib for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Mar 2012 19:27:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBDsz-0007XT-4y for bug-gnu-emacs@gnu.org; Fri, 23 Mar 2012 19:27:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SBDsx-00014D-Ae for bug-gnu-emacs@gnu.org; Fri, 23 Mar 2012 19:27:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBDsx-000149-7H for bug-gnu-emacs@gnu.org; Fri, 23 Mar 2012 19:27:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SBEMs-0000t0-1Q for bug-gnu-emacs@gnu.org; Fri, 23 Mar 2012 19:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Bo Johansson" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Mar 2012 23:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10980 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10980-submit@debbugs.gnu.org id=B10980.13325470453359 (code B ref 10980); Fri, 23 Mar 2012 23:58:02 +0000 Original-Received: (at 10980) by debbugs.gnu.org; 23 Mar 2012 23:57:25 +0000 Original-Received: from localhost ([127.0.0.1]:35916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBEMH-0000s7-3A for submit@debbugs.gnu.org; Fri, 23 Mar 2012 19:57:25 -0400 Original-Received: from seluib4vp34.perspektivbredband.net ([81.186.254.26]:37087) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SBEM0-0000rh-GF for 10980@debbugs.gnu.org; Fri, 23 Mar 2012 19:57:23 -0400 Original-Received: from spc2 (hd5b913e4.seluldx.dyn.perspektivbredband.net [213.185.19.228]) by seluib4vp34.perspektivbredband.net (Postfix) with SMTP id C760363ADB; Sat, 24 Mar 2012 00:26:11 +0100 (CET) In-Reply-To: <8362dvuixw.fsf@gnu.org> X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 15.4.3538.513 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3538.513 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:58053 Archived-At: >From: Eli Zaretskii >Sent: Friday, March 23, 2012 10:05 PM >> From: "Bo Johansson" >> Cc: <10980@debbugs.gnu.org> >> Date: Fri, 23 Mar 2012 21:20:23 +0100 >> >> Summary: A value in the variable initial-environment according to the >> documentation makes it possible to "get the same result doing something >> from >> within Emacs as doing it from a Windows command prompt". >> >> (See also >> http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-03/msg00178.html.) > >Is this only about SHELL, and only with dmake, or are there other >variables that get in the way of other programs? Please be specific; >the few changes done to the variables outside Emacs are done for a >good reason, so it's important to know the exact adverse effects of >that to judge how justified would it be to change the current code. It is not only about SHELL. But SHELL is the most frequent problem. Dmake and other make programs is just one among many other cases. I searched internet for "emacs" and "warning: extra args ignored after". There was +1400 hits. Many of theese depends on that SHELL is set to .../cmdproxy.exe. Adding -dmake to the search, resulted in 1280 hits. This indicates that dmake is only one case among others. In the function compilation-start (lisp/progmodes/compile.el:1166) is the variable process-environment changed. This is done TEMPORARY by using "(let ((process-environment ...". However, in many other places are "persistent" changes made by using the lisp function setenv. This is in many cases not good. Activating a function can then result in an unexpected "persistent" change of the environment. The last 20 years I have seen many unexpected things using "(compile "something" nil)", but it is first lately I have understood that one of the reasons are the changed environment. At least the functions compile and shell-command should use an as far as possible unmodified "initial environment inherited by Emacs". I am missing a strategy how to handle the environment within Emacs. I will try to find examples of other variables then SHELL!