<div dir="ltr">Reproduce steps:<br><br>1. Emacs -Q<br><br>2. M-x eval-expression `(setenv &quot;PATH&quot; (concat &quot;C:/env&quot; path-separator (getenv &quot;PATH&quot;)))`<br><br>3. M-x eshell<br><br>4. In the *eshell* window, type `echo $PATH`, but the path &quot;C:/env&quot; doesn&#39;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 &#39;eshell)</div><div><br></div>(defun eshell2()<br>  (interactive)<br>  (eshell-set-path &#39;(&quot;C:/env&quot;))<br>  (call-interactively &#39;eshell))<br><br>(defun eshell3()<br>  (interactive)<br>  (with-environment-variables ((&quot;PATH&quot; (concat &quot;C:/env&quot; path-separator (getenv &quot;PATH&quot;))))<br><div>    (call-interactively &#39;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>