Using Emacs with Scheme

This page provides some instructions for using Emacs with Scheme. If you're not a regular Emacs user, I would strongly recommend taking some time to learn the basics now, because this will save you an enormous amount of time and effort (and probably frustration) in the long run. Emacs has a built-in tutorial that can be started by typing the command CTRL-h t.

Running Scheme and Emacs on the Pomona Linux machines


Scheme mode

In general, it's more useful to run an interactive Scheme session inside Emacs, rather than from the Linux command line. This allows you to use all of the powerful editing features of Emacs in your Scheme session. To run Scheme within Emacs, start up Emacs and then type ESC x run-scheme followed by Return.

You can then split the Emacs window into two subwindows using CTRL-x 2 (or CTRL-x 3 if you prefer vertical subwindows), and open your Scheme file in one of the subwindows. That way, you can see and edit your definitions alongside your interactive Scheme session. To toggle between the subwindows, type CTRL-x o. To open a file in a subwindow, type CTRL-x CTRL-f. See the CS 131 Emacs Quick Reference Guide for more information about basic editing commands.

You should use the extension .ss for your Scheme source files. This will cause Emacs to automatically enter Scheme mode when a Scheme file is opened.

Here are some useful commands to know about in Scheme mode: