Re: Loading a module before and after adding a load path

2013-01-21 Thread Andy Wingo
On Mon 21 Jan 2013 18:20, l...@gnu.org (Ludovic Courtès) writes: >> Subject: [PATCH] fix try-module-autoload, which did not detect failure to >> find the file > > Looks good to me. Pushed, thanks. Andy -- http://wingolog.org/

Re: Loading a module before and after adding a load path

2013-01-20 Thread Andy Wingo
On Sat 19 Jan 2013 05:32, Noah Lavine writes: > In the long term, Andy and Ludo, what is the right way to fix this? This bug was introduced here: commit 0fb81f95b0222c5ba49efd3e36cf797df54c0863 Author: Andy Wingo Date: Wed Jun 3 09:48:16 2009 +0200 add exception_on_error opt

Re: Loading a module before and after adding a load path

2013-01-18 Thread Diogo F. S. Ramos
Noah Lavine writes: > As a workaround, remove your module from the list "autoloads-done". > (actually, there will be a pair > in that list, where the cdr of the pair is the name of the module as a > string. remove that.) Nice! Thank you. Here is a little procedure that might help someone (it

Re: Loading a module before and after adding a load path

2013-01-18 Thread Noah Lavine
Hello, I see what you are trying to do, and I agree that it should be possible. I have set up the same situation as you: trying to load a module, failing, adding it to my path, trying again, and failing again. Here's what I've figured out: - resolve-module fails on the module, when I think it sho

Re: Loading a module before and after adding a load path

2013-01-18 Thread Diogo F. S. Ramos
Nala Ginrut writes: > Why you need to load the module without giving its path? Sorry, I should have added some more context. While I'm working with the REPL, sometimes I forget to add the path to a module before trying to use it. It's a mistake. So, after trying to load the module with `use-mod

Re: Loading a module before and after adding a load path

2013-01-18 Thread Nala Ginrut
On Fri, 2013-01-18 at 13:53 -0200, Diogo F. S. Ramos wrote: > I have a module at `/path/to/foo'. > > If I open a guile REPL and type: > > (add-to-load-path "/path/to/foo") > (use-modules (foo bar)) > > everything works. But, if I type: > > (use-modules (foo bar)) > (add-to-load-path "/path/to/f

Re: Loading a module before and after adding a load path

2013-01-18 Thread Diogo F. S. Ramos
Yanbin Zhang writes: > Hi, > > I guess you need to tell GUILE where to find your module before you can load > it. GUILE has some standard places where it will look for modules. If your > module is not there, then you need to add the path so > that GUILE can find it. There are several ways to do

Re: Loading a module before and after adding a load path

2013-01-18 Thread Yanbin Zhang
Hi, I guess you need to tell GUILE where to find your module before you can load it. GUILE has some standard places where it will look for modules. If your module is not there, then you need to add the path so that GUILE can find it. There are several ways to do this. One is to use "add-to-load-pa

Loading a module before and after adding a load path

2013-01-18 Thread Diogo F. S. Ramos
I have a module at `/path/to/foo'. If I open a guile REPL and type: (add-to-load-path "/path/to/foo") (use-modules (foo bar)) everything works. But, if I type: (use-modules (foo bar)) (add-to-load-path "/path/to/foo") (use-modules (foo bar)) I get the same error I've got by using a module befo