I installed chezscheme
$ chezscheme
Chez Scheme Version 9.5
Copyright 1984-2017 Cisco Systems, Inc.
> (define a (list 4 5 6 ))
> (set-car! a 9)
> a
(9 5 6)
and configure it as geiser-default-implementation
(require 'geiser)
(setq geiser-active-implementations '(chez guile racket chicken mit chibi gambit))
(add-hook 'scheme-mode-hook 'geiser-mode)
(setq geiser-default-implementation 'chez)
Nonetheless, When issue C-c C-c with org src
#+begin_src scheme :session sicp :lexical t
(define a (list 2 3 4))
(set-car! a 9)
a
#+end_src
#+RESULTS:
It was buffering for a long while prompt that in the minibuffer 'chez go and up'
but run MIT-scheme instead.
The error:
MIT/GNU Scheme running under GNU/Linux
Type `^C' (control-C) followed by `H' to obtain information about interrupts.
Copyright (C) 2019 Massachusetts Institute of Technology
This is free software; see the source for copying conditions. There is NO warranty; not even for
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Image saved on Thursday September 5, 2019 at 11:51:46 AM
Release 10.1.10 || Microcode 15.3 || Runtime 15.7 || SF 4.41 || LIAR/x86-64 4.118
;Warning: Invalid keyword: "/home/me/.emacs.d/.local/straight/build/geiser/scheme/chez/geiser/geiser.ss"
;Warning: Unhandled command line options: ("/home/me/.emacs.d/.local/straight/build/geiser/scheme/chez/geiser/geiser.ss")
Additional:
Add geiser-chez-binary
(setq geiser-active-implementations '(chez guile))
(setq geiser-chez-binary "chez")
(add-hook 'scheme-mode-hook 'geiser-mode)
(setq geiser-default-implementation 'chez)
And run
#+begin_src scheme :session sicp :lexical t :results output
(define b (list 3 4))
#+end_src
it report
apply: Searching for program: No such file or directory, chez
Then I append chez
to org-babel-do-load-languages
and change keyword scheme to chez
#+begin_src chez :session sicp :lexical t :results output
(define b (list 3 4))
#+end_src
It report:
No org-babel-execute function for chez!
Removed mit-scheme package and it works
By default, Geiser thinks Chez Scheme's executable is scheme
, however, it's not, Chez Scheme uses chez
and Mit Scheme uses scheme
and mit-scheme
. You need to put the following in your Emacs init file:
(setq geiser-chez-binary "chez")
Here is geiser-chez-binary
's docstring (I have already change it to chez):
geiser-chez-binary is a variable defined in `geiser-chez.el'.
Its value is "chez"
Original value was "scheme"Documentation:
Name to use to call the Chez Scheme executable when starting a REPL.You can customize this variable.