From: Jim Porter <jporterbugs@gmail.com>
To: Siyuan Chen <chansey97@gmail.com>
Cc: 74550@debbugs.gnu.org
Subject: bug#74550: eshell cannot set the environment variable PATH on Windows
Date: Wed, 27 Nov 2024 10:52:47 -0800 [thread overview]
Message-ID: <cb451250-b09e-302b-18b0-4597400af27e@gmail.com> (raw)
In-Reply-To: <CAHWTsYmgo983bESi8siYZCXc+3_Znsx=jRtKaz=RYxAFLpHoDA@mail.gmail.com>
On 11/27/2024 9:15 AM, Siyuan Chen wrote:
> It works, thanks.
>
> However, this seems to be a global setting only. Is there any equivalent
> of with-environment-variables for exec-path?
Not exactly. However, you can use setq-local or eshell/addpath:
(defun shell1 ()
(interactive)
(let ((current-prefix-arg 4))
(call-interactively 'shell)
(setq-local exec-path (cons "C:/foo" exec-path))
;; or ...
(eshell/addpath "-b" "C:/foo")))
That's probably the best way to do it for now. I think it's probably
reasonable for Eshell to work correctly when you've let-bound
'exec-path' like in your examples, but I'll have to think about the best
way to do it.
prev parent reply other threads:[~2024-11-27 18:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 20:38 bug#74550: eshell cannot set the environment variable PATH on Windows Siyuan Chen
2024-11-26 21:14 ` Jim Porter
2024-11-27 17:15 ` Siyuan Chen
2024-11-27 18:52 ` Jim Porter [this message]
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=cb451250-b09e-302b-18b0-4597400af27e@gmail.com \
--to=jporterbugs@gmail.com \
--cc=74550@debbugs.gnu.org \
--cc=chansey97@gmail.com \
/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.