Hi,
I was wondering if it is possible to have the Lisp code of Slime contribs in multiple directories. So, I have the official ones in /usr/share/common-lisp/source/slime/ and I would like to, e.g. have the slime-hello-world [1] somewhere else.
I tried to push the path to the asdf:*central-registry* and also setting *default-pathname-defaults* in .sbclrc and even starting a swank server with swank-loader::*source-directory* correctly set up, but then the problem is that the *source-directory* is not a list and the path to the default contribs gets lost...
So, currently my .sbclrc looks like this:
(require :asdf) (pushnew #p"/path/to/slime-hello-world/" asdf:*central-registry* :test #'equal)
And when I M-x slime, swank still can't find the slime-hello-world Lisp part. Any ideas?
Thanks! Gaya
Ok, nevermind, in the current implementation it seems that asdf is not used for loading swank contribs at all and *default-pathname-defaults* is also ignored in favor of the swank-loader::*source-directory*. So, I guess, what I want is currently impossible, I'll just have to try to keep my CL contribs in the same directory.
Cheers, Gaya
On Mon, Apr 28, 2014 at 12:43 PM, Gayane Kazhoyan gayanek@gmail.com wrote:
Hi,
I was wondering if it is possible to have the Lisp code of Slime contribs in multiple directories. So, I have the official ones in /usr/share/common-lisp/source/slime/ and I would like to, e.g. have the slime-hello-world [1] somewhere else.
I tried to push the path to the asdf:*central-registry* and also setting *default-pathname-defaults* in .sbclrc and even starting a swank server with swank-loader::*source-directory* correctly set up, but then the problem is that the *source-directory* is not a list and the path to the default contribs gets lost...
So, currently my .sbclrc looks like this:
(require :asdf) (pushnew #p"/path/to/slime-hello-world/" asdf:*central-registry* :test #'equal)
And when I M-x slime, swank still can't find the slime-hello-world Lisp part. Any ideas?
Thanks! Gaya
On Mon, Apr 28, 2014 at 3:57 PM, Gayane Kazhoyan gayanek@gmail.com wrote:
So, I guess, what I want is currently impossible, I'll just have to try to keep my CL contribs in the same directory.
It's almost possible, but the slime-hello-world example is designed to work with the code in the "choose-swank-loading-method" branch, which isn't merged into the trunk yet.
This branch is close to it's final state it's just waiting for a review and some testing, and this is where you can help.
You should be able to:
(add-to-list 'load-path "/path/to/slime-hello-world") (add-to-list 'slime-contribs 'slime-hello-world)
and then
M-x slime
It should also work if you M-x slime-connect to some running lisp. And it should even work if, after setting up `slime-contribs', you call M-x slime-setup with some lisps already running.
If it doesn't, be sure to add a comment to https://github.com/slime/slime/pull/83.
Notice also that the code in should work with or without ASDF, but it does prefer ASDF for loading swank, if it finds it.
Another advantage is that if you don't want lisp code for a particular contrib, you can just ensure it's not in your Emacs's slime-contribs variable. swank-asdf.lisp, for example, is sometimes hard to control and will annoyingly kill the lisp with little warning if your asdf is not the right version.
João