本文介绍了粘液连接不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Emacs和Common Lisp的新手.我已经在我的Emacs中成功安装了SLIME,但是无法运行它. + slime-connect给出以下选项,接受则给出粘贴在选项下方的错误.

I am an Emacs and Common Lisp novice. I have successfully installed SLIME in my Emacs, but I am unable to run it. + slime-connect gives the following options, accepting which gives the error pasted below the options.

Host: 127.0.0.1
Port: 4005

Connecting to Swank on port 4005...
make client process failed: connection refused, :name, SLIME Lisp, :buffer, nil,
                                                :host, 127.0.0.1, :service 4005,
                                                :nowait, nil

我如何使它工作?

推荐答案

  1. 修复空白-用双反斜杠将其转义.

  1. to fix the whitespace - escape it with double backward slash.

当您执行slime-connect时,它将期望Lisp映像(Lisp运行时)启动并在您连接到的服务器和端口上进行监听.可能你不是故意的.

When you do slime-connect it will expect a Lisp image (Lisp runtime) to be up and listening on the server and port you connect to. Probably you didn't mean it.

slime将首先启动inferior-lisp-program,然后连接到它.实际上,这就是您要执行的操作.

slime will first launch inferior-lisp-program, and then connect to it. This is what you want to do, actually.

https://github.com/quicklisp/quicklisp-slime-helper 此是您可能想尝试的事情(完成设置后,或者改为进行设置).或者只是保留它,让您在进行更多设置时感到更自在.链接中的程序是一个帮助程序,它可以通过quicklisp(您可能想熟悉的东西),一种用于Lisp代码的程序包管理器以及您在Emacs中运行的SLIME来工作.可能的话,如果您发现

https://github.com/quicklisp/quicklisp-slime-helper this is something you might want to try (when you are done with the setup, or instead). Or just keep it for the time you feel more comfortable with more setup. The program in the link is a helper, that works through quicklisp - something you might want to get familiar with, a kind of package manager for Lisp code, and SLIME you run in Emacs. Possibly, if you will find that it is easier for you to

  • 首先安装所需的Lisp.

  • first install the Lisp you want.

安装quicklisp. (请按照此处的说明进行操作: http://www.quicklisp.org/beta/,对于Windows,您可以使用Cygwin,也可以使用curl代替,只需在链接上单击鼠标右键,然后将目标另存为"伏都教魔术:).如果您不使用SBCL,那么--load可能不是您的Lisp的选择.替换为以下内容:启动Lisp,键入REPL:(load "quicklisp.lisp"),条件是当前的工作目录是保存quicklisp.lisp文件的目录.要打印当前目录(如果不确定):(directory ".").

install quicklisp. (follow the instructions here: http://www.quicklisp.org/beta/ with the exception that for Windows you might either use Cygwin, or instead of curl, just right-click on the link and do the "save target as" voodoo magic :). If you don't use SBCL, then --load may not be an option for your lisp. Replace it with something like: start your Lisp, type into REPL: (load "quicklisp.lisp"), provided your current working directory is the one where you saved the quicklisp.lisp file. To print out the current directory, if not sure: (directory ".").

阅读quicklisp-slime-helper的自述文件,并按照其中的说明进行操作.基本上,通过quicklisp安装后只需配置一件事,就是:

Read the README for quicklisp-slime-helper and follow the instructions in it. Basically, there's only one thing you want to configure after you install it via quicklisp, it is:

(加载"c:/full-path-to/quicklisp/slime-helper.el")

(load "c:/full-path-to/quicklisp/slime-helper.el")

.emacs文件中.

in the .emacs file.

如果您不熟悉* nix路径名,则tilde表示当前用户的主目录(也称为$HOME),您可能在安装Emacs时将其设置为环境变量.请注意,quicklisp-slime-helperslime软件包是互斥的(它是同一个软件包,只是包装不同),所以如果您有类似的内容:

If you aren't familiar with *nix path names, tilde means the current user's home directory, aka $HOME, you probably set it up as an environment variable when you installed Emacs. Note that quicklisp-slime-helper and slime packages are mutually exclusive (it's the same package, just wrapped differently), so if you have something like:

(add-to-list 'load-path "/path/to/slime")
(require 'slime)

然后,如果要使用quicklisp-slime-helper,请注释掉它,并仅使用其中之一的配置.

Then, if you want to use the quicklisp-slime-helper, comment that away, and use only the configuration for one of them.

PS. Re'

(add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t)))

这看起来很多余,您为什么需要那个/那是什么?您从哪里获得inferior-slime-mode?这对我来说似乎并不熟悉.如果将点(插入符号)放在其上并按,会发生什么?

This looks redundant, why do you need that / what is that? Where did you get inferior-slime-mode? That's something that doesn't look familiar to me. What happens if you position the point (caret) on it and hit ?

这篇关于粘液连接不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 19:21