Running MIT Scheme with Emacs in Windows

After scratching my head over the various approaches, with no luck, I finally resorted to a very simple setup. Blame it on the lack of support under Windows for otherwise a fantastic combo.

My scheme sources are managed in a sub-folder inside a OneDrive managed folder. This is just to keep them safe. My workflow is very simple.  In Emacs, I find or create a scheme file. Then to execute it I run scheme through the menu option Scheme->Run Inferior Scheme. I load the same file in the MIT Scheme prompt by giving just its name and then go through as its eval-print loop. If I happen to change my Scheme source folder then I restart the Inferior Scheme so that it could find the new sources it in its current working directory.

My purpose is very limited (going through the SICP exercises), so I am not using any source control or IDE. Though Racket (formerly PLT Scheme) proved helpful at debugging.

Here is how I set it up:

  1. Install MIT Scheme from:
  2. Make sure that its binary folder is your path.
    Ex: Add C:\Program Files\MIT-GNU Scheme\bin to your PATH variable.
    It is set via Control Panel\System and Security\System then find PATH in Environment Variables -> System Variables.
  3. Rename or make a copy of mit-scheme.exe to just scheme.exe
    This is to ensure that the Emacs by default finds it – otherwise you need to configure Scheme program name variable in the Emacs settings. I found renaming scheme exe simpler.
  4. Add a new system variable named: MITSCHEME_BAND, containing path of
    Ex: MITSCHEME_BAND : C:\Program Files\MIT-GNU Scheme\lib\
  5. Add a new system variable name: MITSCHEME_LIBRARY_PATH, pointing to the scheme lib.
    Ex: MITSCHEME_LIBRARY_PATH : C:\Program Files\MIT-GNU Scheme\lib

That’s it!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s