Tue 08 Mar 2011 11:58:13 PM UTC, comment #10:
Fixed and released in 0.1.2
|
Tue 08 Mar 2011 09:16:25 PM UTC, comment #9:
Thanks, Jose, that worked fine. Thanks for your speedy resolution.
|
Tue 08 Mar 2011 09:09:54 PM UTC, comment #8:
Argh, sorry Jon. I've pushed a slight variation of your patch that should do the job. Thanks again!
|
Tue 08 Mar 2011 08:58:31 PM UTC, comment #7:
The change didn't work for me because you get a `t' in the sequence of parameters when the geiser-guile-load-init-file-p is set. Since `t' is not a sequence, sequencep returns false when you run geisser-guile--parameters and aborts putting you in the emacs debugger without loading Geiser.
The following small change makes it work (because nil is a sequence):
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index 169ac30..ff020a1 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -122,7 +122,7 @@ effect on new REPLs. For existing ones, use the command
This function uses `geiser-guile-init-file' if it exists."
(let ((init-file (and (stringp geiser-guile-init-file)
(expand-file-name geiser-guile-init-file)))
- (q-flags (or geiser-guile-load-init-file-p '("-q"))))
+ (q-flags (if geiser-guile-load-init-file-p nil '("-q"))))
`(,@(and (listp geiser-guile-binary) (cdr geiser-guile-binary))
,@q-flags "-L" ,(expand-file-name "guile/" geiser-scheme-dir)
,@(apply 'append (mapcar (lambda (p) (list "-L" p))
|
Tue 08 Mar 2011 07:57:39 PM UTC, comment #6:
Jon, i've just pushed a patch that adds a custom variable, geiser-guile-load-init-file-p, that you can set to t for eliding the -q flag. Please, let me know whether that works for you. Thanks a lot!
|
Sun 06 Mar 2011 06:44:13 PM UTC, comment #5:
OK, i see your point. Most unfortunately, Guile doesn't provide any way of specifying an init file other than ~/.guile. Therefore, i'm going to suppress geiser-guile-init-file, and add a geiser-guile-load-init-file-p flag as you suggested.
|
Sun 06 Mar 2011 05:41:21 PM UTC, comment #4:
I pretty much understand what's going on now.
First, the problem isn't with Geiser other than that it treats `-l .guile' as a synonym for the automatic loading of .guile. I get the exact same behavior if I call guile directly from the command line as `guile -q -l /Users/jcs/.quile'.
The problem is that I treat my .guile file much as I do my init.el file for Emacs and depend upon being able to load Scheme files and have them immediately available for use in the rest of the .guile file. If I comment out the use of the loaded files, then I can load my .guile with -l and all the loaded files will be available for use at the REPL.
Guile does treat the two methods of loading .guile differently. The automatic load of .quile uses scm-primitive-load, which makes everything immediately available. The file loaded with -l gets consed up with sym_load and is obviously handled differently but I don't understand guile internals enough to understand exactly what's going on.
The take away is that `-l .guile' is not the same as the automatic load of .guile and for that reason I still believe that it's worthwhile to have a configuration option such as that that I submitted originally.
|
Sun 06 Mar 2011 02:03:12 PM UTC, comment #3:
Hi Jon. Thanks for the details. Yes, it looks likes some difference between loading the init file and -l in Guile, probably in what modules are visible. Are you using `split-string` explicitly in your .guile? If so, do you think you could narrow down the problem to a short init file that we can submit to the Guile lists for consideration?
Thanks
|
Fri 04 Mar 2011 08:50:56 PM UTC, comment #2:
I am the original reporter of this bug. I tried setting the geiser-guile-init-file to .guile via the configuration but got the same result (REPL hung). I appended the backtrace from guile at the end of this comment. It definitely looks as if it's guile that's barfing not geiser. I haven't looked at the guile code for this but it must treat the -l and automatic .guile load differently. If I start guile in listen mode and then connect, it also works correctly. Let me know if you need further info.
Backtrace:
In module/ice-9/boot-9.scm:
170: 7 [catch #t #<catch-closure 1012e6080> ...]
In unknown file:
?: 6 [catch-closure]
In module/ice-9/boot-9.scm:
62: 5 [call-with-prompt prompt0 ...]
In module/ice-9/eval.scm:
389: 4 [eval # #]
In module/ice-9/boot-9.scm:
1917: 3 [save-module-excursion #<procedure 1017b8e40 at module/ice-9/boot-9.scm:3341:3 ()>]
3346: 2 [#<procedure 1017b8e40 at module/ice-9/boot-9.scm:3341:3 ()>]
In unknown file:
?: 1 [load-compiled/vm "/Users/jcs/.cache/guile/ccache/2.0-LE-8-2.0/Users/jcs/.guile.go"]
In /Users/jcs/.guile:
43: 0 [#<procedure 10165b640 ()>]
/Users/jcs/.guile:42:0: In procedure #<procedure 10165b640 ()>:
/Users/jcs/.guile:42:0: In procedure module-lookup: Unbound variable: split-string
|
Fri 04 Mar 2011 07:25:13 PM UTC, comment #1:
The intended way to address this problem is to customize guile-init-file, which you can set to ~/.guile in your case. If that gives problems, i'll try to address the issue (although it's a bit difficult without knowing the contents of your .guile) before adding yet another configuration variable. Moreover, i want to be able to have a different initialisation files for the console and for geiser (for instance, the former loads readline in my case).
|
Fri 04 Mar 2011 07:13:21 PM UTC, original submission:
I have a reasonably complex guile environment that gets loaded by the .guile file. Because geiser does not load the .guile file, my environment is unavailable when using geiser. Loading .guile from the .guile-geiser file causes the REPL to hang. So does making a symlink between .guile-geiser and .guile.
I worked around this problem by making a local copy of geiser-guile.el in my init.el and removing the "-q". This works fine and does not cause any side effects that I can see. I believe that whether or not geiser loads the .guile file should be configurable. The attached patch file implements this change.
|