[Top][All Lists]

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

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

From: address@hidden
Subject: Re: is it possible to pass shell variables to emacs?
Date: Fri, 7 Dec 2007 09:13:28 -0800 (PST)
User-agent: G2/1.0

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.  This is to be
> preferred to
> emacs -eval "(setq a \"$a\" b \"$b\")"
> since this will break if $a or $b contain characters or character
> sequences that are interpreted specially in literal Lisp strings.
> --
> David Kastrup, Kriemhildstr. 15, 44793 Bochum

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


reply via email to

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