emacs lisp will not start

匿名 (未验证) 提交于 2019-12-03 00:59:01

问题:

I am trying to setup the slime mode in emacs for using common lisp. When I attemp to start slime with M-x slime I get an error message saying:

process inferior-lisp not running.

So, I checked the value of the variable inferior-lisp-program which turned out to be "/opt/sbcl/bin/sbcl". sbcl is an acronym for an implementation of common lisp known as steel bank common lisp. Note that this variable is defined in file slime.el. As I do not have sbcl (the previous directory does not even exist on my machine) installed on my machine (which runs os x 10.8.3) this will not work.

I have the clisp implementation which is located in the directory: /opt/local/bin/. I tried to change the value of the variable inferior-lisp-program by:

(setq inferior-lisp-program '/opt/local/bin/clisp/)

However, this did not work and I do not know what else to try.

  1. How can I get inferior-lisp to run and hence get slime to work?

EDIT: Here is some extra information I believe that could be helpful. If I try to just start common lisp in emacs by executing M-x run-lisp I get the following output from emacs:

(progn (load "/Users/s2s2/.emacs.d/slime/swank-loader.lisp" :verbose t) (funcall \ (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-s\ erver") "/var/folders/wf/yjgymt8j14v2tqwjnny68wq00000gn/T/slime.28222"))            Can't exec program: /opt/sbcl/bin/sbcl                                              Process inferior-lisp exited abnormally with code 1                                Can't exec program: /opt/sbcl/bin/sbcl                                              Process inferior-lisp exited abnormally with code 1 

Hope this helps! All help is greatly appreciated!

回答1:

The variable slime-lisp-implementations has higher priority than inferior-lisp-program for slime if set; try this instead (adjust parameters accordingly):

(setq slime-lisp-implementations       '((clisp ("/opt/local/bin/clisp" "-q -I"))         (sbcl  ("/usr/local/bin/sbcl") :coding-system utf-8-unix))) 


回答2:

The first thing to try is to run the command in a regular shell window - just type or copy and paste the executable path there and see what bash tells you:

$ sbcl < /dev/null bash: sbcl: command not found $ clisp < /dev/null <<clisp splash screen>> $ which clisp /usr/bin/clisp 

Once you find out what the correct executable is, you set inferior-lisp to it:

(setq inferior-lisp "/usr/bin/clisp") 

Notes:

  1. It should be a string, not a symbol, so you need the quotes ".
  2. It should point to a file, not a directory, so your trailing slash / is wrong


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!