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: Fri, 23 Mar 2012 21:20:23 +0100 [thread overview]
Message-ID: <638D93647FE24F879BBCDB56FB6C91E0@spc2> (raw)
In-Reply-To: <83d383uwri.fsf@gnu.org>
>From: Eli Zaretskii
>Date: Fri, 23 Mar 2012 18:06:57 +0200
>> From: "Bo Johansson" <address@hidden>
>> Date: Fri, 23 Mar 2012 07:30:42 +0100
>>
>> On Windows the Emacs variable initial-environment is NOT set according to
>> the
>> documentation:
>> "The variable initial-environment stores the initial environment
>> inherited by
>> Emacs".
>
>I'm sorry, I'm not sure I understand the essence of your report. What
>exactly would you like the documentation to say that it doesn't say
>now? Or, to put it differently, what in the way initial-environment
>is set on Windows contradicts the documentation?
>
>Thanks.
Hej Eli!
My goal is:
I want to get the same result doing something from within Emacs as doing it
from a Windows command prompt. To do "(compile "make" nil)" within Emacs
should give the same result as doing "make" from the Windows command prompt.
The problem is:
The environment variables inherited by Emacs is changed. The changes in the
environment leads to diffren results doing something from within Emacs
compared to doing it from a Windows command prompt.
The BUG in Emacs is:
In Windows the variable initial-environment is set first after "the initial
environment inherited by Emacs" is changed. The function init_environment
(char ** argv) (in emacs-git/src/w32.c at line 1528) changes the
environment variables. The CHANGED "initial environment" is stored in the
variable initial_environment by the function set_initial_environment (in
emacs-git/src/callproc.c at line 1616).
However the documentation says: "The variable initial-environment stores the
initial environment inherited by Emacs".
My goal can be achieved if the bug is corrected:
A correct value in the variable initial-environment is need to be able to
know "the environment inherited by Emacs". This make it possible to use
initial-environment in the lisp function (defun compilation-start (command
&optional mode name-function highlight-regexp) in
emacs-git/lisp/progmodes/simple.el:2088. The in emacs internal used
environment variables can temporary be override by those in the variable
initial-environment.
(It is of course also possible to use a new variable which contains "the
initial environment inherited by Emacs".)
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.)
Best regards
Bosse
next prev parent reply other threads:[~2012-03-23 20:20 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 [this message]
2012-03-23 21:05 ` Eli Zaretskii
2012-03-23 23:26 ` Bo Johansson
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=638D93647FE24F879BBCDB56FB6C91E0@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).