Subject: Re: bug#67540: 29.1; Emacs on Windows incorrectly capitalizes some environment variables

From: Dave Abrahams <[email-masked]>
Date: Sat, 2 Dec 2023 08:22:47 -0800

> On Dec 1, 2023, at 11:04 PM, Eli Zaretskii <[email-masked]> wrote:
> 
>> From: Dave Abrahams <[email-masked]>
>> Date: Fri, 1 Dec 2023 12:34:40 -0800
>> Cc: [email-masked], [email-masked]
>> 
>> You’re saying that these are ported UNIX programs that are only designed to work from inside of Emma, which has changed the spelling of the environment variable names?
> 
> No, they are not for Emacs only.  But they expect to see PATH, and
> they compare case-sensitively with "PATH".  If you want to cater to
> swift, which doesn't recognize "PATH", but does recognize "Path", why
> not assume that there are other programs which do the opposite, and
> which will be broken by the change you propose?

I'm only not making that assumption because I haven't been able to find a single example, and because it's harder for me to imagine someone porting a program from one OS to another and only testing their port in a non-standard environment, whereas I've seen thousands of examples of code that (erroneously) only works when things are set up in the most usual way.

> IOW, I don't see why we should change code that worked for decades
> because a single application implements a case-sensitive search of
> environment variables on MS-Windows, in direct contradiction of
> platform conventions, and contrary to the behavior of every other
> program I've ever used on Windows?

I'm not saying you should, only that you could.  

You seem to be contradicting yourself.  Either every other program on Windows does case-insensitive environment searches and nobody would be broken by my suggestion, or there are some that, in direct contradiction of platform conventions, only look for PATH and would be broken if they saw Path.

Why would you want to do something like this?  Just that it's (IMO) far more likely you'll find software that only works properly on a given platform when things are set up in the standard way than it is that you'll find software that only works properly in a technically conforming but non-standard setup.  The choice is yours, obviously, but it seems to me one arrangement is much less likely to stimulate bugs than the other one.