Samium Gromoff _deepfire@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")))