From unknown Tue Jun 17 01:48:24 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#67540 <67540@debbugs.gnu.org> To: bug#67540 <67540@debbugs.gnu.org> Subject: Status: 29.1; Emacs on Windows incorrectly capitalizes some environment variables Reply-To: bug#67540 <67540@debbugs.gnu.org> Date: Tue, 17 Jun 2025 08:48:24 +0000 retitle 67540 29.1; Emacs on Windows incorrectly capitalizes some environme= nt variables reassign 67540 emacs submitter 67540 Dave Abrahams severity 67540 normal tag 67540 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 29 21:30:02 2023 Received: (at submit) by debbugs.gnu.org; 30 Nov 2023 02:30:02 +0000 Received: from localhost ([127.0.0.1]:51896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8WoT-0005ql-6r for submit@debbugs.gnu.org; Wed, 29 Nov 2023 21:30:02 -0500 Received: from lists.gnu.org ([2001:470:142::17]:60114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8WoQ-0005qS-FB for submit@debbugs.gnu.org; Wed, 29 Nov 2023 21:29:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8WoB-0007td-RY for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2023 21:29:44 -0500 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r8Wo9-0001rW-Em for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2023 21:29:43 -0500 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1cfcc9b3b5cso4985055ad.0 for ; Wed, 29 Nov 2023 18:29:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boostpro-com.20230601.gappssmtp.com; s=20230601; t=1701311379; x=1701916179; darn=gnu.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=AtwwaU6SBZT07y0uwOuy9ze6icht9l6zB3y+UXxzGKY=; b=bIfjigly66HbSbJRo8ua4QaR6H/d5iU9Gbov0fpq/ycxbxkOjfT+OSX/z18Looe8sJ QnrIJrm7D6ouKsnQNKUJst7iIAKsbw0OKKXZ4DAajNrqvjr6SNeusxaOjq5ikzTrpEEH CpKetpe4FyFg7fvOxtAGgL6t1MMW94rInbeg8Hij0vpkEbPmBHT7dP9gC3hoOer1jOHp JAzrfwd1Hn1T5dTF+jO0qPZEWMZviWiYa+Qp7zKZUb2lB+/xEl4LyzZVV5Cavhb4259y HciqIIV2nZWWYa4bQ6RCFNwxUnYx0tcIkpZiy01YuvoucaZdb3OYqyf05WCb2wCK4v1E lZRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701311379; x=1701916179; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AtwwaU6SBZT07y0uwOuy9ze6icht9l6zB3y+UXxzGKY=; b=VHAN48Jgw6SaIwIW+rEq3/ieaNxdD5AUeM89lnDEPFM1YuCdTxqL4gdBT9yBdVfap8 PbsNM9GRplD3SSh3rh8hWLtEZj/fO/e+CqcX4708qZdGurTkFAHcwPuFxfgpFnLsHEBW GKu2LhQ9kcK2aYLnYa9wdlqt+vTIJojKfCnH52w9TwT462BDPzvHc4Liy1ySQhGtnuRv zF8RYrVwkSAVhHnIBVk9JMQ+gi6DMKcTGG2sVW0KpcKAOuVt+Jk4zKwcxK0aOH7gzNSW UhRuSyQRVPmh8z36H+Hqzd+c1w9M4slLXWgceAnVEHaGtmEE/X58zpQQ0aF+ohraTwUa V/hg== X-Gm-Message-State: AOJu0YxDkZEyIlzNDrGmsRUpX7PrWkY50JqNLzL6Jhv2oFu98qL0iifJ ccHVmMAJWj4Zik1AmxVYOHsF9NB2uFu3VoM87dTZtw== X-Google-Smtp-Source: AGHT+IGmf2iX6yhW1bXuy4AskhMgkoturlrEwK5Ftct9SAZK0nMLAy9RhGKUAstrQ543WoFAnAPA5A== X-Received: by 2002:a17:902:dac4:b0:1cf:f353:6e47 with SMTP id q4-20020a170902dac400b001cff3536e47mr9823550plx.20.1701311378656; Wed, 29 Nov 2023 18:29:38 -0800 (PST) Received: from smtpclient.apple (69-209-31-205.lightspeed.sntcca.sbcglobal.net. [69.209.31.205]) by smtp.gmail.com with ESMTPSA id b18-20020a170902d51200b001c452f827casm62604plg.257.2023.11.29.18.29.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Nov 2023 18:29:38 -0800 (PST) From: Dave Abrahams Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: 29.1; Emacs on Windows incorrectly capitalizes some environment variables Message-Id: <4447B955-7BC6-4641-B65D-F674D796B86E@boostpro.com> Date: Wed, 29 Nov 2023 18:29:26 -0800 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3774.200.91.1.1) Received-SPF: none client-ip=2607:f8b0:4864:20::62f; envelope-from=dave@boostpro.com; helo=mail-pl1-x62f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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). I notice that the "ComSpec" variable is getting the same treatment I am able to work around the problem as follows: (defun unsetenv (var-name) (let ((current-prefix-arg '(4))) (funcall-interactively 'setenv var-name nil))) (when (eq system-type 'windows-nt) (dolist (v '("Path" "ComSpec")) (let ((x (getenv v))) (unsetenv (upcase v)) (setenv v x)))) In GNU Emacs 29.1 (build 2, x86_64-w64-mingw32) of 2023-08-02 built on AVALON Windowing system distributor 'Microsoft Corp.', version 10.0.22621 System Description: Microsoft Windows 10 Pro (v10.0.2009.22621.2715) Configured using: 'configure --with-modules --without-dbus --with-native-compilation=3Daot --without-compress-install --with-tree-sitter CFLAGS=3D-O2' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB (NATIVE_COMP present but libgccjit not available) Important settings: value of $LANG: ENU locale-coding-system: cp1252 Major mode: Dired by name Minor modes in effect: magit-wip-initial-backup-mode: t magit-wip-before-change-mode: t magit-wip-after-apply-mode: t magit-wip-after-save-mode: t global-git-commit-mode: t shell-dirtrack-mode: t server-mode: t ws-butler-global-mode: t ws-butler-mode: t global-auto-revert-mode: t savehist-mode: t delete-selection-mode: t override-global-mode: t straight-use-package-mode: t straight-package-neutering-mode: t straight-symlink-emulation-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: c:/Users/dave/.emacs.d.default/straight/build/transient/transient hides = c:/Program Files/Emacs/emacs-29.1/share/emacs/29.1/lisp/transient c:/Users/dave/.emacs.d.default/straight/build/use-package/use-package = hides c:/Program = Files/Emacs/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package = c:/Users/dave/.emacs.d.default/straight/build/use-package/use-package-lint= hides c:/Program = Files/Emacs/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package-lint = c:/Users/dave/.emacs.d.default/straight/build/use-package/use-package-jump= hides c:/Program = Files/Emacs/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package-jump = c:/Users/dave/.emacs.d.default/straight/build/use-package/use-package-ensu= re hides c:/Program = Files/Emacs/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package-ensur= e = c:/Users/dave/.emacs.d.default/straight/build/use-package/use-package-dimi= nish hides c:/Program = Files/Emacs/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package-dimin= ish = c:/Users/dave/.emacs.d.default/straight/build/use-package/use-package-deli= ght hides c:/Program = Files/Emacs/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package-delig= ht = c:/Users/dave/.emacs.d.default/straight/build/use-package/use-package-core= hides c:/Program = Files/Emacs/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package-core = c:/Users/dave/.emacs.d.default/straight/build/use-package/use-package-bind= -key hides c:/Program = Files/Emacs/emacs-29.1/share/emacs/29.1/lisp/use-package/use-package-bind-= key c:/Users/dave/.emacs.d.default/straight/build/bind-key/bind-key hides = c:/Program = Files/Emacs/emacs-29.1/share/emacs/29.1/lisp/use-package/bind-key c:/Users/dave/.emacs.d.default/straight/build/seq/seq hides c:/Program = Files/Emacs/emacs-29.1/share/emacs/29.1/lisp/emacs-lisp/seq c:/Users/dave/.emacs.d.default/straight/build/let-alist/let-alist hides = c:/Program = Files/Emacs/emacs-29.1/share/emacs/29.1/lisp/emacs-lisp/let-alist Features: (shadow sort mail-extr emacsbug cl-print debug backtrace shortdoc help-fns radix-tree magit-extras magit-submodule magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply sh-script smie treesit executable swift-mode swift-mode-imenu swift-mode-repl swift-mode-font-lock swift-mode-standard-types swift-mode-fill swift-mode-beginning-of-defun swift-mode-indent swift-mode-lexer find-file-in-repository dired-aux ffap misearch multi-isearch vc-git vc-dispatcher jka-compr pcase dwa-init editorconfig-generate-autoloads editorconfig-autoloads noccur noccur-autoloads focus focus-autoloads darkroom face-remap darkroom-autoloads org-modern org-modern-autoloads poly-org org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete org-list org-footnote org-faces org-entities noutline outline ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs cal-menu calendar cal-loaddefs org-version org-compat org-macs polymode poly-lock polymode-base polymode-weave polymode-export polymode-compat advice polymode-methods polymode-core polymode-classes eieio-custom wid-edit eieio-base color poly-org-autoloads poly-markdown-autoloads markdown-mode-autoloads polymode-autoloads find-file-in-repository-autoloads magit-imerge-autoloads magit-wip magit-log which-func magit-diff smerge-mode diff git-commit log-edit message sendmail yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log magit-core magit-autorevert magit-margin magit-transient magit-process with-editor comp comp-cstr warnings icons shell pcomplete server magit-mode transient magit-git magit-base magit-section format-spec cursor-sensor crm compat magit-autoloads magit-section-autoloads git-commit-autoloads with-editor-autoloads transient-autoloads compat-autoloads dwa-progmodes yaml-mode yaml-mode-autoloads tide tide-lv thingatpt imenu flycheck find-func s dash etags fileloop generator xref tide-autoloads flycheck-autoloads let-alist-autoloads pkg-info-autoloads epl-autoloads s-autoloads dash-autoloads typescript-mode rx cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs typescript-mode-autoloads swift-mode-autoloads seq-autoloads dwa-global-config compile text-property-search comint ansi-osc ansi-color ring skeleton modus-operandi-tinted-theme modus-themes modus-themes-autoloads use-package-bind-key ws-butler ws-butler-autoloads use-package-diminish diminish diminish-autoloads ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util diff-mode descr-text package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source eieio eieio-core password-cache json map url-vars finder-inf ido autorevert filenotify savehist delsel cus-load use-package-core dwa-global-keybindings edmacro kmacro bind-key easy-mmode dwa-folding dwa-compile project byte-opt dwa-buffers dwa-navigation use-package-autoloads bind-key-autoloads files-x straight-autoloads cl-seq cl-extra help-mode straight subr-x cl-macs cl-loaddefs cl-lib bytecomp byte-compile chemacs gv rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 557582 44793) (symbols 48 31897 0) (strings 32 115342 4566) (string-bytes 1 3994014) (vectors 16 67230) (vector-slots 8 1455375 78880) (floats 8 356 751) (intervals 56 18883 2260) (buffers 984 33)) From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 29 22:43:06 2023 Received: (at 67540) by debbugs.gnu.org; 30 Nov 2023 03:43:06 +0000 Received: from localhost ([127.0.0.1]:51950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8XxC-000870-DW for submit@debbugs.gnu.org; Wed, 29 Nov 2023 22:43:06 -0500 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:48240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8XxA-00086V-9N for 67540@debbugs.gnu.org; Wed, 29 Nov 2023 22:43:05 -0500 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1cfcc9b3b5cso5340025ad.0 for <67540@debbugs.gnu.org>; Wed, 29 Nov 2023 19:42:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701315770; x=1701920570; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=FfF2STYIb5wlieDnt1wNwVyRKUXX2IN7OxQ8lxr0x1s=; b=FG3C5iLcn6nLgcoks+2jA1/BGcN5+UYPE1IvzgbkR7rMa0OydGPlSl/6T6eSRSHd4Q b7qsu+t2Fev2MXzARcHC9vxyEiCfnuWUcquJy0GuCPtAkmHIJ+JnCyrKOYDLxuXvtN5/ ecrvy42P+8EWBXf6urwwjlznih8Of1wUG6ZVSQVt9PMBMxelQDyEqpGqkl0ZkwLyPiPo LsB8QKu4HBxGt/yCLLUIccSCanHpOAkjtDr1qSqPSBeqvosbt2i3WVGBz5+mdeHWz0tv yhadWVETTEvXfqEKCtbUUc+WFJEOFwmFbJmMn5/NSm6Qn1jjjoz1826Z0Z4o2MqwNXB3 X/Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701315770; x=1701920570; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FfF2STYIb5wlieDnt1wNwVyRKUXX2IN7OxQ8lxr0x1s=; b=VNnthZuHGnIMBJxGdkaV+9TEKU0qxUu02JQedew08FtLZtfMdtUz1VlqIJc5lFcG3a ZAsDSiquyDQRhODee9ShFchVzqn3BNYfh3ZwV7L1+NtHntEAtj2xD8I+6HdHGtcaKnZI 6sh/2TNcJ6QtIZ0/tLYTtTo0TrQvE0kpNPCbEbUuNNUcQ6XES15Tem8VOIy46pXVg50c TsLAaIa0eDXBvgOuAJSfoOHMwMQtz/SHwoOJi5Yu3JOVnrglk3PdF7w85zSoQRws1Hq2 6hPNFiikqcWHA6e3uAeYuztQT4ciBntDSwSaYNaiibVUalOVXJbWG/S3jNI5qvGiaTJD 2ztw== X-Gm-Message-State: AOJu0YwNg1JvWjfGc9qtcZHfwbNVKfdCFYdspnQ93d3lG8PVacsTXMNw j+66eiYeiL06mJARRYjNB3o= X-Google-Smtp-Source: AGHT+IHCFEmvdZekqDZnbeS41D9KlWNHHKoYly4ME/CbiZFTVScK+OoATkTIigcKVM4FNwSxkrQq7w== X-Received: by 2002:a17:903:32c8:b0:1cf:b12a:a9eb with SMTP id i8-20020a17090332c800b001cfb12aa9ebmr22551105plr.19.1701315770108; Wed, 29 Nov 2023 19:42:50 -0800 (PST) Received: from [192.168.1.2] (076-168-148-233.res.spectrum.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id u23-20020a170902a61700b001cf6d5a034dsm144587plq.209.2023.11.29.19.42.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Nov 2023 19:42:49 -0800 (PST) Message-ID: <2bbe9442-489d-f35e-8379-37326278798a@gmail.com> Date: Wed, 29 Nov 2023 19:42:46 -0800 MIME-Version: 1.0 Subject: Re: bug#67540: 29.1; Emacs on Windows incorrectly capitalizes some environment variables To: Dave Abrahams , 67540@debbugs.gnu.org References: <4447B955-7BC6-4641-B65D-F674D796B86E@boostpro.com> Content-Language: en-US From: Jim Porter In-Reply-To: <4447B955-7BC6-4641-B65D-F674D796B86E@boostpro.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67540 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 11/29/2023 6:29 PM, Dave Abrahams wrote: > 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). This sounds like there's a bug in the Swift compiler. Environment variables on MS-Windows are case-insensitive: . That documentation just covers 'getenv' (and 'wgetenv'), but I'm reasonably certain the same applies to the Win32 APIs as well. It might be nice for Emacs to preserve the case of any existing environment variables on MS-Windows to be on the safe side though... From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 30 02:11:09 2023 Received: (at 67540) by debbugs.gnu.org; 30 Nov 2023 07:11:09 +0000 Received: from localhost ([127.0.0.1]:52095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8bCX-0000ah-4B for submit@debbugs.gnu.org; Thu, 30 Nov 2023 02:11:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8bCU-0000a2-2Z; Thu, 30 Nov 2023 02:11:07 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8bCG-0000P3-0h; Thu, 30 Nov 2023 02:10:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=/YaZFL+mYilW+OQCtUJb7gw5BucbHew28t4QS/Z+aPo=; b=li0TlY3JYQLQ QKm/VE40jff9AhXK+TtnySLwUMTkksFWQjGcV4TyU+1HofvcrdCPCaqgok479K3p7XbZcFoLP/jZY QG8Qum+hgzdqjnRGoE8xMYhPrI4yuPUPq+4dT7+AxoXw62OIzkc5Nruv+L/k28ZmuCP7KkzKWqox0 gLrfDFGFk66iYsgKclyFTePPilLZFn3iADg5TpdqwCpqun4XroTl2H2zMYs1AjWc4tJYOS8XlWFFq 6hLng14yOPUsu1os4W5O4lFqJ0dfo2gqjf+L+oQX5IVU462Zq0vS8YKuvwVNaZ2Zszk4tavTTsbZ2 FZsGk4KgmPdDNfwu9fdGig==; Date: Thu, 30 Nov 2023 09:10:43 +0200 Message-Id: <83fs0n67ik.fsf@gnu.org> From: Eli Zaretskii To: Dave Abrahams In-Reply-To: <4447B955-7BC6-4641-B65D-F674D796B86E@boostpro.com> (message from Dave Abrahams on Wed, 29 Nov 2023 18:29:26 -0800) Subject: Re: bug#67540: 29.1; Emacs on Windows incorrectly capitalizes some environment variables References: <4447B955-7BC6-4641-B65D-F674D796B86E@boostpro.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67540 Cc: 67540@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 67540 wontfix thanks > From: Dave Abrahams > 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 30 02:22:43 2023 Received: (at 67540) by debbugs.gnu.org; 30 Nov 2023 07:22:43 +0000 Received: from localhost ([127.0.0.1]:52109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8bNj-0003Xg-72 for submit@debbugs.gnu.org; Thu, 30 Nov 2023 02:22:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8bNg-0003XP-Q9 for 67540@debbugs.gnu.org; Thu, 30 Nov 2023 02:22:41 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8bNT-0002Py-0X; Thu, 30 Nov 2023 02:22:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=0CxpCnpbP4YrsHNqzjugNkfGwvWzHowgq/EEYjNKS5E=; b=Sv3mp2DIK87l KmTFld1uwWjCXpeUoO+nNZj+cTvLnhNJmX1Hqpt31kXOf5zN7pp+RdQTpf2yAw/xm011D5unPd9Yk Bm3KFjt/ZEIvEfLjF7+AFuVSsjbYblVtgQTmq2mCJwWUnIhSC+Fid62q1N7Ujkqs6IA2m1USPZeLZ PUb+7EVt4pSO0ERbKe+JJVKsTqDDEWKMZ0e1ha4ekAL/dpfzqFc8OVZ1au0S8iEsMb6EoQLuWsqzE N16GqRuM88kpw3XG8gN0sljbI6MnW8s8Ogu0abTVt0RtgOlgCvVZpzfOrtsBumFRsZQTm6uV6zPhY 97+/HDSWNlTOqABaICBPsA==; Date: Thu, 30 Nov 2023 09:22:18 +0200 Message-Id: <83cyvr66z9.fsf@gnu.org> From: Eli Zaretskii To: Jim Porter In-Reply-To: <2bbe9442-489d-f35e-8379-37326278798a@gmail.com> (message from Jim Porter on Wed, 29 Nov 2023 19:42:46 -0800) Subject: Re: bug#67540: 29.1; Emacs on Windows incorrectly capitalizes some environment variables References: <4447B955-7BC6-4641-B65D-F674D796B86E@boostpro.com> <2bbe9442-489d-f35e-8379-37326278798a@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67540 Cc: dave@boostpro.com, 67540@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 29 Nov 2023 19:42:46 -0800 > From: Jim Porter > > On 11/29/2023 6:29 PM, Dave Abrahams wrote: > > 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). > > This sounds like there's a bug in the Swift compiler. Environment > variables on MS-Windows are case-insensitive: > . > That documentation just covers 'getenv' (and 'wgetenv'), but I'm > reasonably certain the same applies to the Win32 APIs as well. Right. > It might be nice for Emacs to preserve the case of any existing > environment variables on MS-Windows to be on the safe side though... That's impossible in practice: we'd need to "fix" every single Lisp program and every place in the Emacs C code that compare against "PATH" case-sensitively. And what about user confusion, for those of us who mostly work on Unix, but sometimes need to work on Windows? We decided long ago to make these letter-case changes in the Windows build of Emacs, and the decision held well since then. I see no reason to change that decision now, just because some program misbehaves on Windows. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 30 19:13:32 2023 Received: (at 67540) by debbugs.gnu.org; 1 Dec 2023 00:13:32 +0000 Received: from localhost ([127.0.0.1]:54742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8r9v-0007eK-MX for submit@debbugs.gnu.org; Thu, 30 Nov 2023 19:13:32 -0500 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:44428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8r9t-0007e7-Mn for 67540@debbugs.gnu.org; Thu, 30 Nov 2023 19:13:30 -0500 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6cbe5b6ec62so1519495b3a.1 for <67540@debbugs.gnu.org>; Thu, 30 Nov 2023 16:13:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boostpro-com.20230601.gappssmtp.com; s=20230601; t=1701389595; x=1701994395; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=3oexN8EWsUv8vKmyin1BypE8sn3NwlQnhzoG17I7nHo=; b=qVBpy4QixdxdhuUhuA7i6iZptycOUnnJM1cKQdK6kS0MpZh4gY1sHQnR891WiF44w8 lj2UIpNlhwIvWdehOOH86LE3zb0iiYeYucoOl/bcHnDG82uq+xF/I3XZXJUFWxWqBV7+ LrZQQmBoy2E1g7/nh9vOu+s2MqdLLWyOWtS7tycxLeSe9opiGh+Xzi7RdLSLP6RF+4Xz wNJCcN/P5m+XmEx1un719VayWhtZreun1Vg/PjMmN1kSDYhGUJoP5olfgXm0/0gZj3Ew cx/XDI9ZdZ05GOOhN1R62XdFk+Wz+MVq4tqqUwhPzfoJf90DDSZfZwlPc7iSN1JRO1E0 cV6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701389595; x=1701994395; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3oexN8EWsUv8vKmyin1BypE8sn3NwlQnhzoG17I7nHo=; b=dbqtOknG4j078KOrvnDl7dx2R91DICfsjCdIgU2KMopyhCGGjclXaRVbbdNaRF94qj cp0ESB3q1DNGarazigkQVjDq3G76Jj/AxdbnalaW8okR/MWbH0n6TUebKojsAEcRykjc zIwgdFNTY4lrZ+j6GFPAs+MJYcFjJqh0T+1hj0sKHndTro6KzxctCi8byn3czb+szrgh 66PV9sa8jKNCgwZk0TCJBqS7WvZOdHo4He4n2LhYff3NZUlrVkt5MFZndYHuOV1eGtIA d3hV30rp6x4JYHDervXEdyvivXOrkyjoczjnkK+YD7IYlMRc/81PSNF7Np9TwzUQ+sPq UQDQ== X-Gm-Message-State: AOJu0YzkiHBOnyqDORapLAyGVkj5tS0FCXuFvh6BbSdtO6DGMTQ6nWSw zUojFTgfm+FvY8puMprUUCRNJQ== X-Google-Smtp-Source: AGHT+IEbHVMyKR2n/0JoDm6dPdt3OstJx/EFf0XjO4xVbtbzICj7LSzZ9Ev1+TcFBK9UtnnfrDKrWA== X-Received: by 2002:a05:6a00:2e94:b0:6cb:ce35:2b1d with SMTP id fd20-20020a056a002e9400b006cbce352b1dmr26281038pfb.16.1701389595391; Thu, 30 Nov 2023 16:13:15 -0800 (PST) Received: from smtpclient.apple (69-209-31-205.lightspeed.sntcca.sbcglobal.net. [69.209.31.205]) by smtp.gmail.com with ESMTPSA id o24-20020a056a001b5800b006905f6bfc37sm1797738pfv.31.2023.11.30.16.13.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Nov 2023 16:13:14 -0800 (PST) From: Dave Abrahams Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_540AD244-DEDC-49AE-AF6E-95238AD9C6F9" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: bug#67540: 29.1; Emacs on Windows incorrectly capitalizes some environment variables Date: Thu, 30 Nov 2023 16:13:03 -0800 In-Reply-To: <83cyvr66z9.fsf@gnu.org> To: Eli Zaretskii References: <4447B955-7BC6-4641-B65D-F674D796B86E@boostpro.com> <2bbe9442-489d-f35e-8379-37326278798a@gmail.com> <83cyvr66z9.fsf@gnu.org> X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67540 Cc: Jim Porter , 67540@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Apple-Mail=_540AD244-DEDC-49AE-AF6E-95238AD9C6F9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Nov 29, 2023, at 11:22=E2=80=AFPM, Eli Zaretskii = wrote: >=20 >> Date: Wed, 29 Nov 2023 19:42:46 -0800 >> From: Jim Porter >>=20 >> On 11/29/2023 6:29 PM, Dave Abrahams wrote: >>> 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). >>=20 >> This sounds like there's a bug in the Swift compiler. Environment=20 >> variables on MS-Windows are case-insensitive:=20 >> = .=20 >> That documentation just covers 'getenv' (and 'wgetenv'), but I'm=20 >> reasonably certain the same applies to the Win32 APIs as well. >=20 > Right. >=20 >> It might be nice for Emacs to preserve the case of any existing=20 >> environment variables on MS-Windows to be on the safe side though... >=20 > That's impossible in practice: we'd need to "fix" every single Lisp > program and every place in the Emacs C code that compare against > "PATH" case-sensitively. And what about user confusion, for those of > us who mostly work on Unix, but sometimes need to work on Windows? I don't think this is that hard to fix without breaking anybody. Simply = maintain a mapping of in-Emacs upcased environment variable names to the = lowercased counterparts from which they came, and map back when setting = up a process environment. > We decided long ago to make these letter-case changes in the Windows > build of Emacs, and the decision held well since then. I see no > reason to change that decision now, just because some program > misbehaves on Windows. =E2=80=9CMy=E2=80=9D Windows expert told me that =E2=80=9CPath is the = correct spelling,=E2=80=9D or I wouldn't have reported this as a bug. = Still, I think you could make the workaround described above, if you = wanted to accomodate my "misbehaving" tools. --Apple-Mail=_540AD244-DEDC-49AE-AF6E-95238AD9C6F9 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Nov 29, 2023, at 11:22=E2=80=AFPM, Eli Zaretskii = <eliz@gnu.org> wrote:

