From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Scott N. Walck" Newsgroups: gmane.lisp.guile.user Subject: set-current-module in .guile ? Date: Sat, 5 Apr 2008 13:24:25 -0400 Message-ID: <18423.46537.161648.253613@entangle.lvc.edu> Reply-To: walck@lvc.edu NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1207416301 18775 80.91.229.12 (5 Apr 2008 17:25:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Apr 2008 17:25:01 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Apr 05 19:25:31 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JiC8s-0006AA-F7 for guile-user@m.gmane.org; Sat, 05 Apr 2008 19:25:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JiC8F-0004DV-F5 for guile-user@m.gmane.org; Sat, 05 Apr 2008 13:24:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JiC8C-0004DQ-GC for guile-user@gnu.org; Sat, 05 Apr 2008 13:24:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JiC86-0004DE-Os for guile-user@gnu.org; Sat, 05 Apr 2008 13:24:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JiC86-0004DB-K2 for guile-user@gnu.org; Sat, 05 Apr 2008 13:24:38 -0400 Original-Received: from webmail.lvc.edu ([192.77.143.32] helo=lvc.edu) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1JiC86-0005ls-SL for guile-user@gnu.org; Sat, 05 Apr 2008 13:24:39 -0400 Original-Received: from entangle.lvc.edu by lvc.edu (MDaemon PRO v9.6.4) with ESMTP id 50-md50000204713.msg for ; Sat, 05 Apr 2008 13:25:14 -0400 X-Spam-Processed: lvc.edu, Sat, 05 Apr 2008 13:25:14 -0400 (not processed: message from trusted or authenticated source) X-MDRemoteIP: 10.1.28.214 X-Return-Path: walck@lvc.edu X-Envelope-From: walck@lvc.edu X-MDaemon-Deliver-To: guile-user@gnu.org X-Mailer: VM 7.19 under Emacs 22.1.1 X-MDAV-Processed: lvc.edu, Sat, 05 Apr 2008 13:25:15 -0400 X-detected-kernel: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6517 Archived-At: Dear Guilers, Dan Gildea has ported a large fraction of Gerry Sussman's scmutils code from MIT-scheme to guile. In doing so, he uses guile modules instead of MIT-scheme environments. Much of the code creates a module called "generic-environment". In an interactive guile session, you type (set-current-module generic-environment) and this redefines "+", for example, to add functions and vectors. I would like to know if there is a way to set the interactive environment to "generic-environment" in a .guile file. If I put (set-current-module generic-environment) in a .guile file, it does nothing. (I suppose because the current module when reading the .guile file is different from the current module in an interactive guile session?) I would like to use this guile-scmutils with physics students, and I would like to hide from them the need to execute (set-current-module generic-environment) in an interactive session. Of course, I could pre-load (define start (lambda () (set-current-module generic-environment))) in a .guile file or with the -l option, and then students would only need to type (start) but it's still awkward, and it's a detail that I don't want to have to explain to them. I would appreciate any suggestions that folks might have. Scott -- Scott N. Walck Associate Professor of Physics Lebanon Valley College Annville, PA 17003 phone: 717-867-6153 fax: 717-867-6075 email: walck@lvc.edu