[slime-devel] setting a different initial package in the REPL

Hello, I am starting Slime with a custom SBCL image, in which my code is all contained in a CL package which I have defined. So I would like the initial Slime REPL to open not in the CL-USER package, but in another one. I suppose I should use SLIME-REPL-SET-PACKAGE somehow, but where exactly should I put it? So far I haven't been able to obtain the desired effect. thanks, Giovanni

I've changed the initial package of slime repl by putting in .emacs: (setq slime-lisp-implementations '((sbcl ("/usr/local/bin/sbcl" "--core" "/path/to/my.core" "--eval" "(in-package :my-package)"))) (setq slime-default-lisp 'sbcl) Now when slime starts, the forms I type are correctly evaluated in my-package, and the repl prompt reflects this. However, the symbol completion (I use slime-c-p-c via slime-fancy) still does not consider the symbols in my-package, until I "M-x slime-repl-set-package" manually. Is there a way to fix this? Giovanni

* Giovanni Gigante [2010-08-17 20:01] writes:
I've changed the initial package of slime repl by putting in .emacs:
(setq slime-lisp-implementations '((sbcl ("/usr/local/bin/sbcl" "--core" "/path/to/my.core" "--eval" "(in-package :my-package)"))) (setq slime-default-lisp 'sbcl)
Now when slime starts, the forms I type are correctly evaluated in my-package, and the repl prompt reflects this. However, the symbol completion (I use slime-c-p-c via slime-fancy) still does not consider the symbols in my-package, until I "M-x slime-repl-set-package" manually. Is there a way to fix this?
You can try to specify a function: (setq slime-lisp-implementations '((sbcl ("sbcl") :init-function (lambda () (slime-cd "...some useful place...") (slime-repl-set-package "mypackage"))))) Helmut
participants (2)
-
Giovanni Gigante
-
Helmut Eller