From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: grein46087 Newsgroups: gmane.emacs.help Subject: Re: Dynamically set the load-path Date: Mon, 16 Oct 2006 18:08:31 -0700 (PDT) Message-ID: <6846636.post@talk.nabble.com> References: <6842290.post@talk.nabble.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1161060727 9979 80.91.229.2 (17 Oct 2006 04:52:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 Oct 2006 04:52:07 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 17 06:52:05 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GZgvi-0003JH-9q for geh-help-gnu-emacs@m.gmane.org; Tue, 17 Oct 2006 06:51:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZgvh-0007FA-Tr for geh-help-gnu-emacs@m.gmane.org; Tue, 17 Oct 2006 00:51:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GZdSC-0002TO-9o for help-gnu-emacs@gnu.org; Mon, 16 Oct 2006 21:09:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GZdSB-0002RH-8e for Help-gnu-emacs@gnu.org; Mon, 16 Oct 2006 21:09:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZdSB-0002Qx-28 for Help-gnu-emacs@gnu.org; Mon, 16 Oct 2006 21:09:11 -0400 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GZdbP-0003fI-PK for Help-gnu-emacs@gnu.org; Mon, 16 Oct 2006 21:18:43 -0400 Original-Received: from [72.21.53.35] (helo=talk.nabble.com) by mx20.gnu.org with esmtp (Exim 4.52) id 1GZdS2-0001CN-5Y for Help-gnu-emacs@gnu.org; Mon, 16 Oct 2006 21:09:02 -0400 Original-Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GZdRX-00014q-1f for Help-gnu-emacs@gnu.org; Mon, 16 Oct 2006 18:08:31 -0700 Original-To: Help-gnu-emacs@gnu.org In-Reply-To: X-Nabble-From: hgrei@hotmail.com X-Mailman-Approved-At: Tue, 17 Oct 2006 00:51:24 -0400 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:38089 Archived-At: Kevin Rodgers wrote: > > grein46087 wrote: >> I am looking to set the load path depending onenvironment, Here are two >> sonditional statements, and I will be looking to add another, The >> problem I >> have is the load-path does not evaluate the variables, my-load-path >> correctly. Is there something I not doing correctly. Any help is >> greatly >> appreciated >> >> (setq my-emacs-lisp "~/.emacs.d/lisp/") >> (defvar my-load-path nil) >> (when (eq system-type 'windows-nt) >> (message "GEEK: Setting my-load-path for Windows-NT" ) >> (setq my-load-path (append '( >> "~/.emacs.d/lisp/" >> "c:/bin/emacs/lisp" >> "c:/bin/emacs/site-lisp" >> "c:/gnu/emacs-21.3/lisp" >> "c:/gnu/emacs-21.3/site-lisp" >> ) my-load-path))) >> (when (eq system-type 'mac) >> (message "GEEK: Setting my-load-path for MAC" ) >> (setq my-load-path (append '( >> "~/.emacs.d/lisp/" >> "/Applications/Emacs.app/Contents/Resources/lisp" >> >> "/Applications/Emacs.app/Contents/Resources/site-lisp" >> ) my-load-path))) >> (setq load-path (append '(my-emacs-lisp my-load-path) load-path )) > > There's your problem. You're appending the value of load-path to > a list of two symbols. You mean to do this: > > (setq load-path > (cons my-emacs-lisp (append my-load-path load-path))) > >> (message "GEEK: load-path=[%s]" load-path ) > > -- > Kevin > > > > _______________________________________________ > help-gnu-emacs mailing list > help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > > Kevin, Many Thanks, That really helped. :-) Hans -- View this message in context: http://www.nabble.com/Dynamically-set-the-load-path-tf2454903.html#a6846636 Sent from the Emacs - Help mailing list archive at Nabble.com.