Question about Alt-. navigation to function definitions
jeffrey at jkcunningham.com
Thu Oct 31 13:20:07 UTC 2013
On 10/31/2013 01:07 AM, Helmut Eller wrote:
> On Wed, Oct 30 2013, Christophe Rhodes wrote:
>> 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.
> Indeed. I can reproduce that too. If we do it without ASDF we
> can put
> (load (compile-file "baz.lisp"))
> in foo.lisp and press C-c C-c on it.
> This happens because SWANK-COMPILE-STRING in swank-sbcl.lisp uses with
> WITH-COMPILATION-UNIT to pass :source-namestring to nested invocations
> of COMPILE-FILE. Since LOAD is also called inside that
> WITH-COMPILATION-UNIT the invocation in foo.lisp picks up the wrong
> value for :source-namestring.
> I moved LOAD outside and this problem should no longer occur. A
> potential downside is that (redefinition) warnings that are emitted
> during LOAD are no longer picked up by SLIME.
I see you made changes in CVS. Does quicklisp pick these up if I
update-dist? Or do I need to reinstall Slime from CVS to get this?
I was able to isolate the problem to this very simple example.
I''m running SBCL 1.1.11 and Slime 2013-09-29.
First, I deleted ~/.cache/common-lisp/*
Then I created a new project:
(quickproject:make-project "/home/jcunningham/myproj/" :depends-on
I loaded the project by creating /tmp/test.lisp with the following line
and compiling it:
And executed the following:
; compiling (DESCRIBE (QUOTE CL-PPCRE:REGEX-APROPOS))
REGEX-APROPOS names a compiled function:
Lambda-list: (REGEX &OPTIONAL PACKAGES &KEY (CASE-INSENSITIVE T))
Derived type: (FUNCTION (T &OPTIONAL T &KEY (:CASE-INSENSITIVE T))
Similar to the standard function APROPOS but returns a list of all
symbols which match the regular expression REGEX. If CASE-INSENSITIVE
is true and REGEX isn't already a scanner, a case-insensitive scanner
*Source file: /tmp/test.lisp*
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the slime-devel