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