From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.lisp.guile.user Subject: loading a module via an absolute path Date: Fri, 04 Oct 2002 18:41:36 -0400 Organization: What did you have in mind? A short, blunt, human pyramid? Sender: guile-user-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1033771489 12465 127.0.0.1 (4 Oct 2002 22:44:49 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 4 Oct 2002 22:44:49 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17xbBe-0003Ea-00 for ; Sat, 05 Oct 2002 00:44:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17xbBK-0001OA-00; Fri, 04 Oct 2002 18:44:26 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17xbAa-0000VX-00 for guile-user@gnu.org; Fri, 04 Oct 2002 18:43:40 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17xbAY-0000TZ-00 for guile-user@gnu.org; Fri, 04 Oct 2002 18:43:39 -0400 Original-Received: from multivac.student.cwru.edu ([129.22.96.25] helo=multivac.cwru.edu) by monty-python.gnu.org with smtp (Exim 4.10) id 17xb8b-0006SU-00 for guile-user@gnu.org; Fri, 04 Oct 2002 18:41:38 -0400 Original-Received: (qmail 2037 invoked by uid 500); 4 Oct 2002 22:41:59 -0000 Original-To: guile-user@gnu.org Mail-Copies-To: nobody Mail-Followup-To: guile-user@gnu.org Original-Lines: 34 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu) Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:1141 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:1141 use-modules is good for avoiding name clashes. However, I'd like to avoid searching %load-path in some cases, and load a module (not necessarily in the Guile sense, exactly - just a library) via a literal path. use-modules can also only be used at the top level, which isn't always convenient. I think I ought to be able to duplicate what I like about use-modules with something like this: (eval '(load "/path/to/foo.scm") new-environment) But I have some questions: - The manual says (load) will evaluate the file's contents in the top-level environment. Is that still true inside eval, or will it load into the specified environment? - What's the difference between load and primitive-load? - Is there a way to load from an already-open port rather than a filename? Could I just loop with read and eval? Would that handle, e.g., read-hash-extend properly? I don't see any reason it wouldn't. - How do I create a new environment? The documented procedures don't seem to exist: guile> (null-environment 5) :29:1: In expression (null-environment 5): :29:1: Unbound variable: null-environment ABORT: (unbound-variable) guile> (scheme-report-environment 5) :30:1: In expression (scheme-report-environment 5): :30:1: Unbound variable: scheme-report-environment ABORT: (unbound-variable) guile> (assv-ref %guile-build-info 'guileversion) "1.6.0" (interaction-environment) does what it's supposed to do, but that isn't what I need. paul _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user