From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Dynamically set the load-path Date: Mon, 16 Oct 2006 17:02:50 -0600 Organization: IHS Message-ID: References: <6842290.post@talk.nabble.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1161039839 20796 80.91.229.2 (16 Oct 2006 23:03:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Oct 2006 23:03:59 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 17 01:03:57 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 1GZbUv-0005eS-M4 for geh-help-gnu-emacs@m.gmane.org; Tue, 17 Oct 2006 01:03:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZbUv-0002Sx-9W for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Oct 2006 19:03:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GZbUj-0002Sj-Ru for help-gnu-emacs@gnu.org; Mon, 16 Oct 2006 19:03:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GZbUj-0002Rz-Ai for help-gnu-emacs@gnu.org; Mon, 16 Oct 2006 19:03:41 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZbUj-0002Rj-6p for help-gnu-emacs@gnu.org; Mon, 16 Oct 2006 19:03:41 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GZbdw-0001UT-BD for help-gnu-emacs@gnu.org; Mon, 16 Oct 2006 19:13:12 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GZbUc-0005ap-S9 for help-gnu-emacs@gnu.org; Tue, 17 Oct 2006 01:03:34 +0200 Original-Received: from 207.167.42.206 ([207.167.42.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Oct 2006 01:03:34 +0200 Original-Received: from ihs_4664 by 207.167.42.206 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Oct 2006 01:03:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 37 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.206 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) In-Reply-To: <6842290.post@talk.nabble.com> 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:38086 Archived-At: 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