Greetings:
I wanted to fool around with slime to learn lisp. I am caught in a dilemma like which came first the chicken or the egg. Right now the contents of slime.el is unfathonable to me because I am not familiar with the list syntacs. It looks like I am unable to launch swank because a path spec may be in error. I am sorry to bother you with this request but I am hoping someone will take pity on me and give me a little advise. Thanks
BACKGROUND
When I enter "M-x slime" in emacs, the following message appears:
apply: Specified program for new process is a directory
Emacs:
GNU Emacs 21.3.50.2 (powerpc-apple-darwin7.0.0) of 2003-11-14 on marx.local
Snippit from .emacs
(setq inferior-lisp-program
"/Applications/Emacs.app/Contents/Resources/share/emacs/21.3.50/lisp") (add-to-list 'load-path "/Users/robo2/Lisp/slime") (require 'slime) (add-hook 'lisp-mode-hook (lambda () (slime-mode t))) (add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t)))
OpenMCL:
Welcome to OpenMCL Version (Beta: Darwin) 0.14.1-p1!
Command "openmcl" launches interpreter.
Slime:
robo2:~/lisp/slime/CVS robo2$ less Entries
/ChangeLog/1.343/Wed Apr 21 22:58:34 2004// /HACKING/1.5/Mon Mar 29 00:59:38 2004// /README/1.9/Tue Nov 25 00:22:36 2003// /hyperspec.el/1.2/Thu Dec 4 16:42:53 2003// /metering.lisp/1.1/Wed Feb 18 07:25:38 2004// /nregex.lisp/1.1/Wed Apr 21 18:55:24 2004// /slime.el/1.271/Wed Apr 21 22:59:04 2004// /swank-allegro.lisp/1.29/Wed Apr 7 16:35:20 2004// /swank-backend.lisp/1.43/Wed Apr 14 18:50:36 2004// /swank-clisp.lisp/1.29/Tue Apr 6 10:42:53 2004// /swank-cmucl.lisp/1.97/Wed Apr 21 19:46:40 2004// /swank-gray.lisp/1.5/Tue Mar 9 19:35:36 2004// /swank-lispworks.lisp/1.38/Sat Mar 27 21:17:36 2004// /swank-loader.lisp/1.21/Wed Apr 21 18:56:42 2004// /swank-openmcl.lisp/1.72/Tue Apr 6 10:42:53 2004// /swank-sbcl.lisp/1.83/Tue Apr 6 10:42:53 2004// /swank-source-path-parser.lisp/1.5/Mon Mar 29 17:49:38 2004// /swank.asd/1.2/Thu Jan 22 00:10:39 2004// /swank.lisp/1.170/Wed Apr 21 21:51:23 2004// /test-all.sh/1.1/Tue Mar 9 20:12:43 2004// /test.sh/1.6/Sat Jan 31 11:50:25 2004// /xref.lisp/1.1/Fri Jan 2 08:17:15 2004//
System:
Mac OS X v 10.3.3 -- Dual 2 GHz PowerPC G5
jsdey@optonline.net writes:
Snippit from .emacs
(setq inferior-lisp-program "/Applications/Emacs.app/Contents/Resources/share/emacs/21.3.50/lisp")
this should be the path to openmcl, not emacs' lisp directory. For example here is the relevant part of my .emacs (macos x 10.2):
[this contains more than you need, but i figure it can't hurt.]
(add-to-list 'load-path "/Users/mb/lisp/slime/")
(setq browse-url-browser-function (lambda (url &optional new-window) (message url) (do-applescript (concat "tell application "Safari" to open location "" url """))))
(setq common-lisp-hyperspec-root "file:///Users/mb/lisp/HyperSpec-4-0/HyperSpec/" common-lisp-hyperspec-symbol-table "/Users/mb/lisp/HyperSpec-4-0/HyperSpec/Data/Symbol-Table.text" cltl2-root-url "file:///Users/mb/lisp/info/cltl")
(require 'slime)
(setf lisp-indent-function 'common-lisp-indent-function)
;; NB: this is the path to the openmcl executable (setf inferior-lisp-program "/Users/mb/bin/openmcl")
System:
Mac OS X v 10.3.3 -- Dual 2 GHz PowerPC G5
lucky you :)
Marco Baringer mb@bese.it writes:
I have a quick pair of questions.
(setq common-lisp-hyperspec-root "file:///Users/mb/lisp/HyperSpec-4-0/HyperSpec/" common-lisp-hyperspec-symbol-table "/Users/mb/lisp/HyperSpec-4-0/HyperSpec/Data/Symbol-Table.text" cltl2-root-url "file:///Users/mb/lisp/info/cltl")
Why does common-lisp-hyperspec-symbol-table get set? Isn't that in the same place in copies of the hyperspec? Would there be an advantage to me setting it?
And, I missed CLtL2 in the slime docs. I'll have to check that out. Is there a hot key for it? I just happen to have CLtL2 installed in a very similar location on my system. How often do you use that over the hyperspec?
I guess that's a large value of 2 ;-)
FYI, there is a hyperspec 6.0. I don't know what gets updated, but you can find it here:
ftp://ftp.xanalys.com/pub/software_tools/reference/HyperSpec-6-0.tar.gz
On 22 Apr 2004 15:59:39 -0400, David Steuber david@david-steuber.com wrote:
Why does common-lisp-hyperspec-symbol-table get set?
I introduced this when Xanalys changed the file names (I think when they transitioned from 4 to 5) so the hard-coded mapping in hyperspec.el didn't work anymore (or rather only for older versions). With the help of the symbol table Emacs can figure out the correct file names dynamically when hyperspec.el is loaded.
Isn't that in the same place in copies of the hyperspec?
I don't know. Probably not. Try
http://www.lisp.org/HyperSpec/Data/Map_Sym.txt
Would there be an advantage to me setting it?
No. If it works now than leave it as it is. Actually, when it's not set Emacs should start several microseconds faster... :)
Cheers, Edi.
Hi Marco:
Thanks you and the others for responding. I used the elisp code you send changing paths and file to agree with my system and things are beginning to work. It looks like the swank server is not running (I didn't see it -- ps aux ). Thanks for the assistance and any further comments/guidance will be greatly appreciated.
DETAILS
Here is my code now in .emacs (see 2 comments:
;;; SLIME & OpenMCL (add-to-list 'load-path "/Users/robo2/Lisp/slime/") (setq browse-url-browser-function (lambda (url &optional new-window) (message url) (do-applescript (concat "tell application "Safari" to open location "" url """))))
(setq common-lisp-hyperspec-root "file:///Users/robo2/Lisp/HyperSpec-6-0/HyperSpec/" common-lisp-hyperspec-symbol-table "/Users/robo2/Lisp/HyperSpec-6-0/HyperSpec/Data/Map_Sym.txt" ;; Your file was Symbol-Table.text cltl2-root-url "file:///Users/mb/lisp/info/cltl") ; I don't have anything equivalent to this
(require 'slime)
(setf lisp-indent-function 'common-lisp-indent-function)
;; NB: this is the path to the openmcl executable (setf inferior-lisp-program "/Users/robo2/Lisp/ccl/openmcl")
My emacs screen looks like this after "M-x slime":
Welcome to OpenMCL Version (Beta: Darwin) 0.14.1-p1! ? ;; Compiling /Users/robo2/Lisp/slime/swank-openmcl.lisp... ; Warning: Interface file #4P"ccl:darwin-headers;libc;functions.cdb" does not exist. ; While executing: CCL::CDB-OPEN Read error between positions 6424 and 6539 in /Users/robo2/Lisp/slime/swank-openmcl.lisp.
Error in process listener(1): Foreign function not found: OS::|tmpnam| While executing: CCL::LOAD-EXTERNAL-FUNCTION Type :POP to abort.
Type :? for other options. 1 >
The Messages buffer indicates:
Polling "/tmp/slime.1203".. (Abort with `M-x slime-connection-abort'.) [187 times]
On Apr 22, 2004, at 11:25 AM, Marco Baringer wrote:
-- -Marco Ring the bells that still can ring. Forget your perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen
jsdey@optonline.net writes:
[snip]
;; Compiling /Users/robo2/Lisp/slime/swank-openmcl.lisp... ; Warning: Interface file #4P"ccl:darwin-headers;libc;functions.cdb" does not exist. ; While executing: CCL::CDB-OPEN Read error between positions 6424 and 6539 in /Users/robo2/Lisp/slime/swank-openmcl.lisp.
Error in process listener(1): Foreign function not found: OS::|tmpnam| While executing: CCL::LOAD-EXTERNAL-FUNCTION Type :POP to abort.
Type :? for other options. 1 >
It seems that your OpenMCL installation is not quite complete. You also need the "cdb" files. The cdb files contain the prototypes of many common C functions and SWANK needs some of those. See also http://clozure.com/pipermail/openmcl-devel/2004-February/001424.html
To test that the cdb files just type
(#_getpid)
into OpenMCL (without Emacs). This should return the process id. If something is wrong with your setup, you will get an error message as above.
Helmut.
Hi Helmut:
After installing the missing programs, things appear to be working. The message line says: Connected on port 49841. John, this could be the start of a beautiful program. You guys are expecting a lot from me. I will do some more testing this weekend and thanks for the support and exquisite program.
Regards, John On Apr 23, 2004, at 2:27 AM, Helmut Eller wrote:
jsdey@optonline.net writes:
[snip]
;; Compiling /Users/robo2/Lisp/slime/swank-openmcl.lisp... ; Warning: Interface file #4P"ccl:darwin-headers;libc;functions.cdb" does not exist. ; While executing: CCL::CDB-OPEN Read error between positions 6424 and 6539 in /Users/robo2/Lisp/slime/swank-openmcl.lisp.
Error in process listener(1): Foreign function not found: OS::|tmpnam| While executing: CCL::LOAD-EXTERNAL-FUNCTION Type :POP to abort.
Type :? for other options. 1 >
It seems that your OpenMCL installation is not quite complete. You also need the "cdb" files. The cdb files contain the prototypes of many common C functions and SWANK needs some of those. See also http://clozure.com/pipermail/openmcl-devel/2004-February/001424.html
To test that the cdb files just type
(#_getpid)
into OpenMCL (without Emacs). This should return the process id. If something is wrong with your setup, you will get an error message as above.
Helmut.
On Thu, 22 Apr 2004 10:58:55 -0400, jsdey@optonline.net wrote:
(setq inferior-lisp-program "/Applications/Emacs.app/Contents/Resources/share/emacs/21.3.50/lisp")
You're supposed to name a Common Lisp compiler here but you specified the directory where Emacs stores (some of) its Emacs Lisp files.
SLIME is intended to provide (from within Emacs) an integrated development environment for Common Lisp systems. Note that Emacs Lisp (the language most of Emacs is written in) and Common Lisp are two very different dialects of Lisp.
You should install a Common Lisp compiler first. As you're on OS X you should try OpenMCL or SBCL, both open source, or a commercial trial version from Franz or Xanalys. All these should work with SLIME.
http://openmcl.clozure.com/ http://sbcl.sf.net/
HTH, Edi.
jsdey@optonline.net writes:
(setq inferior-lisp-program "/Applications/Emacs.app/Contents/Resources/share/emacs/21.3.50/lisp")
This is the problem. It should be set to whatever openmcl's command is. The value it is set to right now is the directory of Emacs's lisp files. Take a look at
http://www.david-steuber.com/~david/Lisp/OSX/
for some tips on using slime and OpenMCL.