Date: Wed, 29 = Nov 2023 19:42:46 -0800
From: Jim Porter = <jporterbugs@gmail.com>

On 11/29/2023 6:29 PM, Dave = Abrahams wrote:
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).

This sounds like there's a bug = in the Swift compiler. Environment 
variables on MS-Windows = are case-insensitive: 
<https://learn.microso= ft.com/en-us/cpp/c-runtime-library/reference/getenv-wgetenv?view=3Dmsvc-17= 0>. 
That = documentation just covers 'getenv' (and 'wgetenv'), but I'm 
reasonably certain the = same applies to the Win32 APIs as well.

Right.

It might be nice = for Emacs to preserve the case of any existing 
environment variables = on MS-Windows to be on the safe side though...

That's = impossible in practice: we'd need to "fix" every single Lisp
program = and every place in the Emacs C code that compare against
"PATH" = case-sensitively.  And what about user confusion, for those = of
us who = mostly work on Unix, but sometimes need to work on Windows?

I don't think this is that hard = to fix without breaking anybody.  Simply maintain a mapping of = in-Emacs upcased environment variable names to the lowercased = counterparts from which they came, and map back when setting up a = process environment.

We decided long ago to = make these letter-case changes in the Windows
build = of Emacs, and the decision held well since then.  I see = no
reason = to change that decision now, just because some program
misbehaves on = Windows.

