[slime-devel] Slime and the default pathname basic question

Stas Boukarev stassats at gmail.com
Fri Jun 24 14:36:57 UTC 2011


Matus Kmit <simply.nitaai at gmail.com> writes:

> Hi everybody
>
> i have some basic slime/lisp question.
>
> Normally if i start lisp from the command line in a particular
> directory, this directory is set as the default path in the lisp
> interpreter. So i can load any other file in the same directory simple
> by (load "filename").
>
> In emacs slime, as soon as i start the slime-mode the default path is
> set to my linux home directory (i checked it in
> *default-pathname-defaults*).
>
> So my question is, what is the most straightforward method to set up
> slime (or lisp, or my lisp file) in such a way, that the default path
> is set to the currently loaded file?
Processes started by emacs inherit current directory from the buffers
from which they were created. So, if you were in a buffer with your
"filename.lisp", and then did M-x slime, the lisp will be started in the
directory of that file.

Alternatively, you can change directory (and package) by doing C-c ~
while in the buffer with the file to which directory you want to change.

And if you just want to load files, you can do C-c C-l (or rather C-c
C-k, with compilation), to load the file in the current buffer.

-- 
With best regards, Stas.




More information about the slime-devel mailing list