我以前在这台机器上成功安装了Emacs + SLIME + SBCL。
我试图安装CLISP来解决Lisp" Land of Lisp" CLISP特定的示例。
当我使用CLISP启动SLIME时,它在尝试加载某些SLIME文件时会中断:
*** - OPEN: Directory #P"C:\\Users\\GUSTAV~1.BER\\AppData\\Local\\Temp\\" does not exist
我已在temporary-file-directory
中明确将"C:\\Users\\Gustav.Bertram\\AppData\\Local\\Temp\\"
设置为完全展开的目录(.clisprc.lisp
),并确保变量在发生中断时可用
错误显示后立即回溯:
<1/164> #<SYSTEM-FUNCTION SHOW-STACK> 3
<2/157> #<COMPILED-FUNCTION SYSTEM::PRINT-BACKTRACE>
<3/151> #<COMPILED-FUNCTION SYSTEM::DEBUG-BACKTRACE>
<4/142> #<SYSTEM-FUNCTION SYSTEM::READ-EVAL-PRINT> 2
<5/139> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP-2-3>
<6/135> #<SYSTEM-FUNCTION SYSTEM::SAME-ENV-AS> 2
<7/121> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP-2>
<8/119> #<SYSTEM-FUNCTION SYSTEM::DRIVER>
<9/79> #<COMPILED-FUNCTION SYSTEM::BREAK-LOOP>
<10/76> #<SYSTEM-FUNCTION INVOKE-DEBUGGER> 1
<11/65> #<SYSTEM-FUNCTION OPEN>
<12/57> #<COMPILED-FUNCTION SWANK::ANNOUNCE-SERVER-PORT>
<13/54> #<COMPILED-FUNCTION SWANK::START-SERVER-1>
<14/49> #<COMPILED-FUNCTION SWANK::SETUP-SERVER>
<15/42> #<COMPILED-FUNCTION SWANK:START-SERVER>
<16/40> #<SYSTEM-FUNCTION FUNCALL> 2
[38] EVAL frame for form (FUNCALL (READ-FROM-STRING "swank:start-server") "c:\\Users\\GUSTAV~1.BER\\AppData\\Local\\Temp\\slime.34812")
<17/35> #<SPECIAL-OPERATOR PROGN>
[34] EVAL frame for form
(PROGN
(LOAD "c:\\Users\\Gustav.Bertram\\AppData\\Roaming\\.emacs.d\\elpa\\slime-20170921.1000\\swank-loader.lisp" :VERBOSE T)
(FUNCALL (READ-FROM-STRING "swank-loader:init"))
(FUNCALL (READ-FROM-STRING "swank:start-server") "c:\\Users\\GUSTAV~1.BER\\AppData\\Local\\Temp\\slime.34812"))
Printed 17 frames
如何确定函数调用的来源?
答案 0 :(得分:2)
在堆栈跟踪中,您可以看到CLISP正在评估以下内容:
(PROGN
(LOAD "c:\\Users\\Gustav.Bertram\\AppData\\Roaming\\.emacs.d\\elpa\\slime-20170921.1000\\swank-loader.lisp" :VERBOSE T)
(FUNCALL (READ-FROM-STRING "swank-loader:init"))
(FUNCALL (READ-FROM-STRING "swank:start-server") "c:\\Users\\GUSTAV~1.BER\\AppData\\Local\\Temp\\slime.34812"))
这是Slime在启动它之后传递给Common Lisp以加载Swank并启动服务器进行通信的内容。您可以看到临时文件目录的错误路径在此处作为字符串传递,这意味着必须在Emacs端解析该目录。 Emacs有一个变量temporary-file-directory
,可以在初始化文件中设置,也可以通过customize
设置。