Re: Adding to Swank Load-Path

Helmut Eller <[email protected]>
Newsgroups gmane.lisp.slime.devel
Message-ID <[email protected]>
On Fri, Aug 01 2014, Samuel Freilich wrote:

[...]
> 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?

No; nothing that I know of.  1. doesn't sound so bad to me.

> Should define-slime-contrib have a :swank-paths parameter or
> something?

Something like

 (define-slime-contrib foo
    (:swank-dependencies (bar "/path1/bar.lisp")))

that passes 'bar and "/path1/bar.lisp" to swank:swank-require would be
easy to implement.

Not sure if it's worth it, though.  Especially as some people want to
get rid of swank:swank-require and replace everything with ASDF.

Helmut
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.