使用 emacs-slime 加载外部

发布于 2024-12-05 10:55:54 字数 507 浏览 2 评论 0原文

我想在我的 Emacs 23.2.1 上安装 slime。由于Mx slime启动失败,我修改了~/.emacs文件。

(setq inferior-lisp-program "/usr/bin/sbcl")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/slime/")
(require 'slime)
(slime-setup)

当然,这不适用于 ~/.emacs 文件第二行中的 slime 路径,应该是 /usr/share/common-lisp/source/swank 。但是,当我更改此目录后,错误仍然存​​在。它是这样说的:

无法加载“/usr/share/emacs/site-lisp/slime/swank-loader.lisp”:文件确实 不存在。

为什么这个外部负载会保留以及如何使这些事情正确?

I'd like to install slime on my Emacs 23.2.1. Since M-x slime doesn't succeed in start it, I modified the ~/.emacs file.

(setq inferior-lisp-program "/usr/bin/sbcl")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/slime/")
(require 'slime)
(slime-setup)

Of course this doesn't work for the slime path in the second line of ~/.emacs file should be /usr/share/common-lisp/source/swank instead. However, after I changed this directory, the error remains. It says like this:

Couldn't load "/usr/share/emacs/site-lisp/slime/swank-loader.lisp": file does
not exist.

Why would this load external remain and how to make these things right?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

风流物 2024-12-12 10:55:55

帖子位于 LispForum 建议将以下行添加到您的 .emacs:

(slime-setup '(slime-fancy))

错误的解释:

您所看到的是将 REPL 拆分为 contrib 的效果。默认情况下不会加载任何贡献,这有点不幸,因为当前的裸史莱姆功能非常少。

编辑:好的,您使用什么平台、Emacs 和 Slime 版本?我在 Ubuntu 上使用 Emacs 24。我使用 apt-get 安装了 slime。我看到了与您相同的错误:

Couldn't load "/usr/share/emacs/site-lisp/slime/swank-loader.lisp": file does not exist.

我使用 这个答案

接下来要尝试的是 Mx 自定义变量 slime-backend 并将其设置为 swank-loader.lisp 的绝对路径。我认为这肯定会解决它,但我不确定为什么它一开始就不起作用。

我必须将 slime-backend 的值自定义为 /usr/share/common-lisp/source/slime/swank-loader.lisp 才能获得 Mx slime 去工作。

This post on LispForum suggests adding the following line to your .emacs:

(slime-setup '(slime-fancy))

The explanation for the error:

What you are seeing is an effect of splitting REPL into a contrib. No contribs are loaded by default, which is a bit unfortunate, since current bare slime has pretty minimal functionality.

Edit: OK, what platform, Emacs, and Slime version are you using? I'm using Emacs 24 on Ubuntu. I installed slime using apt-get. I was seeing the same error as you:

Couldn't load "/usr/share/emacs/site-lisp/slime/swank-loader.lisp": file does not exist.

I fixed it using the method suggested in this answer:

The next thing to try is M-x customize-variable slime-backend and setting that to the absolute path of swank-loader.lisp. I think that will fix it for sure, but I am not sure why it doesn't work to begin with.

I had to customize the value of slime-backend to /usr/share/common-lisp/source/slime/swank-loader.lisp to get M-x slime to work.

樱娆 2024-12-12 10:55:55

在 debian sid 上周一。 1 月 27 日 22:18 CET - 我必须安装 cl-swank

On debian sid Mon. Jan. 27 22:18 CET - I had to install cl-swank

橪书 2024-12-12 10:55:55

这个错误发生在我身上,它归结为 /etc/emacs/site-start.d 有一个 50slime 文件,没有安装 cl-swank 和 slime 包(在 debian 变体上)

在我的情况下,我已经删除了它们,这样我就可以有更新的史莱姆,所以我刚刚删除了该文件。另一种方法是仅安装软件包(“apt-get install cl-swank slime”)并使用打包版本。

希望对某人有帮助。

This error occurred for me and it boiled down to /etc/emacs/site-start.d having a 50slime file without the cl-swank and slime packages being installed (on a debian variant)

In my case I had removed them so I could have a more current slime, so I just deleted the file. The other way is to just install the packages ("apt-get install cl-swank slime") and use the packaged versions.

Hope that helps someone.

暖伴 2024-12-12 10:55:55

我认为你应该使用 Quicklisp ,它是 Common Lisp 的软件包安装程序。它有一个 slime 包,通常会更新到最新版本。 Quicklisp 网站提供了配置 emacs 和 slime 所需的所有说明。

I think you should use Quicklisp wich is a package installer for Common Lisp. It has a slime package that is usually updated to the most recent version. The Quicklisp web site has all the instructions you'll need to configure emacs and slime.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文