geiser-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Geiser-users] Geiser and MIT/GNU Scheme


From: craven
Subject: Re: [Geiser-users] Geiser and MIT/GNU Scheme
Date: Tue, 26 Apr 2016 07:25:29 +0200
User-agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu)

Hello Rich!

> I've made the following changes to get it working on my system (Mac OS
> X, with the .DMG install of MIT Scheme from
> http://www.gnu.org/software/mit-scheme/)
> - Add GEISER:NO-VALUES procedure to the list of exports in geiser.pkg,
>   since it gets called in geiser-mit.el and was making Emacs throw
>   errors

Thanks, I forgot to add GEISER:NO-VALUES and GEISER:NEWLINE to the
exports, fixed now. Incidentally, I haven't found out when they are used
yet, so they don't do anything so far :-/

> - Add the line `(load-option 'FORMAT)` to emacs.scm since FORMAT was
>   being called later in the file

Added too, I had that in my ~/.scheme.init, and thus never noticed it
was missing :-/

> - A tweak to ALL-COMPLETIONS in emacs.scm to remove the case-twiddling
>   code (which was breaking on my machine because my Scheme expected
>   *PARSER-CANONICALIZE-SYMBOLS?* instead of what you were using).  It
>   turns out STRING-PREFIX? plus checks is unneeded because MIT Scheme
>   (v9.2) has STRING-PREFIX-CI?  This leaves the code looking like:

The way MIT/GNU Scheme handles fluids was recently changed to
parameters, thus the incompatible change. I've taken your version as
posted below, however this means you will not be able to use MIT/GNU
Scheme case-sensitively (for now).

>   (define (all-completions prefix environment)
>     (let ((completions '()))
>       (for-each-interned-symbol
>        (lambda (symbol)
>          (if (and (string-prefix-ci? prefix (symbol-name symbol))
>                   (environment-bound? environment symbol))
>              (set! completions (cons (symbol-name symbol) completions)))
>          unspecific))
>       completions))
>
> - I'm not 100% sure, but I think what you are doing with PSTRING->ENV in
>   emacs.scm can be achieved with ->ENVIRONMENT, e.g.,
>   (pstring->env "user")
>   can become
>   (->environment '(user))

Thanks for this, I've taken that from swank.scm, where it was used on
actual strings, I never noticed I don't use it that way anyway.

> Do you have a Git repo somewhere?  I'd be happy to send patches.

I've just added https://github.com/jaor/geiser/pull/139, is that the
right place?

> Thanks for doing this!!!  MIT Scheme is really awesome.

I entirely agree :D

> p.s. Incidentally, this work might mean MIT Scheme can be used on
> Windows again -- right now it's really hard (IIRC) because Edwin on
> Windows has a bug where it doesn't actually save files, all you can do
> is run a REPL.  None of the maintainers use Windows AFAICT so it's
> unclear when/if that will be fixed.

Unfortunately I don't use Windows either. I'd use edwin, but no utf-8
and no colours makes it a bit .. unwieldy :)

Thanks for all your work and comments!

Peter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]