* setting enviromment variable
@ 2009-08-25 20:33 henry atting
2009-08-26 14:18 ` Anselm Helbig
0 siblings, 1 reply; 5+ messages in thread
From: henry atting @ 2009-08-25 20:33 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
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"))
Evaluating produces:
"~/ledger/ledger.dat~/ledger/ledger.dat~/ledger/ledger.dat~/ledger/ledger.dat"
"HL2030HL2030HL2030HL2030"
Hence I cannot print or use ledger from the eshell command line:
While parsing environment variable option
'LEDGER_FILE=~/ledger/ledger.dat~/ledger/ledger.dat': Error: The ledger
file '/home/atting/ledger/ledger.dat~/ledger/ledger.dat' does not exist
or is not readable
(GNU Emacs 23.1.50.1)
henry
--
http://literaturlatenight.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: setting enviromment variable
2009-08-25 20:33 setting enviromment variable henry atting
@ 2009-08-26 14:18 ` Anselm Helbig
2009-08-26 15:00 ` Peter Dyballa
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Anselm Helbig @ 2009-08-26 14:18 UTC (permalink / raw)
To: help-gnu-emacs
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
--
Anselm Helbig
mailto:anselm.helbig+news2009@googlemail.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: setting enviromment variable
2009-08-26 14:18 ` Anselm Helbig
@ 2009-08-26 15:00 ` Peter Dyballa
[not found] ` <mailman.5445.1251298860.2239.help-gnu-emacs@gnu.org>
2009-08-27 15:54 ` henry atting
2 siblings, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2009-08-26 15:00 UTC (permalink / raw)
To: Anselm Helbig; +Cc: help-gnu-emacs
Am 26.08.2009 um 16:18 schrieb Anselm Helbig:
>> Evaluating produces:
>>
>> "~/ledger/ledger.dat~/ledger/ledger.dat~/ledger/ledger.dat~/ledger/
>> ledger.dat"
>> "HL2030HL2030HL2030HL2030"
>
> Looks like the code ran four times. 8-)
Or existed as a triple before and did not get cleared as a single by
the code...
--
Mit friedvollen Grüßen
Pete
Never be led astray onto the path of virtue
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <mailman.5445.1251298860.2239.help-gnu-emacs@gnu.org>]
* Re: setting enviromment variable
[not found] ` <mailman.5445.1251298860.2239.help-gnu-emacs@gnu.org>
@ 2009-08-26 15:16 ` Anselm Helbig
0 siblings, 0 replies; 5+ messages in thread
From: Anselm Helbig @ 2009-08-26 15:16 UTC (permalink / raw)
To: help-gnu-emacs
At Wed, 26 Aug 2009 17:00:50 +0200,
Peter Dyballa <Peter_Dyballa@Web.DE> wrote:
>
>
> Am 26.08.2009 um 16:18 schrieb Anselm Helbig:
>
> >> Evaluating produces:
> >>
> >> "~/ledger/ledger.dat~/ledger/ledger.dat~/ledger/ledger.dat~/ledger/
> >> ledger.dat"
> >> "HL2030HL2030HL2030HL2030"
> >
> > Looks like the code ran four times. 8-)
>
> Or existed as a triple before and did not get cleared as a single by
> the code...
I blame butterflies. 8-)
--
Anselm Helbig
mailto:anselm.helbig+news2009@googlemail.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: setting enviromment variable
2009-08-26 14:18 ` Anselm Helbig
2009-08-26 15:00 ` Peter Dyballa
[not found] ` <mailman.5445.1251298860.2239.help-gnu-emacs@gnu.org>
@ 2009-08-27 15:54 ` henry atting
2 siblings, 0 replies; 5+ messages in thread
From: henry atting @ 2009-08-27 15:54 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-27 15:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-25 20:33 setting enviromment variable henry atting
2009-08-26 14:18 ` Anselm Helbig
2009-08-26 15:00 ` Peter Dyballa
[not found] ` <mailman.5445.1251298860.2239.help-gnu-emacs@gnu.org>
2009-08-26 15:16 ` Anselm Helbig
2009-08-27 15:54 ` henry atting
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).