From: Thien-Thi Nguyen <ttn@glug.org>
Subject: Re: updating shell environment variables
Date: 05 Nov 2004 18:07:01 +0100 [thread overview]
Message-ID: <7eis8k443u.fsf@ada2.unipv.it> (raw)
In-Reply-To: zpMid.2$CR4.0@dfw-service2.ext.ray.com
"Dan Elliott" <dan_elliott_at_cox_dot_net@noSpam.org> writes:
> If I need to change a few environment variables, must I exit and
> restart emacs for these to take effect? I typically run emacs with
> the -nw switch and then suspend emacs when I need to change
> env. variables. Is there a better way? Having to restart emacs is a
> major pain!
if the env vars are only for use in emacs (for the benefit of
subprocesses started from within emacs, or for substitution in a
buffer-list or in a `M-x find-file' command), you can try jamenv.el:
http://www.glug.org/people/ttn/software/ttn-pers-elisp/dist/
lisp/low-stress/jamenv.el
(note: url split into two lines.) to try it out, after loading
jamenv.el, create a buffer w/ contents, for example:
;; cancellare
- PWD
- OLDPWD
- PAGER
;; impostare
b ~/build
td ~/build/tastiera-dura
e ~/build/emacs
g ~/build/hack/guile-core
s ~/local/src
www ~/public_html
then do `M-x jamenv-buffer' in that buffer. you can verify things
are working by looking at the value of the `process-environment'
elisp variable. you can save this buffer to a file and apply
`jamenv-from-file' to the filename on startup. if the file
contents should change, simply re-invoke `jamenv-from-file'
manually to update emacs' notion of env vars.
(you are right. IMHO, leaving emacs is both sick AND wrong! ;-)
thi
prev parent reply other threads:[~2004-11-05 17:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-05 14:49 updating shell environment variables Dan Elliott
2004-11-05 15:50 ` Kevin Rodgers
2004-11-05 17:09 ` Dan Elliott
2004-11-05 18:37 ` Kevin Rodgers
2004-11-05 19:45 ` Pascal Bourguignon
2004-11-05 19:27 ` Pascal Bourguignon
2004-11-05 19:53 ` Johan Bockgård
2004-11-05 17:07 ` Thien-Thi Nguyen [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=7eis8k443u.fsf@ada2.unipv.it \
--to=ttn@glug.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.