[slime-devel] M-. can't find definitions

Peter Keller psilord at cs.wisc.edu
Thu Mar 24 16:44:03 UTC 2011


On Thu, Mar 24, 2011 at 08:08:40AM +0100, Helmut Eller wrote:
> * Peter Keller [2011-03-24 00:43] writes:
> 
> > Hello,
> >
> > I'm a relatively new emacs and SLIME (for lisp) user. I have set up a
> > checked out version (as of a day ago) of SLIME in my emacs and it seems
> > to be working well.
> >
> > However, whenever I use M-. to go to the definition of anything, I get:
> >
> > "No known definition for: <thing-at-point> (in <package-name>)"
> >
> > in the minibuffer.
> >
> > How can I fix this? I don't understand what I have to do to make this work.
> 
> M-. takes a symbol, fetches the corresponding function and looks into
> the debug info of that function.  The debug info usually contains the
> source file and position in some implementation specific format.
> Finding the source location of classes or variables works a bit
> differently but the idea is the same: the compiler has to record the
> source location somewhere.  If you use an implementation that doesn't
> record source locations (e.g. CLisp) or if the debug info is stripped
> (as in Allegro) then M-. will not work well.
> 
> If you use an implementation like CCL/SBCL/CMUCL then it should work,
> at least for compiled functions and those loaded from fasl files.
> 
> I can't give a better answer unless you provide enough details to
> reproduce your problem.

I'm using SBCL 1.0.46.

I also found out the conditions under which my problem happens. 

Often when I develop Lisp I have emacs open and then a few other terminals
(not in emacs, but in xterm) with an SBCL repl in them. Even though I
have a CL-USER> prompt in slime, I often don't use it. This is because I
hack on a distributed project and it is easier to manage the lisp images
if they are seperate (or end up in ldb, or other terrible thing).

So, it was my understanding (incorrect) that the very act of visiting
files would allow M-. and M-, to function. I've found that is not true. I
actually have to load/require/etc the project into the SLIME repl. Upon
doing this the M-. functionality starts working. This isn't mentioned
in the SLIME manual, or if it is, not in an obvious place.

I have it definitely working for compiled functions, but not macros. Would
I have to integrate etags somehow in order to get the rest of the
functionality?

Thank you.

-pete







More information about the slime-devel mailing list