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

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

Re: setting enviromment variable


From: henry atting
Subject: Re: setting enviromment variable
Date: Thu, 27 Aug 2009 17:54:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

On Mi, Aug 26 2009, Anselm Helbig wrote:

> Hallo!
>
>> setting environment variables does not work anymore.
>> I do it like this:
>> 
>> ;; ledger file variable
>> (setenv "LEDGER_FILE" (concat (getenv "LEDGER_FILE") "~/ledger/ledger.dat"))
>> ;; printer variable
>> (setenv "PRINTER" (concat (getenv "PRINTER") "HL2030"))
>
> What this does is that it adds to what is already stored in the
> environment variable. If you just want to set the value, you'd do it
> like this:
>
>   (setenv "LEDGER_FILE" "~/ledger/ledger.dat")
>   (setenv "PRINTER" "HL2030")
>
> Adding to an environment variable only makes sense for PATH and
> friends.
>
>> Evaluating produces:
>> 
>> "~/ledger/ledger.dat~/ledger/ledger.dat~/ledger/ledger.dat~/ledger/ledger.dat"
>> "HL2030HL2030HL2030HL2030"
>
> Looks like the code ran four times. 8-)
>
> HTH, 
>
> Anselm

Yes, thank, `setenv' works fine. 
Unfortunately it is not as simple. Adding an environment variable
with `concat' worked for a rather long time because emacs seems to ignore
these settings outside emacs in ~/.zshrc (which is not surprising).
But, as far as I can see, out of the blue emacs makes use of them now,
so they are doubled or quadruplicated or what ever.

Since today AucTeX ignores the PATH to latex/pdflatex. I never had to
set the PATH manually in ~/.emacs. I wonder if 

(setenv "TEXINPUTS" ":$HOME/texlive/2008/bin/i386-linux//")

would be the appropriate way. Seems so for me but it does not work
anyway. 

henry

-- 
http://literaturlatenight.de


reply via email to

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