GNU bug report logs -
#67540
29.1; Emacs on Windows incorrectly capitalizes some environment variables
Previous Next
Reported by: Dave Abrahams <dave <at> boostpro.com>
Date: Thu, 30 Nov 2023 02:31:02 UTC
Severity: normal
Tags: wontfix
Found in version 29.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 67540 <at> debbugs.gnu.org (full text, mbox):
tags 67540 wontfix
thanks
> From: Dave Abrahams <dave <at> boostpro.com>
> Date: Wed, 29 Nov 2023 18:29:26 -0800
>
>
>
> emacs -Q
> M-! set
>
> Now issue the "set" command from a CMD shell. Notice that the "Path"
> environment variable has been renamed to "PATH" in Emacs. This renaming
> interferes with some tools operating correctly e.g. the swift compiler
> (see https://swift.org).
You are saying that the swift compiler doesn't recognize "PATH"? If
so, it's a bug in the swift compiler, since look up of environment
variables by cmd.exe at least is case-insensitive on Windows, and I
have yet to see a Windows program which doesn't do the same. I
suggest reporting a bug against swift.
We cannot avoid up-casing Path and ComSpec in Emacs because that would
break many places in Emacs that assume they are spelled in CAPS.
(Obviously, PATH is much more critical than COMSPEC, but still.) And
Emacs Lisp programs don't compare these variables case-insensitively.
So if swift and some other programs must have Path and not PATH, my
suggestion is to perform the letter-case changes when you invoke those
programs, and them alone, as doing that globally in Emacs will cause
problems elsewhere.
This bug report was last modified 75 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.