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.
Thank you.
-pete
* 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.
Helmut
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
On the subject of M-., when I use it in SBCL, I get the following in the mode line:
Error: DEFINITION-SOURCE of function FOO did not contain any meaningful information.
Any idea why or how to fix?
-- Scott
* Scott Turner [2011-03-24 17:56] writes:
On the subject of M-., when I use it in SBCL, I get the following in the mode line:
Error: DEFINITION-SOURCE of function FOO did not contain any meaningful information.
Any idea why or how to fix?
That error is signalled in swank-backend::definition-source-for-emacs but the problem is probably in sb-introspect:find-definition-source. Which is SBCL territory and according to the comments at the beginning of that file a no-go zone for outsiders.
Helmut