<div dir="ltr">Reproduce steps:<br><br>1. Emacs -Q<br><br>2. M-x eval-expression `(setenv "PATH" (concat "C:/env" path-separator (getenv "PATH")))`<br><br>3. M-x eshell<br><br>4. In the *eshell* window, type `echo $PATH`, but the path "C:/env" doesn't show in the result.<br><br>P.S. I have also tried `eshell-set-path` and `with-environment-variables`, but they cannot set PATH as well. For example,<br><div><br></div><div>(require 'eshell)</div><div><br></div>(defun eshell2()<br> (interactive)<br> (eshell-set-path '("C:/env"))<br> (call-interactively 'eshell))<br><br>(defun eshell3()<br> (interactive)<br> (with-environment-variables (("PATH" (concat "C:/env" path-separator (getenv "PATH"))))<br><div> (call-interactively 'eshell)))</div><div><br></div><div> Emacs 29.4 on Windows 10.<br></div><div><br></div><div> <div>Thanks.</div><div><br></div><div>Best regards,</div><div>Siyuan Chen</div> </div><div><br></div><div><br></div></div>