From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#74550: eshell cannot set the environment variable PATH on Windows Date: Tue, 26 Nov 2024 13:14:42 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2287"; mail-complaints-to="usenet@ciao.gmane.io" To: Siyuan Chen , 74550@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 26 22:16:26 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tG2v4-0000TJ-4A for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 Nov 2024 22:16:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tG2ui-0001EX-4B; Tue, 26 Nov 2024 16:16:04 -0500 Original-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 1tG2ug-0001EN-Q7 for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2024 16:16:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tG2ug-00016C-HQ for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2024 16:16:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=74lf+lT2Xw4QoBS10Y7IP1kDRFEvXVEAIkul8hQ74A4=; b=owduH3T0yk2hc3LLAijj4hXiTQu5ClVZEuc96vzubBX9sSWkhL8DBe2c51msgg4+iwHHNcH5rIdAly13sxDGZPUAg+1wAgnX9PgUWqMLhSNeQQBHizrNhz3XT14Hy3ZK09WQ+TxPPcijoJ5zArF/DPTdjstzlkuTzjPOWP4TgawyYWTET94oW5/CpoOmY8fn2S8Xoihfq0bUap6QlgYa6nSZnB4lWy+WRhX++C+zls11kOpEblvTj1YyuGkZHreKQujeI0H50ICVmcT0+k0+j2HbNTKEkEggSryy/GZdj1D5STqGiZZ/zQVN2j+zI1YQ7Tl12XlVRu810mUSQWsy4g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tG2ug-0000p9-Ci for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2024 16:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Nov 2024 21:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74550 X-GNU-PR-Package: emacs Original-Received: via spool by 74550-submit@debbugs.gnu.org id=B74550.17326557533146 (code B ref 74550); Tue, 26 Nov 2024 21:16:02 +0000 Original-Received: (at 74550) by debbugs.gnu.org; 26 Nov 2024 21:15:53 +0000 Original-Received: from localhost ([127.0.0.1]:53347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tG2uW-0000of-Oj for submit@debbugs.gnu.org; Tue, 26 Nov 2024 16:15:53 -0500 Original-Received: from mail-pf1-f175.google.com ([209.85.210.175]:51482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tG2uT-0000oJ-Tk for 74550@debbugs.gnu.org; Tue, 26 Nov 2024 16:15:50 -0500 Original-Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-724d57a9f7cso5007025b3a.3 for <74550@debbugs.gnu.org>; Tue, 26 Nov 2024 13:15:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732655684; x=1733260484; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=74lf+lT2Xw4QoBS10Y7IP1kDRFEvXVEAIkul8hQ74A4=; b=BpKPHQndC/uJGtyHDjsFJn4zYzPbAGImfEoiKDjq4Yhabz1XGkp+dhd4eY/HRTgC9G PUYkqU9IxssMMKZq5HX47Aae8ExQ+a5yPHNMilAk/qD9DaDOVApcQsoWeaj+isNQKGD4 cBmRiwCvxvcELIKYvzvueGa1JvUUcuV092PGvxF6r98Bn6eY2lmHMW/rgMTh7twsFfUm iPAjDlgAm49kQWVOZUm/9ch7p0oYW4CQFRMJVrUm9HUddqNVowVoeblR4leMz1uyRy0B YsPbmwisJo4pRvlhKrk6OsyeNQ9nUc3tcI72NQuVkJMW6D3I9z18uwTebv3AHf4QT1Xb WKuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732655684; x=1733260484; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=74lf+lT2Xw4QoBS10Y7IP1kDRFEvXVEAIkul8hQ74A4=; b=Jn+Qwf5WxZ2KhTU1mwO4a2SbyvwoCU9V8pJ2vZ6JXwIH6XPJtzRGMvKWfijLvyxDU2 XZuIvqsqUJCOPbsQK8cJ4KNrHC60ObiAbK3jDFmMz2qFdO5XLzvJIFS3peNeMeVZ/FdB AF9SRwqhyq8glj7dLgNJlc1+Ag//IWBmf3X6ZpBmnVFLayE7jWFZEfVsBdNawrW3oNVw lzPGfW5AfFdfc4cgxb+uDWjKF6C2MycTOCXe59KbRBgIEbqfybpFV5KQF3txmZge5q7D vspfqCK9feB3v+8+m7/cjEJqpp42GZDMMMVLJQu1Avhq40sU5LN4WL5EwZzJyRvBNbjo +mKg== X-Forwarded-Encrypted: i=1; AJvYcCWArwfKLKFyLo3h4YBASu0lrZwt/h5t4q1Q1/piGr0yfO+1sC3t4XFmY0O3JCIHA0pWe1jRiw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzS+aLG2+Og1n9XJPbCWbKlgfSCK9f6EaWnLCHym7JCV5llaSxg 86NDmfYVwcUoEMCPJ5dU8Iv4RoG9IK+hAd5eBK9OtWfWUmzQaamW X-Gm-Gg: ASbGncvYBNcrrDWtHZJSZoYb0/JhLyD4S+YYBbK0pNC0fDfzFqUQIjA31UEdhvOk83q XuItPgnoPLlDmxvEsTbdWK6aQUvaHH3jD4jGSqBdW9hACqPQszCz/yxN4qRJvlFckJcn+YzTnpA UeMFiSazqtf9EugFRGrwPmJpCmr2OrFuuYCFYJ/142MwEVlIME/E7SWVLHwRMBBWVmC8dENFRln gThlOXQcKUckOhcb1o4wH2REhatZja2f2Nubat//v3vLBm2+SZQiXQI+vyni5pfFRGh+l8bolJp pXAk+T3K8eqZ56KvegMD0tB000g= X-Google-Smtp-Source: AGHT+IGs5g7Y5lNmXBbR/5OsdsZBII60RjxSe28i9L9bM6sVpAlZgzeOPrlRvLsY64FcJyeXInglcQ== X-Received: by 2002:a17:90b:4b51:b0:2ea:88d4:a0cb with SMTP id 98e67ed59e1d1-2ee08eb2f50mr1022988a91.16.1732655683855; Tue, 26 Nov 2024 13:14:43 -0800 (PST) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id 98e67ed59e1d1-2eb14397a6fsm9086753a91.51.2024.11.26.13.14.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Nov 2024 13:14:43 -0800 (PST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296000 Archived-At: On 11/26/2024 12:38 PM, Siyuan Chen wrote: > Reproduce steps: > > 1. Emacs -Q > > 2. M-x eval-expression `(setenv "PATH" (concat "C:/env" path-separator > (getenv "PATH")))` > > 3. M-x eshell > > 4. In the *eshell* window, type `echo $PATH`, but the path "C:/env" > doesn't show in the result. Thanks for the bug report. This is an intentionally-incompatible change in Eshell to improve behavior with remote systems via Tramp. Here's the relevant section from the Emacs 29 NEWS: > *** Eshell's PATH is now derived from 'exec-path'. > For consistency with remote connections, Eshell now uses 'exec-path' > to determine the execution path on the local or remote system, instead > of using the PATH environment variable directly. So instead, you want to do something like '(push "C:/env" exec-path)' in order to update the PATH in a way where Eshell sees it.