From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Siyuan Chen Newsgroups: gmane.emacs.bugs Subject: bug#74550: eshell cannot set the environment variable PATH on Windows Date: Wed, 27 Nov 2024 04:38:30 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000356f760627d6d599" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21274"; mail-complaints-to="usenet@ciao.gmane.io" To: 74550@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 26 21:39:24 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 1tG2LD-0005M2-5v for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 Nov 2024 21:39:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tG2Kw-0001q2-JL; Tue, 26 Nov 2024 15:39:06 -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 1tG2Ks-0001pj-Tr for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2024 15:39:03 -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 1tG2Ks-0000Ts-E3 for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2024 15:39:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:MIME-Version:To:Subject; bh=O+lDxM0T7ZtI5obNtNyMBuG907gs1RlKb7DEzduQZKc=; b=IkRingjmbJrv2K4yKsEwcVe0n6hGv02uWjVdHX00cTE5y/LYvA/ZjtufNMvjU38hZpjNKt/ofzAGdBLXJ4iOuN/BPP1kCNvhf2NZ2iwpM0Xcm8XsbxLg3DHsn2ou33C2ZPkgve3vWHu6EOf9eVX7Hi9tjirLWRZpbDw1klTwAAVd4lekuQV2QoPFWOd0Ann/6kQbQdFVurwkcRJmHQH3hFEJ8yTBwP2DgXmbg08d/ryVvw+YBw9yRS43FlQl+VhmxwDlOm2EmyKpMinCqkwOQpAfcX0SRDpeYX/ezmLFimtfA0BJsJ5IqgyF7uOZg8fYK7Niqy5fKmQi4HajS+Sk1w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tG2Ks-0007Nd-0O for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2024 15:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Siyuan Chen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Nov 2024 20:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74550 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173265352128324 (code B ref -1); Tue, 26 Nov 2024 20:39:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Nov 2024 20:38:41 +0000 Original-Received: from localhost ([127.0.0.1]:52815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tG2KW-0007Mm-Lj for submit@debbugs.gnu.org; Tue, 26 Nov 2024 15:38:40 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:44286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tG2KU-0007Mc-AE for submit@debbugs.gnu.org; Tue, 26 Nov 2024 15:38:38 -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 1tG2KT-0001oq-Vj for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2024 15:38:38 -0500 Original-Received: from mail-yw1-x112c.google.com ([2607:f8b0:4864:20::112c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tG2KS-0000R6-Jj for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2024 15:38:37 -0500 Original-Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-6ef0c64d75cso27665407b3.2 for ; Tue, 26 Nov 2024 12:38:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732653515; x=1733258315; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=O+lDxM0T7ZtI5obNtNyMBuG907gs1RlKb7DEzduQZKc=; b=KmCF7yMsAPPZ+yoEcjV6RbAckeJa+ekh4NoQT/0Pspuc8eiNESjxLPONKxoVtxRkir Ol4EU0Xnfwfw7S1A4Uhd5lWI5nf1yWT2OIG5P1QuqrxemYPWy0lA1CrwCcTFWJFPSvI6 UwVLw2N/KrtNgoY0Sggezf1iOO0BVdoNJk0yy+Fc6JvtsLQgl2TvDq4oNuqg4VMlsotS vE+ngKWpaBP6VYXg0eG84VYvESN6D0FVg6OhfwtC0lRimIiv0jiU7iuN+jtfZAa64bvF K8kvJrB6mLmlshK3wPtfBlbDlnbE8laExTi6OxSRcLxk702D72nRXsXHD1BHpQr/SvrN fizg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732653515; x=1733258315; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=O+lDxM0T7ZtI5obNtNyMBuG907gs1RlKb7DEzduQZKc=; b=bxKSiq3HuY/2U955qOh4j4o0hAOo0YNoGOrM920gfch+CxQVkdI9iwT9eNlSVL6Qrn 6fEsrA+obbq6+CyC+zy2mzR8lCgH/C/a4NTrGtvQLiX9bRD8YnOqw29nY08F3F6yKOlo /ssP2pVbbZCnF4GkA4mS5eY3xk1PMEzHbqBcXT+yFB0ExmfSnKMe/LIyOL+unbVbnE/v QpjXxKrpUXwfUPPXrd0e40fH5mT8swQNqsrdgeYjnO4ODp2uqJ72Y9opbLmGakW4mT3L asim1StVHW/zR+WI51FpYx7W0d9TvXSyB/4+FbFiJCVpYa75zt0EpvRio5OgnmktaVGh AW3w== X-Gm-Message-State: AOJu0YyLNOESruOZ/NvPC5nVmq/KZBs20DtfYHr55jBJh7JuTCMpl48a vwqYVzSxP/KzWx9qo92ErTIhNWwZYE63C9mRzNDU+p+/H0zjcb8ldxHC8ZyMVQ+CgRoKOUgIpgE TbNtbJ5DOJCqpaIwxzas3Up6valmpxboK X-Gm-Gg: ASbGncs/DRx+JZABvcAEh4oaTe2b/YRp0+e8/y3saqdk6AT7PHFGRGW2+asO0cymHge wMAdT4mT4vOYAHFwVjBWiOesOM/GMupu5mVgvfJ+z0yFNvGlXEaB9940DORc6wsk= X-Google-Smtp-Source: AGHT+IHbc1dDwAXnnEpouVeS74Q4kTJrDrlkEz0ZIT9zqkWcQ860HEE0Ik/TM2GvNc9Eukr8Y0T5I9EWQwYvk7bu5lg= X-Received: by 2002:a05:690c:48c8:b0:6e2:aceb:fb34 with SMTP id 00721157ae682-6ef371dfabcmr7442227b3.1.1732653513794; Tue, 26 Nov 2024 12:38:33 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::112c; envelope-from=chansey97@gmail.com; helo=mail-yw1-x112c.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:295999 Archived-At: --000000000000356f760627d6d599 Content-Type: text/plain; charset="UTF-8" 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. P.S. I have also tried `eshell-set-path` and `with-environment-variables`, but they cannot set PATH as well. For example, (require 'eshell) (defun eshell2() (interactive) (eshell-set-path '("C:/env")) (call-interactively 'eshell)) (defun eshell3() (interactive) (with-environment-variables (("PATH" (concat "C:/env" path-separator (getenv "PATH")))) (call-interactively 'eshell))) Emacs 29.4 on Windows 10. Thanks. Best regards, Siyuan Chen --000000000000356f760627d6d599 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Reproduce steps:

1. Emacs -Q

2. M-x eval-exp= ression `(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 sh= ow in the result.

P.S. I have also tried `eshell-set-path` and `with= -environment-variables`, but they cannot set PATH as well. For example,

(require 'eshell)

(defun eshel= l2()
=C2=A0 (interactive)
=C2=A0 (eshell-set-path '("C:/env&= quot;))
=C2=A0 (call-interactively 'eshell))

(defun eshell3()=
=C2=A0 (interactive)
=C2=A0 (with-environment-variables (("PATH= " (concat "C:/env" path-separator (getenv "PATH"))= ))
=C2=A0 =C2=A0 (call-interactively 'eshell)))

<= /div>
Emacs 29.4 on Windows 10.

Thanks.

Best regards,
Siyuan Chen


--000000000000356f760627d6d599--