Reading SDF on Guix with Emacs
I think that the software for SDF doesn’t play nice with geiser
at all. Software Design for Flexibility provides accompanying software that requires the use MIT-Scheme
. Getting MIT-Scheme
to play nice with Emacs and geiser
in Guix is not fun yet. The recipe below is a work-around for using Emacs with xscheme
to run the code in the book with a mininum of fuss, albeit with a much less convenient interaction mode.
Quick Get Started
Download the software for the textbook from here and extract the files. On a system with Guix, this can be done using tar
.
Add the following manifest file (e.g., mit-manifest.scm
) to the directory you’ll use to interact with the software:
;; mit-manifest.scm
(specifications->manifest
(list "mit-scheme"
"emacs"))
Set up Emacs to use MIT-Scheme by adding the following to your init.el
file:
;; mit-scheme
(defun enable-mit ()
(interactive)
(require 'xscheme)
(start-scheme "*scheme*"))
(defun disable-mit ()
(interactive)
(unload-feature 'xscheme))
Now we are ready to play with code. We first type at a terminal console:
guix shell -m mit-manifest.scm -- emacs
Then, in Emacs, type
M-x enable-mit
and hit return. Hit return again at the prompt for a scheme
command
At this point we can follow the instructions from the book and evaluate the expressions below in the *Scheme
buffer:
(load "../manager/load.scm")
(manage 'new-environment <section of the book>)