Subject: bug#30134: ehsell and process-environment variable

From: Eli Zaretskii <[email-masked]>
Date: Tue, 16 Jan 2018 05:40:33 +0200

> From: SK Kim <[email-masked]>
> Date: Tue, 16 Jan 2018 11:31:27 +0900
> 
> 1) start emacs with 'emacs -Q'
> 
> 2) 'M-x eshell' to open eshell buffer.
> 
> 3) evaluate below code in eshell buffer.
>     (let ((process-environment (cons "TEST=1234" process-environment)))
>         (make-term "test-term" "/bin/bash"))
> 
> 4) moved to buffer 'test-term' and type 'echo $TEST' and you can see
>    nothing.
> 
> The modified process-environment variable is not properly affected if
> the code is evaluated in eshell buffer. The eshell buffer is the only
> buffer that I found the above code is not working properly.

process-environment is for invoking other programs from Emacs.  By
contrast, Eshell does not invoke any other program, it is implemented
in Emacs itself.  And process-environment doesn't affect Emacs itself.
That is why you see the difference with other programs, in particular
shells invoked from Emacs.