views:

1615

answers:

5

I'm going through SICP and I'd like to have an interpreter analogous to the interactive Python interpreter to play around in while I'm watching the lectures and reading the book. Furthermore, I'd like this interpreter to run inside Emacs so I can jump back and forth between files of scheme code and the interactive interpreter and so forth.

However, I'm fairly new to Emacs and have not as of yet been able to get this to work or find one clear set of instructions to use in getting it to work.

It seems like I should be able to set it up so that M-x run-scheme will open up an interactive interpreter that at least sounds like exactly what I want, but at the moment this just returns Searching for program: no such file or directory, scheme and I haven't been able to figure out exactly what files I need to put where to remedy this.

I'm running GNU Emacs 22.1.1 (mac-apple-darwin, Carbon Version 1.6.0) as installed through the OS X 10.5 install DVD.

+7  A: 

You need to install a Scheme interpreter like MIT Scheme (which is the recommended implementation for going through the SICP exercises). On Ubuntu it comes with a symbolic link called "scheme" which is what Emacs is looking for. You can download it for MacOS X here.

Mark A. Nicolosi
Worked like a charm following the instructions on the linked page. Thanks!
Lawrence Johnston
No problem. Glad it worked out for you.
Mark A. Nicolosi
+4  A: 

Even though it doesn't run inside emacs, you might want to consider running PLT Scheme, which is a world-class programming environment for Scheme and which has been designed with lots of tools to help people learn Scheme. Since you're fairly new to emacs it's probably worth the switch. (And check out the PLT Schemers' book, How to Design Programs.)

Norman Ramsey
I've been using PLT Scheme as I work through SICP, on both my Linux box at work, and my Mac OS X box at home. It is one of the few cases where I'd recommend a standalone IDE over Emacs tools.
Don Wakefield
+3  A: 

M-x customize-group, then tell it you want to customize scheme. Wander down the page a bit and you'll see "Scheme Program Name", which you can change if your scheme interpreter isn't called scheme.

You may also find Quack useful - http://www.neilvandyke.org/quack/

Cos
+3  A: 

Look for description of cmuscheme package bundled with Emacs - it provide code evaluation, etc. Quack is also very useful

P.S. i plan to upload (during next 2 days) to my site a second part of article about "Emacs as IDE", that will describe Scheme support in Emacs

Alex Ott
+3  A: 

I was in your position back in November. I finally got it working and wrote myself directions. Ironically, yesterday I decided to post it as my first article on my website. It's directions for setting up Scheme within Ubuntu, but it might be a handy reference in case you get stuck with something. If nothing else, someone else might find this question and find it useful. Hope it helps.

Saterus