From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Understanding slime and swank Date: Sun, 07 Mar 2010 17:24:28 +1100 Organization: Unlimited download news at news.astraweb.com Message-ID: <874okstzs3.fsf@rapttech.com.au> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1272990141 5018 80.91.229.12 (4 May 2010 16:22:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 May 2010 16:22:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 04 18:22:19 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O9Ksz-0005TP-Jm for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2010 18:22:17 +0200 Original-Received: from localhost ([127.0.0.1]:52037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9Kst-00010s-QZ for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2010 12:22:11 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!216.196.98.150.MISMATCH!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.astraweb.com!border2.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.93 (gnu/linux) Cancel-Lock: sha1:cG7Y20CoCptlxpFeLz+gj7MhR1w= Original-Lines: 109 Original-NNTP-Posting-Host: 2b1dc460.news.astraweb.com Original-X-Trace: DXC=`4QfU]3cegPW]I=Ra]NaiPL?0kYOcDh@Z3E5>gaGjiF^iC3FjkdYZlSaCb3`j`aPhYdYIkFWm`LbP X-Original-Bytes: 5194 Original-Xref: usenet.stanford.edu gnu.emacs.help:177387 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:72923 Archived-At: Andrea Crotti writes: > Eric Abrahamsen writes: > >> On Mar 2, 2010, at 9:40 PM, Andrea Crotti wrote: >> Are you looking for slime-lisp-implementations? The example from the >> docs looks like this: >> >> (setq slime-lisp-implementations >> '((cmucl ("cmucl" "-quiet")) >> (sbcl ("/opt/sbcl/bin/sbcl") :coding-system utf-8-unix))) >> >> The one at top will be default, I think you run slime with a prefix >> arg to autocomplete choose from different implementations. >> > > mm no I didn't mean that... > I would like to use this: > http://github.com/jochu/swank-clojure > > And also switch to other lisp implementations. > It's not very clear how I should do, they also say to add this > (add-to-list 'slime-lisp-implementations '(sbcl ("sbcl"))) > > But now again is only sbcl working, also prefixing M-x slime. > > Before only loading "swank-clojure" was enough to make it working... > > I just would like to understand more or less how swank-slime work and > which variables I should set up.. > Now the conf is > (add-to-list 'Info-default-directory-list "~/.emacs.d/slime/doc/") > > ;; the path should be already set up correctly > (setq inferior-lisp-program "sbcl") > (require 'slime) > (require 'slime-fuzzy) > (slime-setup) > (setq slime-complete-symbol*-fancy t) > (setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol) > > (require 'swank-clojure) > > (add-to-list 'slime-lisp-implementations '(sbcl ("sbcl"))) > > > And I also have the slime.info now but still I can't see the > documentation.. > > Anyway using auto-complete with slime maybe? > Also another problem is that not requiring 'slime-fuzzy didn't find me > the completing function, isn't there any autoloading then? > Thanks > > > First of all, I think its very important to be working with the latest versions of slime. It appears that the slime developers are rather slow when it comes to releasing new stable versions and the current development head has moved on a long way since the last 'stable' release. Secondly, subscribe to the slime dev list. This is the best place to get assistance and advice. Now for my, probably wrong, understanding of how it all works. Essentially, there is an emacs part i.e. slime and a remote 'server' component, swank. The two ends communicate over a socket layer using an agreed protocol. There are two ways of getting things started. The first and most common approach is to start it all from the emacs side. When you do M-x slime, emacs starts an inferior process to run the 'server' implementation i.e. sbcl, cmucl, clojure etc. As part of that process, it tells the server implementation to run the swank package/code, which sets up all the necessary listeners and other bits to allow the slime<->swank communication. This is the bit where I"m not clear on how to get slime to work with both CL and clojure as the way they will be started and the code that needs to be loaded will be different. For all CL implementations, its just load and run swank.lisp. However, once you add in a java based lang or even scheme, thenn somehow slime will ned to be told what the commands are that it needs to send to the inferior lisp/java process to load the necessary packatge/class and start the top level loop. There is an alternative approach, which may be easier. Slime has the ability to connect and start working with an already running system. This is useful, for example, when you have a CL server app and you want to connect to it without stopping and re-starting it. The basic idea is that you start the swank process when you start your app and have it just listening on the socket. At some later point, you can then start slime and say connect to the swank process running on server x listening on socket y. Maybe this wold be something that could work for you. Just start your clojur or lisp processes independently of emacs and slime. Ensure they load their swank implementation and that all necessary config stuff is set, such as the port and any network/access controls. You should then be able to conect to whatever implementation you want using the slime-connect command. Tim -- tcross (at) rapttech dot com dot au