bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24956: 26.0.50; On Windows, setting PATH in compilation-environment


From: Eli Zaretskii
Subject: bug#24956: 26.0.50; On Windows, setting PATH in compilation-environment has no effect
Date: Fri, 18 Nov 2016 11:46:28 +0200

> From: Noam Postavsky <npostavs@users.sourceforge.net>
> Date: Thu, 17 Nov 2016 16:27:17 -0500
> Cc: Óscar Fuentes <ofv@wanadoo.es>, 24956@debbugs.gnu.org
> 
> >> (let ((process-environment (cons "Path=d:\\foo" process-environment)))
> >>   (call-process "cmd" nil '(t t) nil "/C" "echo %PATH%"))
> >>
> >> inserts "d:\foo". In Emacs 25.1, or reverting the commit I mentioned,
> >> the opposite occurs.
> >
> > I think this is because PATH doesn't exist in the original environment
> > inherited from the shell, only Path does.  We push PATH into the
> > environment only in w32.c:init_environment (and do the same trick with
> > ComSpec vs COMSPEC).  But since the above-mentioned change, that
> > function no longer affects process-environment.
> >
> > So to fix this bug, we need to push PATH and COMSPEC into
> > process-environment, replacing their camel-case variants.
> >
> > Does this make sense?
> 
> Yes. https://cygwin.com/cygwin-ug-net/using-cygwinenv.html lists a few
> other variables that it upcases (at the bottom of the page), should we
> do those ones as well?

No, I don't think so.  (Some of those are up-cased in the original
environment on my machine, anyway.)  Let's not do something like that
without a good reason.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]