GNU bug report logs -
#10980
23.4; Variable init_environment incorrectly set
Previous Next
Reported by: "Bo Johansson" <bo.johansson <at> lsn.se>
Date: Fri, 9 Mar 2012 17:16:03 UTC
Severity: wishlist
Tags: patch
Found in version 23.4
Fixed in version 26.1
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>From: Eli Zaretskii
>Date: Fri, 23 Mar 2012 18:06:57 +0200
>> From: "Bo Johansson" <address <at> 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
This bug report was last modified 8 years and 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.