From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anselm Helbig Newsgroups: gmane.emacs.help Subject: Re: setting enviromment variable Date: Wed, 26 Aug 2009 16:18:46 +0200 Organization: Freie Universitaet Berlin Message-ID: <8763ca4q0p.wl%anselm.helbig+news2009@googlemail.com> References: <87eiqzws3v.fsf@online.de> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1251298178 17943 80.91.229.12 (26 Aug 2009 14:49:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Aug 2009 14:49:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 26 16:49:31 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MgJoZ-0007hF-3G for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Aug 2009 16:49:31 +0200 Original-Received: from localhost ([127.0.0.1]:36540 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgJoY-00088Q-CQ for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Aug 2009 10:49:30 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-X-Trace: news.uni-berlin.de 9ttJ+CuPxw9TnQ77On2LQA+qOw46jaXjyLf74hi2a62vciT9emPUsU01SS Cancel-Lock: sha1:GzndSZ3q121bH8s99KOLWi8juyQ= In-Reply-To: <87eiqzws3v.fsf@online.de> Mail-Followup-To: Anselm Helbig Original-Xref: news.stanford.edu gnu.emacs.help:172418 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67561 Archived-At: 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