From: "Bo Johansson" <bo.johansson@lsn.se>
To: "Eli Zaretskii" <eliz@gnu.org>
Cc: 10980@debbugs.gnu.org
Subject: bug#10980: 23.4; Variable initial-environment incorrectly set
Date: Sat, 24 Mar 2012 00:26:06 +0100 [thread overview]
Message-ID: <6D6CE7A7BBF846CFB620FC9487A18610@spc2> (raw)
In-Reply-To: <8362dvuixw.fsf@gnu.org>
>From: Eli Zaretskii
>Sent: Friday, March 23, 2012 10:05 PM
>> From: "Bo Johansson" <bo.johansson@lsn.se>
>> 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!
next prev parent reply other threads:[~2012-03-23 23:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-09 11:01 bug#10980: 23.4; Variable init_environment incorrectly set Bo Johansson
2012-03-23 6:30 ` bug#10980: 23.4; Variable initial-environment " Bo Johansson
2012-03-23 16:06 ` Eli Zaretskii
2012-03-23 20:20 ` Bo Johansson
2012-03-23 21:05 ` Eli Zaretskii
2012-03-23 23:26 ` Bo Johansson [this message]
2012-03-28 8:56 ` Bo Johansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6D6CE7A7BBF846CFB620FC9487A18610@spc2 \
--to=bo.johansson@lsn.se \
--cc=10980@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).