From: SK Kim <tttuuu888@gmail.com>
To: 30134@debbugs.gnu.org
Subject: bug#30134: ehsell and process-environment variable
Date: Thu, 18 Jan 2018 15:11:26 +0900 [thread overview]
Message-ID: <CAKYNWwQM2XLy03HkBh_4fXOsZRowLbdk7_esezBcPVQgteN79w@mail.gmail.com> (raw)
In-Reply-To: <r6d129vfz1.fsf@fencepost.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1763 bytes --]
I have looked into eshell and make-term source and narrowed down the
range of the issue somewhat.
If I evaluate the test code from eshell buffer, process-environment
lose "TEST=1234" inside make-term function as below.
(defun make-term (name program &optional startfile &rest switches)
(let ((buffer (get-buffer-create (concat "*" name "*"))))
(cond ((not (term-check-proc buffer))
;; Here, process-environemnt still have "TEST=1234"
(with-current-buffer buffer
;; Here, process-environemnt lost "TEST=1234"
(term-mode))
(term-exec buffer name program startfile switches)))
buffer))
I still don't know why but process-environment lost some values when
creating new buffer with 'get-buffer-create' function.
You can test this as below:
1-1) emacs -Q
1-2) evaluate below code.
(let ((process-environment (cons "TEST=1234" process-environment)))
(get-buffer-create "test-buffer")
(switch-to-buffer "test-buffer")
(member "TEST=1234" process-environment))
1-3) you can see "TEST=1234" is a member of process-environment in new
buffer.
2-1) emacs -Q
2-2) M-x eshell
2-3) evaluate below code in eshell buffer.
(let ((process-environment (cons "TEST=1234" process-environment)))
(get-buffer-create "test-buffer")
(switch-to-buffer "test-buffer")
(member "TEST=1234" process-environment))
2-4) you can see "TEST=1234" is lost from process-environment.
You can also test this simply as below.
3-1) emacs -Q
3-2) M-x eshell
3-3) evaluate below code in eshell buffer.
(let ((process-environment (cons "TEST=1234" process-environment)))
(with-temp-buffer
(member "TEST=1234" process-environment)))
3-4) you can see "TEST=1234" is lost from process-environment.
[-- Attachment #2: Type: text/html, Size: 2689 bytes --]
next prev parent reply other threads:[~2018-01-18 6:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-16 2:31 bug#30134: ehsell and process-environment variable SK Kim
2018-01-16 3:40 ` Eli Zaretskii
[not found] ` <CAKYNWwSCjTu=tU=Kx9x8-7RxaHyeaXE6OpkEBvWvNQGVM_GsFA@mail.gmail.com>
2018-01-16 17:04 ` Eli Zaretskii
2018-01-16 18:03 ` Glenn Morris
2018-01-18 6:11 ` SK Kim [this message]
2018-01-18 17:49 ` Glenn Morris
2018-01-18 17:54 ` Glenn Morris
2018-01-19 1:33 ` SK Kim
2018-01-18 17:52 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKYNWwQM2XLy03HkBh_4fXOsZRowLbdk7_esezBcPVQgteN79w@mail.gmail.com \
--to=tttuuu888@gmail.com \
--cc=30134@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.