[ prog / sol / mona ]

prog


[Book] Sussman - Software Design for Flexibility

18 2021-03-23 22:20

I can't get the management software to work with Geiser. It works with plain Scheme mode but with Geiser if I evaluate a definition in a buffer it does not reach the REPL. For example, I have this this in a file outside the `sdf' directory:

(load "sdf/manager/load")
(manage 'new-environment 'combinators)

(define (foo x) x)

When I evaluate the second line with C-x C-e, I don't get any result in the echo area. If I evaluate the last line with C-x C-e after, it does echo back

=> foo

But when I try to use it in the REPL, it fails:

1 (user) => (foo 1)

;Unbound variable: foo
;To continue, call RESTART with an option number:
; (RESTART 3) => Specify a value to use instead of foo.
; (RESTART 2) => Define foo to a given value.
; (RESTART 1) => Return to read-eval-print level 1.

2 error> 

The same thing works with plain Scheme-mode (without Geiser).

19 2021-03-23 23:15

>>18
I'm also having weird issues with Geiser but I don't see any problems with your example. Evaluating the second line with C-x C-e echoes:

=>new-environment

Using Emacs 27.1 with this minimal configuration for Scheme and Geiser:

;;;Scheme
(setq auto-mode-alist
      (cons '("\\.scm$" . scheme-mode)
	    auto-mode-alist))

(load-file "~/.emacs.d/elpa/geiser-0.12/geiser.el")
(add-hook 'scheme-mode-hook 'geiser-mode)
(setq geiser-default-implementation 'mit)
(setq geiser-active-implementations '(mit))
31


VIP:

do not edit these