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

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

Re: is it possible to pass shell variables to emacs?


From: David Kastrup
Subject: Re: is it possible to pass shell variables to emacs?
Date: Fri, 07 Dec 2007 18:18:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

"address@hidden" <address@hidden> writes:

> On Dec 6, 2:35 pm, David Kastrup <address@hidden> wrote:
>> "address@hidden" <address@hidden> writes:
>> > is there any possible way to do this? I would like to avoid making
>> > them environment variables. I have a command-line script that when
>> > called, sets all of these variables. I would like to use these
>> > variables for example when finding a file.
>>
>> > Maybe there's some custom code I could put in my .emacs file. or I
>> > could write a wrapper around emacs.
>>
>> emacs -eval '(setq a (pop argv) b (pop argv))' "$a" "$b"
>>
>> If your Emacs version is not a more recent developer version, you need
>> to write command-line-args-left instead of argv.
>
> Great thanks. Question: some of these variables that I am passing in
> refer to directories and I want to use them in the C-x C-f interface.
> How do I access them? I don't think they work with $myvar

Huh?  Emacs never gets to see the names of the shell variables.  It just
gets to see their values.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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