=E2=80=9CMy=E2=80=9D = Windows expert told me that =E2=80=9CPath is the correct spelling,=E2=80=9D= or I wouldn't have reported this as a bug.  Still, I think you = could make the workaround described above, if you wanted to accomodate = my "misbehaving" tools.

= --Apple-Mail=_540AD244-DEDC-49AE-AF6E-95238AD9C6F9-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 01 02:14:32 2023 Received: (at 67540) by debbugs.gnu.org; 1 Dec 2023 07:14:32 +0000 Received: from localhost ([127.0.0.1]:55004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8xjL-0002Cn-QW for submit@debbugs.gnu.org; Fri, 01 Dec 2023 02:14:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8xjK-0002CW-3G for 67540@debbugs.gnu.org; Fri, 01 Dec 2023 02:14:30 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8xj5-0002Te-Vs; Fri, 01 Dec 2023 02:14:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=TqUMfp6st38a2LdxPHT8YCr9G9eQMWEHbIpM+QjbqDI=; b=PHedXygAumjz aVi1SQT8ZPKnwYqlIYsiXY+dt+pruORAeTtY0WOwFKxKYyhD36OekpRECLkDb1oDqgD3Dt+lFODvE /JP7uiFHCAxYWiW1nhiaTQC38AbrGjeyoQytJns/9OChVrYPsElDmpCvDxssxoddUWM+wVBuGzcWi SZeJ0vhTX2q+HFAFiy5Llt/YWsv0ZwBKpsq4gWgh69cky+b9pN5daKu7xA9JpW6DuYyFPTufGemsD dMR0AOkYULDaqi2xc1EpWjdPMGcOd8RmsBzKtURt2cyyND5a2Zru4QPqSOGAYybcBoQNSWmHyU5aC UzbpW0meyCu5p5/n6CmYaA==; Date: Fri, 01 Dec 2023 09:14:09 +0200 Message-Id: <835y1ibdj2.fsf@gnu.org> From: Eli Zaretskii To: Dave Abrahams In-Reply-To: (message from Dave Abrahams on Thu, 30 Nov 2023 16:13:03 -0800) Subject: Re: bug#67540: 29.1; Emacs on Windows incorrectly capitalizes some environment variables References: <4447B955-7BC6-4641-B65D-F674D796B86E@boostpro.com> <2bbe9442-489d-f35e-8379-37326278798a@gmail.com> <83cyvr66z9.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67540 Cc: jporterbugs@gmail.com, 67540@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Dave Abrahams > Date: Thu, 30 Nov 2023 16:13:03 -0800 > Cc: Jim Porter , > 67540@debbugs.gnu.org > > It might be nice for Emacs to preserve the case of any existing > environment variables on MS-Windows to be on the safe side though... > > That's impossible in practice: we'd need to "fix" every single Lisp > program and every place in the Emacs C code that compare against > "PATH" case-sensitively. And what about user confusion, for those of > us who mostly work on Unix, but sometimes need to work on Windows? > > I don't think this is that hard to fix without breaking anybody. Simply maintain a mapping of in-Emacs > upcased environment variable names to the lowercased counterparts from which they came, and > map back when setting up a process environment. This will not work reliably, because many programs invoked by Emacs as sub-processes are ported Unix and GNU/Linux programs, and those expect PATH, not Path in the environment. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 01 15:35:12 2023 Received: (at 67540) by debbugs.gnu.org; 1 Dec 2023 20:35:13 +0000 Received: from localhost ([127.0.0.1]:56180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9AEC-0000wI-Js for submit@debbugs.gnu.org; Fri, 01 Dec 2023 15:35:12 -0500 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:46371) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9AE8-0000vx-VJ for 67540@debbugs.gnu.org; Fri, 01 Dec 2023 15:35:11 -0500 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1cf7a8ab047so8524485ad.1 for <67540@debbugs.gnu.org>; Fri, 01 Dec 2023 12:34:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boostpro-com.20230601.gappssmtp.com; s=20230601; t=1701462894; x=1702067694; darn=debbugs.gnu.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:content-transfer-encoding:from:to:cc:subject:date :message-id:reply-to; bh=/RM4w/dnl+7M6oXG2+Olj27hB2TzpI7iTz3plZmp6GQ=; b=EZu+zvfUAZxLP0RRxH8oT+XBx3fRmLpa5jQ/5Lt9S4I2MfmSXIYERVqkvK76UfwG2v HrDvjhH7vjh+Z+J7f3NfQvYsWy7s8xq0T+rnzvG8SDTNzit1XrVthW55dL2HZV/7TzD5 TCuim73VO1agJn9kV3EhRz2ySpRfBC4XGncrpjhNzTVKMGKbpwyUgUifGuQ3XHcww3DY Yhw+Vy0IEShOmmU9O9H4L0NIP+3kH7LStzMgus9p6pct+zLw3N6REJuNjuAlIiLrytP0 eSZXt+nUdMvbb+jqnWRXYGPfPxJ3Od4cfaUXTND/DhPzSxhP/EotMNgmZRkbbUbF+dD7 OQfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701462894; x=1702067694; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:content-transfer-encoding:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=/RM4w/dnl+7M6oXG2+Olj27hB2TzpI7iTz3plZmp6GQ=; b=pAvHSv0tTsaO95ENqtIw2e9ZZd7c0Jh5BPo5wG4/5kyvoYknABk4BldFSwnZnRHd2I 1thI8SBul+N/rNdiogzeRaMtPEfa1h1C7Cl6kcpf94jdT9CVfgfYUBVKL0wB6fTb7vnS GoteD2VkFRBGWuI56A9U5EZP7Za7QkbPTvllrWvyjUrR+VKDCZcHplsp3uDAC3J10xWU RQKBMZhc/0ZnoX92RmylGeY67Rz3H+XZNTKgAzkrlEp8/u+XyxVnWObY+sxZ/QbGSjaH AT+833r0PtiWgOZCMp7Fm1dOiPtmJz96PUg8REiVK9UP5Fhc4l+xFtbRknWE2Frbpep4 N9Vw== X-Gm-Message-State: AOJu0Ywexnl/FywL7fWakDUU+0FLKngrEafpH+bYe95i/hA6nN1La8XB Abn42KygZimEFhvaOuT2YE/f6Q== X-Google-Smtp-Source: AGHT+IHQspj0yAFBmujzpFNcNIHVWKItDR/b2SXrPDxxaVORUg0a+/5qqgiHThT9MrLri2LAIOaFCQ== X-Received: by 2002:a17:902:ed06:b0:1d0:5357:ee27 with SMTP id b6-20020a170902ed0600b001d05357ee27mr96237pld.43.1701462893951; Fri, 01 Dec 2023 12:34:53 -0800 (PST) Received: from smtpclient.apple ([2600:380:456e:89d3:dd6b:3a5d:8465:e5d3]) by smtp.gmail.com with ESMTPSA id j18-20020a170902c3d200b001bf8779e051sm2962plj.289.2023.12.01.12.34.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Dec 2023 12:34:52 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Subject: Re: bug#67540: 29.1; Emacs on Windows incorrectly capitalizes some environment variables From: Dave Abrahams In-Reply-To: <835y1ibdj2.fsf@gnu.org> Date: Fri, 1 Dec 2023 12:34:40 -0800 Message-Id: References: <835y1ibdj2.fsf@gnu.org> To: Eli Zaretskii X-Mailer: iPhone Mail (21B91) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67540 Cc: jporterbugs@gmail.com, 67540@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) You=E2=80=99re saying that these are ported UNIX programs that are only desi= gned to work from inside of Emma, which has changed the spelling of the envi= ronment variable names? Sent from my iPhone > On Nov 30, 2023, at 11:14=E2=80=AFPM, Eli Zaretskii wrote: >=20 > =EF=BB=BF >>=20 >> From: Dave Abrahams >> Date: Thu, 30 Nov 2023 16:13:03 -0800 >> Cc: Jim Porter , >> 67540@debbugs.gnu.org >>=20 >> It might be nice for Emacs to preserve the case of any existing >> environment variables on MS-Windows to be on the safe side though... >>=20 >> That's impossible in practice: we'd need to "fix" every single Lisp >> program and every place in the Emacs C code that compare against >> "PATH" case-sensitively. And what about user confusion, for those of >> us who mostly work on Unix, but sometimes need to work on Windows? >>=20 >> I don't think this is that hard to fix without breaking anybody. Simply m= aintain a mapping of in-Emacs >> upcased environment variable names to the lowercased counterparts from wh= ich they came, and >> map back when setting up a process environment. >=20 > This will not work reliably, because many programs invoked by Emacs as > sub-processes are ported Unix and GNU/Linux programs, and those expect > PATH, not Path in the environment. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 02 02:05:09 2023 Received: (at 67540) by debbugs.gnu.org; 2 Dec 2023 07:05:09 +0000 Received: from localhost ([127.0.0.1]:56561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9K3o-0006XR-Ma for submit@debbugs.gnu.org; Sat, 02 Dec 2023 02:05:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9K3k-0006Wo-47 for 67540@debbugs.gnu.org; Sat, 02 Dec 2023 02:05:07 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r9K3V-0003Vt-AQ; Sat, 02 Dec 2023 02:04:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=7FeuhHIiK7DOIR+jb3fkGWguax4Lxl0a0UjVfMnPbq8=; b=O+6SRKGeh4jcNvZQ8RfW cb/dv7MLTCID02TprwnenxYpgW978j98lLlhS2CCs+pe/RmuuosQisHxCDhWRbRUk2TlIKaDQ7tdJ UXCy7Ud0ICxSifsLfaZqOE8LTZKEULciy38qYmQRHeKPfL9DksNjJPRct6eUNQBUj3rUfQ0ZJ9i7a rI2OiMKUS15rwClgEK94kcOmvjPRAhH+wNIQ3jySQQxNJgystkffTk4ivrw7hPe1jJwbc8w1SS1bl s9m5r79/8vdQLVjWd3wqn9crk2aJQIjLP2xAmOKZ2FZYhWaGYoDodTqOKrkiGbZW+kEcakgMlbA/n 5XY9rGxH3pgvZQ==; Date: Sat, 02 Dec 2023 09:04:46 +0200 Message-Id: <83zfyt84q9.fsf@gnu.org> From: Eli Zaretskii To: Dave Abrahams In-Reply-To: (message from Dave Abrahams on Fri, 1 Dec 2023 12:34:40 -0800) Subject: Re: bug#67540: 29.1; Emacs on Windows incorrectly capitalizes some environment variables References: <835y1ibdj2.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67540 Cc: jporterbugs@gmail.com, 67540@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Dave Abrahams > Date: Fri, 1 Dec 2023 12:34:40 -0800 > Cc: jporterbugs@gmail.com, 67540@debbugs.gnu.org > > 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? 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? From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 02 11:23:17 2023 Received: (at 67540) by debbugs.gnu.org; 2 Dec 2023 16:23:17 +0000 Received: from localhost ([127.0.0.1]:58523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9Slw-0006Ng-Tp for submit@debbugs.gnu.org; Sat, 02 Dec 2023 11:23:17 -0500 Received: from mail-yw1-x1130.google.com ([2607:f8b0:4864:20::1130]:45539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r9Slv-0006NF-1h for 67540@debbugs.gnu.org; Sat, 02 Dec 2023 11:23:15 -0500 Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-5d7692542beso3416347b3.3 for <67540@debbugs.gnu.org>; Sat, 02 Dec 2023 08:23:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boostpro-com.20230601.gappssmtp.com; s=20230601; t=1701534180; x=1702138980; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TwW1c+PlLgdquxRoqRjtWCmcwQV4anKV0sG/MN3DKmo=; b=MfYzljJppHyRv81gn4t7Uld0Ay2fHjjn0TZ5PFsX9kP1PI5++Ogl1LP3mf/wsiUgPp ClFlT3d1AgDeyop0NVwcLiCxahWpUlZ4H8iofTPzjvevG7GoFBrzpr0iorQky6bFZR8s 7KBNZ0EWTlHaB6C5OsFAqGOdmbSm2l5J16elIll4sO5WG3jxkRPBAqSezoOHltTZB6CC 4uxPbTQynfSw3m94mhbewMSBbyPBIxbePdq/6afwMVWUVauvjGdqIZWvLeBRFnUhIN+J yMpAXhAYlOF9LHQo4mlkaQerf2H89+4UyzOQyZjDW2P6U4drR59iMBBrwFQ7VxTL/09L /kqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701534180; x=1702138980; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TwW1c+PlLgdquxRoqRjtWCmcwQV4anKV0sG/MN3DKmo=; b=ooC7VPd2oRc0egVOpQkIJg63jNfjauOaKRbBqyLnsGV+GFbIjUl8kugrIW6EM+18vR HXJurVCA7VWR+h7U+HiqQokkQktLr3R+tAgGZGA5xpudStaZbjA4usEJC7piYqivotHo wpT94TTrcGRljkD9Voun58zyF0s+Ns3BvfflMuDMJSiqYVZ619dAhJvrEeRqy/um3bXl xBkGF0+nKxsVe5u8GR3kvpKxHiExi9wrKEX24jpvv5A12oj9glB2VZpUTaIGi6U/llFt y7HSnJ/ExRtOA6NBYb9v8WCl49IIJKxXnas2cbFGox83U+WRyiWnJreiqTQpPxXASibn 6inw== X-Gm-Message-State: AOJu0YzumQ4RnwwtdQacVdSdqYFRLJCYuZPBRPr+mhus8ys+S5/PsmL1 h1c/ser9tZ8VPW1Wh0O+gac6cg== X-Google-Smtp-Source: AGHT+IEK8BOI1QNI0HsNTJAbIxopw242PT1LRlwq3CU/yUBJK6MFk6MuQvmrBWSThQNIdyJbAhGRuQ== X-Received: by 2002:a81:b702:0:b0:5d4:7f5:cdaa with SMTP id v2-20020a81b702000000b005d407f5cdaamr4556493ywh.33.1701534179509; Sat, 02 Dec 2023 08:22:59 -0800 (PST) Received: from smtpclient.apple (69-209-31-205.lightspeed.sntcca.sbcglobal.net. [69.209.31.205]) by smtp.gmail.com with ESMTPSA id o139-20020a0dcc91000000b005d37b4b7cb6sm1756774ywd.77.2023.12.02.08.22.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Dec 2023 08:22:58 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: bug#67540: 29.1; Emacs on Windows incorrectly capitalizes some environment variables From: Dave Abrahams In-Reply-To: <83zfyt84q9.fsf@gnu.org> Date: Sat, 2 Dec 2023 08:22:47 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <6DEE5DFD-AFC8-460A-815C-9D84829A257E@boostpro.com> References: <835y1ibdj2.fsf@gnu.org> <83zfyt84q9.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67540 Cc: Jim Porter , 67540@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Dec 1, 2023, at 11:04=E2=80=AFPM, Eli Zaretskii = wrote: >=20 >> From: Dave Abrahams >> Date: Fri, 1 Dec 2023 12:34:40 -0800 >> Cc: jporterbugs@gmail.com, 67540@debbugs.gnu.org >>=20 >> You=E2=80=99re 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? >=20 > 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. =20 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.= From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 04 05:15:37 2025 Received: (at 67540-done) by debbugs.gnu.org; 4 Mar 2025 10:15:37 +0000 Received: from localhost ([127.0.0.1]:55508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tpPJJ-0005C0-50 for submit@debbugs.gnu.org; Tue, 04 Mar 2025 05:15:37 -0500 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:46508) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tpPJG-0004rV-4o for 67540-done@debbugs.gnu.org; Tue, 04 Mar 2025 05:15:35 -0500 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5e538388dd1so2962225a12.1 for <67540-done@debbugs.gnu.org>; Tue, 04 Mar 2025 02:15:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741083328; x=1741688128; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=JXyQn970281GWqGl1VeotNmiKHdYo6mGqAPvnVgIe2Y=; b=Vr44VQgIhefTKWTZeoU4KRfhRHQM99N6vM9ExxT4PmYfbVCd12GmgihnuLgkwVVK0r 0VD6qOJF90GtLjlToYSScuk8E87ZJdBhDNDk9daz//YzA/UeNNFmyCxU+sIO21h/BwEP g0Yzzw6LhYBi6nW7tPyL3Ix/RYLYNxSgpUQqEa8YVaY+KM85w/7xujRsoYss4Y6EnMB3 iYGBrLRV4Uc1ZCTb+FGbD6H3Z69XzTspXQCCFFsAr4IYDU1rgVFWsNLdteW0k8Bvw1V+ SBhHNdkyNMcwkq4rEirtZMHcelevxUk8BxjxZ/4PvDDyDGhcAq8I45au7mW9mPPrAEB5 Y4Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741083328; x=1741688128; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=JXyQn970281GWqGl1VeotNmiKHdYo6mGqAPvnVgIe2Y=; b=YsjLMnxBmMgLCx3/G51qSJbzTqHbzEA1PjWFnSQj/k19x4+oBLYzEcujS9qc3/kuB9 3YiYyZJ1RvcYRIcQBgedCu0lk22QtB6WSs5xbaKzP/UXXUTT3LU5aGycTI66Mla5Hv7p sECjm6hwP0xNAB8k9fvpcwbDBQ1AtVcSlAm2kQ5xk3YtGzCDx9GVrBvTqnRv4F5gYE7U gsqirBS7GMxh4syT+DjnGnNv4l1Nl96RKn0x79TlCnCpT6T4VcMQWacyyGiBjPMWw1/A iOGnLwJ6p9vt7qffWRylAA29qzmtYSpt7BghiatkKGRrOH8Twv3sI5BYvTUzCCymFMPv oUFA== X-Forwarded-Encrypted: i=1; AJvYcCUrk1cdVE7OEAtbhCr9EwnEPOhtCJy1Pts9OihQJWu+pfXxjSycruHfJF9imls/ljelarJxIn4DneRG@debbugs.gnu.org X-Gm-Message-State: AOJu0YwvBVc1N66tIIHUoIL/ATznzpdzSKlWfb5xDUaERDBoUSdLF93M cpQcs+A4dvgYA9IZbObkhHy7or56rELK2oBduVHRLpcq8VT5MyndyDn40BArLDOjpUsolPB0wNE M3by+ihE5HAA8u60gS8Yqxv+G8Bo= X-Gm-Gg: ASbGncuRtT9VSIAz5PxsY4tL6KQ7gn1Q7Q4dU5z+qaZTA+PCiMAfnVNO17NnOEaBPE1 bBe/5lNKPlxcAHXs7n7EQFY2Q/i9ieafOfKP/AVnAIzNNFe13y1p83wKGemq0ETpM7njuvZilLa wQDswI5NF7A3XJgOw5j56mp+TYpQ8= X-Google-Smtp-Source: AGHT+IF6EmxBdAHEMufDFpKPCDBThwpbNjz5I2ET7Lq8Umm7T7W9qgenIcuEz5pU07JSPTJiuToWYtWQSXO0BB5NJlc= X-Received: by 2002:a05:6402:d0b:b0:5e4:c532:d693 with SMTP id 4fb4d7f45d1cf-5e4d6b8535fmr15628037a12.31.1741083327696; Tue, 04 Mar 2025 02:15:27 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 4 Mar 2025 02:15:26 -0800 From: Stefan Kangas In-Reply-To: <83zfyt84q9.fsf@gnu.org> References: <835y1ibdj2.fsf@gnu.org> <83zfyt84q9.fsf@gnu.org> MIME-Version: 1.0 Date: Tue, 4 Mar 2025 02:15:26 -0800 X-Gm-Features: AQ5f1JqibFpotAeWmaTMRz07Bfrp79sXxcr6IROWztOMUdZbX9Al71vHOheAFig Message-ID: Subject: Re: bug#67540: 29.1; Emacs on Windows incorrectly capitalizes some environment variables To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 67540-done Cc: Dave Abrahams , jporterbugs@gmail.com, 67540-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Dave Abrahams >> Date: Fri, 1 Dec 2023 12:34:40 -0800 >> Cc: jporterbugs@gmail.com, 67540@debbugs.gnu.org >> >> You=E2=80=99re saying that these are ported UNIX programs that are only = designed to >> work from inside of Emma, which has changed the spelling of the environm= ent >> 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? > > 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? This is tagged wontfix, and I think the reasoning for that presented here makes sense. I'm therefore closing this bug report now. From unknown Tue Jun 17 01:48:24 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 01 Apr 2025 11:24:59 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator