Quesstion about Alt-. navigation to function definitions

Christophe Rhodes csr21 at cantab.net
Wed Oct 30 21:22:03 UTC 2013

Jeffrey Cunningham <jeffrey at jkcunningham.com> writes:

> On 10/30/2013 12:21 PM, Jeff Cunningham wrote:
>> (describe 'cl-ppcre:regex-apropos) 
> This is really strange. As an experiment I just created a dirt-simple
> source file named "test1.lisp" in an isolated directory.
> (require :cl-ppcre)
> (use-package :cl-ppcre)
> (describe 'cl-ppcre:regex-apropos)

I think I can reproduce the problem.


/tmp/bar.asd containing:
(asdf:defsystem bar :contents ((:file "baz")))

/tmp/baz.lisp containing:
(defun frob (x) (1+ x))

/tmp/foo.lisp containing:
(require :bar)

and neither /tmp/foo.fasl nor /tmp/bar.fasl existing, then executing
from the toplevel
  (load "/tmp/bar.asd")
and subsequently hitting C-c C-c on the (require :bar) form in foo.lisp
will result in (describe 'frob) thinking that it has a source location
of foo.lisp, rather than baz.lisp.

As I have said in other mails, this is not the normal way of using the
system.  Using REQUIRE in source files is unusual; so too is not having
the depended-on systems already compiled, which perhaps explains why
it's taken this long just to understand your problem.  (In general
triggering a file compilation from within LOAD or COMPILE-FILE is
hazardous; it doesn't completely surprise me that not everything is
actually totally correct).  You would make your life easier by writing
your own defsystem forms which declare the relevant dependencies on
other systems.


More information about the slime-devel mailing list