I recently got into Scheme through Racket and I now want to use Chicken Scheme. Emacs seems to be pretty much the only option I have for developping in Scheme other than Racket so I boot up Emacs which I am not very good at.
I had previously set up emacs for SBCL using this tutorial, but I am really not experienced with Emacs at all. (Note: I am on windows)
What I did:
I set up a unix-like file structure like the tutorial above described, and I installed Chicken-Scheme in Z:\home\myname\bin\chicken-iup
I tried following the instructions on this page but there wasn't really much. It says I need quack but doesn't explain a lot, I just downloaded quack.el from the site and put it in my site-lisp folder
I added the following lines to my .emacs folder
(setq scheme-program-name "csi -:c") (require 'quack)
On the page linked previously, there is this snapshot, which is what I want to get to
You can see at the top there is a file open to write text and the REPL at the bottom, however, when I open emacs and do M-x run-scheme, I can't get that
I have two choices, M-x run-scheme and then "chicken" gives me the Chicken intro screen but immediately says "process finished"
On the other hand, M-x run-scheme csi just gives me a blank buffer with seemingly no REPL
Running csi.exe directly in windows opens a console window with the intro text and the repl, but I want to have it in emacs like the first snapshot, which doesn't work
I've also tried chicken-slime SWANK backend but couldn't get it to work and searching google doesn't yield much help
So, does someone know what I need to do to be able to develop in Chicken Scheme in emacs
(Alternatively, if there are other Scheme environments for development outside of DrRacket I'd be interested to know, I haven't found much info apart from DrRacket or Emacs)
Thanks in advance
It's odd that M-x run-scheme
is prompting you for a Scheme interpreter.
Normally, (setq scheme-program-name "csi -:c")
should define which Scheme program to use with run-scheme
. But perhaps Quack overrides run-scheme
, which means it wouldn't use scheme-program-name
(it's under "built-in support", and indeed the standard Scheme-mode will use this). I'm not a fan of Quack, but you could try typing "csi -:c" instead of plain "csi". Like the manual says,
The -:c is to force interactive mode, which is required on some platforms (most notably Windows).
Because Emacs can't fake a console on Windows like it can on *nix, CHICKEN thinks it's reading from a pipe on stdin, so it won't show you a prompt.
Like I said, I'm not a fan of Quack; AFAIK it doesn't add anything except "fancy lambda" and a large help menu (but I never use the menu in Emacs). I'd rather start by just removing (require 'quack)
from your .emacs
(keeping the (setq scheme-program-name)
), and restart Emacs, then type M-x run-scheme
to see what happens.