[slime-devel] Re: Error handling missed in favor of next swank request

Marco Baringer mb at bese.it
Sun Apr 8 14:16:14 UTC 2007


Samium Gromoff <_deepfire at feelingofgreen.ru> writes:

> What i see here looks like a swank request which results in a lisp error
> signalled, does not cause entrance into the debugger in the context of that
> request, but rather causes a next request to be served, for some obscure
> reason.
>
> the .emacs snippet i invoke looks like that:
>
> (defun foo ()
>   (interactive)
>   (slime-start :program "sbcl" :init-function (lambda ()
> 						(cd "/some/where/")
> 						(slime-load-file "package.lisp")
> 						(slime-repl-set-package ":lispdb"))))
>
> I.e, we're talking about two swank requests here -- load-file, and then, once
> that completes, repl-set-package.

slime-load-file is an asynchronous request (as it should be). you need
to wait until the file is done loading, and therefore the package
exists, before continuing.

you could use something like this to have the call block until the
loading is done (though this will block emacs as well): [totally
untested]

(slime-eval-with-transcript  `(swank:load-file ,"package.lisp")
                             (lambda (value)
                               (slime-repl-set-package ":lispdb")))

-- 
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen




More information about the slime-devel mailing list