[Slime-devel] Adding to Swank Load-Path

Samuel Freilich sfreilich at google.com
Fri Aug 1 16:49:19 UTC 2014


Loading a Slime module defined with define-slime-contribs will load its
slime-dependencies from anywhere in the Emacs load-path.  Swank, however,
has its own load-path, so modules with Swank contrib dependencies don't
work if they're in a non-default location.

For example, if I have a module containing:
(require 'slime)

(define-slime-contrib my-slime-module
  "My custom Slime module"
  (:swank-dependencies my-swank-module))

(provides 'my-slime-module)

Then running the following will fail if that module is anywhere other than
the default SLIME directory:
(require 'my-slime-module)
(slime-setup '(my-slime-module))

I've seen two work-arounds, neither of them ideal:
1. Put something in ~/.swank.lisp to modify swank::*load-path*.  (That
works, but requires more setup and I have to change it if I'm loading from
a different directory.)
2. Leave out that dependency from :swank-dependencies and add a hook to
'slime-connected-hook (called after slime-load-contribs) that calls
slime-load-file.  (That works, but is quite messy.)

Is there a supported way for adding directories to the Swank load-path from
SLIME?  Should define-slime-contrib have a :swank-paths parameter or
something?

Peace,
-Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20140801/f832c131/attachment.html>


More information about the slime-devel mailing list