<div dir="ltr">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.<div>

<br></div><div>For example, if I have a module containing:</div><div><font face="courier new, monospace">(require 'slime)</font></div><div><font face="courier new, monospace"><br></font></div><div><div><font face="courier new, monospace">(define-slime-contrib my-slime-module</font></div>

<div><font face="courier new, monospace">  "My custom Slime module"</font></div><div><font face="courier new, monospace">  (:swank-dependencies my-swank-module))<br></font></div></div><div><font face="courier new, monospace"><br>

</font></div><div><font face="courier new, monospace">(provides 'my-slime-module)</font></div><div><br></div><div>Then running the following will fail if that module is anywhere other than the default SLIME directory:</div>

<div><font face="courier new, monospace">(require 'my-slime-module)</font></div><div><font face="courier new, monospace">(slime-setup '(my-slime-module))</font></div><div><font face="arial, helvetica, sans-serif"><br>

</font></div><div>I've seen two work-arounds, neither of them ideal:</div><div>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.)</div>

<div>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.)<br></div><div><br></div>

<div>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?</div><div><br></div><div>Peace,</div><div>-Sam</div></div>