all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Anselm Helbig <anselm.helbig+news2009@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: setting enviromment variable
Date: Wed, 26 Aug 2009 16:18:46 +0200	[thread overview]
Message-ID: <8763ca4q0p.wl%anselm.helbig+news2009@googlemail.com> (raw)
In-Reply-To: <87eiqzws3v.fsf@online.de>

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


  reply	other threads:[~2009-08-26 14:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-25 20:33 setting enviromment variable henry atting
2009-08-26 14:18 ` Anselm Helbig [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8763ca4q0p.wl%anselm.helbig+news2009@googlemail.com \
    --to=anselm.helbig+news2009@googlemail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.