From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: The load path Date: Fri, 05 Nov 2004 16:05:25 +0100 Message-ID: References: <1097949129.4178.31.camel@localhost> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1099667229 23163 80.91.229.6 (5 Nov 2004 15:07:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 5 Nov 2004 15:07:09 +0000 (UTC) Cc: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Nov 05 16:07:00 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CQ5g2-00059u-00 for ; Fri, 05 Nov 2004 16:06:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CQ5oF-0004kf-46 for guile-devel@m.gmane.org; Fri, 05 Nov 2004 10:15:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CQ5nf-0004Z3-VY for guile-devel@gnu.org; Fri, 05 Nov 2004 10:14:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CQ5nd-0004Wl-EX for guile-devel@gnu.org; Fri, 05 Nov 2004 10:14:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CQ5nc-0004Vp-RQ for guile-devel@gnu.org; Fri, 05 Nov 2004 10:14:49 -0500 Original-Received: from [129.217.163.1] (helo=mail.dt.e-technik.uni-dortmund.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CQ5eb-0004o4-Al for guile-devel@gnu.org; Fri, 05 Nov 2004 10:05:29 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.dt.e-technik.uni-dortmund.de (Postfix) with ESMTP id 0F40E46988; Fri, 5 Nov 2004 16:05:27 +0100 (CET) Original-Received: from mail.dt.e-technik.uni-dortmund.de ([127.0.0.1]) by localhost (krusty [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28882-01-2; Fri, 5 Nov 2004 16:05:26 +0100 (CET) Original-Received: from troy.dt.e-technik.uni-dortmund.de (troy.dt.e-technik.uni-dortmund.de [129.217.163.17]) by mail.dt.e-technik.uni-dortmund.de (Postfix) with ESMTP id E9B43389B8; Fri, 5 Nov 2004 16:05:26 +0100 (CET) Original-Received: by troy.dt.e-technik.uni-dortmund.de (Postfix, from userid 520) id 391C7B99A; Fri, 5 Nov 2004 16:05:26 +0100 (CET) Original-To: Andy Wingo In-Reply-To: <1097949129.4178.31.camel@localhost> (Andy Wingo's message of "Sat, 16 Oct 2004 19:52:08 +0200") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) X-Virus-Scanned: by amavisd-new at dt.e-technik.uni-dortmund.de X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:4333 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4333 [ Andy, I discussed this with rlb on #guile, but I guess you weren't there at the time. The below is a (subjectively filtered) summary. ] Andy Wingo writes: > First off, the load path for a guile in /usr/bin/guile doesn't > include /usr/local. Yes. I am not sure whether it is good to single out /usr/local, tho. There might be any number of directories that people could reasonable expect to be in the load path, such as /opt//guile for a Guile using . We do currently support "init.scm": This file gets executed at startup immediately after boot-9.scm. It is looked for in the load path. That file is intended for site-specific initialization such as adding /usr/local, /opt/ etc to the load path. This does not address what should be in that file _by_default_. In fact, the Debian approach is to have a directory of init files that all get executed in order, so that different packages can cleanly deposit their own actions. We think we should support this directly in Guile. What about executing this code at the end of boot-9.scm: (define (list-directory dir pattern) (let ((port (opendir dir)) (regexp (make-regexp pattern))) (do ((entry (readdir port) (readdir port)) (res '() (if (regexp-exec regexp entry) (cons entry res) res))) ((eof-object? entry) res)))) (define (run-directory dir) (if (file-exists? dir) (for-each (lambda (f) (load (string-append dir "/" f))) (sort (list-directory dir ".*\\.scm$") string Secondly, guile's load path includes ".". This is unexpected. The set of > includes should not depend on the working directory of the user. Yes agreed, I have removed "." in HEAD. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel