This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
RE: using (ice-9 doc) in ~/.guile
- To: guile at sourceware dot cygnus dot com, "'Dale P. Smith'" <dpsm at bigbird dot en dot com>
- Subject: RE: using (ice-9 doc) in ~/.guile
- From: "Daschbach, John L" <John dot Daschbach at pnl dot gov>
- Date: Thu, 27 Jan 2000 10:27:26 -0800
Dale,
This is, in my opinion, a serious bug in guile, and I can only suggest
two work arounds that I use. The reason for the problem is that guile switches
to a different environment when it enters the repl, so only top level defines in
the .guile file are visble. Thus the .guile file is rendered nearly useless
from the standpoint of creating a standard flexible interactive session.
The two work arounds are to bind the symbols you wish to use after
loading the appropriate module or slib require, e.g.
(use-modules (ice-9 slib))
(require 'stdio)
(define printf printf)
This is a pain if you need lots of symbols from a module, but works well
if you just need a few.
The second, is to write an init function and then call that, by hand, in
the repl.
(define (my-init)
(use-modules (ice-9 slib))
(require 'stdio)
(use-modules (ice-9 doc)))
guile>(my-init)
The guile list is helpful, but seems populated more with folks who are
more adept at discussing high level abstractions than implementing low level
pragmatic changes. Since everyone is a volunteer it's not fair to complain, but
I often fear guile will go the same way as OS/2. It's not quite the right
analogy, but guile is to python as OS/2 is to Windows. guile has been touted
for years by the FSF as the one true scripting language, yet python seems to be
actually used for this purpose quite extensively.
It could be that someday the environments, module system, and mop, will
be so technically compelling that people will switch to guile. On the other
hand, this could take years, the guile core could swell and be less useful for
embedding, and guile will fade from existence.
-John
----------
From: Dale P. Smith
Sent: Wednesday, 26 January2000 3:07 PM
To: guile@sourceware.cygnus.com
Subject: using (ice-9 doc) in ~/.guile
Greetings List!
I'm tired if typeing in (use-modules (ice-9 doc)) for every interactive
guile session, but it doesn't work if I place that in my ~/.guile
script.
I'm sure it has something to do with environments, but I am totaly
clueless
here.
It seems to me that the documentation support is more usefull for
interactive
use than in scripts. There ought to be a (easy) way to turn it on
automatically.
Thanks,
Dale
--
Dale P. Smith
dpsm@en.com home
dsmith@altustech.com work