如何让Emacs内部的方案解释器工作?

时间:2021-04-08 20:46:49

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.

我正在经历SICP,我希望有一个类似于交互式Python解释器的翻译,在我看课和阅读书时可以玩。此外,我希望这个解释器在Emacs中运行,这样我就可以在方案代码和交互式解释器等文件之间来回跳转。

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.

但是,我对Emacs相当新,并且还没有能够让它工作或找到一套明确的指令来使它工作。

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.

似乎我应该能够设置它,以便Mx run-scheme将打开一个至少听起来正如我想要的交互式解释器,但此刻这只是返回搜索程序:没有这样的文件或目录,我无法确切地知道我需要在哪些文件中解决这个问题。

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.

我正在运行通过OS X 10.5安装DVD安装的GNU Emacs 22.1.1(mac-apple-darwin,Carbon Version 1.6.0)。

5 个解决方案

#1


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.

您需要安装一个像MIT Scheme这样的Scheme解释器(这是通过SICP练习的推荐实现)。在Ubuntu上它带有一个名为“scheme”的符号链接,这是Emacs正在寻找的。您可以在此处下载MacOS X.

#2


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.

M-x customize-group,然后告诉它你要自定义方案。稍微漫游页面,你会看到“方案程序名称”,如果你的方案解释器没有被称为方案,你可以改变它。

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

您可能还会发现Quack很有用 - http://www.neilvandyke.org/quack/

#3


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.)

尽管它不在emacs中运行,但您可能需要考虑运行PLT Scheme,它是Scheme的世界级编程环境,并且设计了许多工具来帮助人们学习Scheme。由于你是emacs的新手,所以可能值得转换。 (并查看PLT Schemers的书,如何设计程序。)

#4


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

寻找与Emacs捆绑在一起的cmuscheme软件包的描述 - 它提供代码评估等.Quack也非常有用

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

附:我打算(在接下来的两天内)将关于“Emacs as IDE”的文章的第二部分上传到我的网站,这将描述Emacs中的Scheme支持

#5


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.

我在11月回到了你的位置。我终于开始工作并为自己写了指示。具有讽刺意味的是,昨天我决定将它作为我在我网站上的第一篇文章发布。它是在Ubuntu中设置Scheme的方向,但它可能是一个方便的参考,以防你遇到困难。如果没有别的,别人可能会发现这个问题并发现它很有用。希望能帮助到你。

#1


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.

您需要安装一个像MIT Scheme这样的Scheme解释器(这是通过SICP练习的推荐实现)。在Ubuntu上它带有一个名为“scheme”的符号链接,这是Emacs正在寻找的。您可以在此处下载MacOS X.

#2


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.

M-x customize-group,然后告诉它你要自定义方案。稍微漫游页面,你会看到“方案程序名称”,如果你的方案解释器没有被称为方案,你可以改变它。

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

您可能还会发现Quack很有用 - http://www.neilvandyke.org/quack/

#3


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.)

尽管它不在emacs中运行,但您可能需要考虑运行PLT Scheme,它是Scheme的世界级编程环境,并且设计了许多工具来帮助人们学习Scheme。由于你是emacs的新手,所以可能值得转换。 (并查看PLT Schemers的书,如何设计程序。)

#4


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

寻找与Emacs捆绑在一起的cmuscheme软件包的描述 - 它提供代码评估等.Quack也非常有用

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

附:我打算(在接下来的两天内)将关于“Emacs as IDE”的文章的第二部分上传到我的网站,这将描述Emacs中的Scheme支持

#5


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.

我在11月回到了你的位置。我终于开始工作并为自己写了指示。具有讽刺意味的是,昨天我决定将它作为我在我网站上的第一篇文章发布。它是在Ubuntu中设置Scheme的方向,但它可能是一个方便的参考,以防你遇到困难。如果没有别的,别人可能会发现这个问题并发现它很有用。希望能帮助到你。