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

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

RE: accessing environment variable


From: Drew Adams
Subject: RE: accessing environment variable
Date: Mon, 10 Sep 2007 08:50:10 -0700

> what is the preferred way to access an environment variable from within
> the .emacs file?
>
> > (getenv variable)
> > Get the value of environment variable variable.
> > variable should be a string.
>
> (getenv GS_PROG)

1. (getenv "GS_PROG")
See doc above: "Variable should be a string."

> (custom-set-variables '(ps-lpr-command "(getenv GS_PROG)")

2. ps-lpr-command expects a string that names a program. It does not expect
a Lisp sexp.






reply via email to

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