help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: updating shell environment variables


From: Pascal Bourguignon
Subject: Re: updating shell environment variables
Date: 05 Nov 2004 20:45:29 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Kevin Rodgers <ihs_4664@yahoo.com> writes:

> Dan Elliott wrote:
>  > My intended question is a bit more complicated.  Change the above from
>  > "few" to "nearly one-hundred."  I have failed to discover an effective
>  > way to do this.  Can I somehow *flash* the state of emacs' environment
>  > variables to be in line with the shell that "owns" my current emacs
>  > session?
> 
> Like this?
> 
> # in the shell:
> env | awk -F= '{print "(setenv \"" $1 "\" \"" $2 "\")" }' > /tmp/env.el

It won't work when there are double-quotes or new-lines in the values
or the variables (although shell syntax forbid it, a program could
create such a variable before forking the shell).

> ; in emacs:
> (load-file "/tmp/env.el")
> 
> -- 
> Kevin Rodgers

-- 
__Pascal Bourguignon__


reply via email to

[Prev in Thread] Current Thread [Next in Thread]