Hi folks,
Just FYI, this breaks, at least for me, 'slime-edit-definition' in
swank-clojure (also known as "M-."), which pops open the source
definition of the word under point.
I'm sure there's a work-around, of course. The meta information is still there:
user> (meta #'last)
{:arglists ([coll]), :doc "Return the last item in coll, in linear
time", :name last, :file "core.clj", :line 161, :ns #<Namespace
clojure.core>}
so it must just be a configuration issue. I will read over the
swank-clojure code.
Best,
Graham
I'm sure there's a work-around, of course. The meta information is still there:
On Tue, Dec 9, 2008 at 4:15 PM, MattyDub <Matty...@gmail.com> wrote:
>
> I recently tried M-. for the first time with clojure + SLIME and it
> broke for me (with a "Lisp error: (error "Synchronous Lisp Evaluation
> aborted.")"); other parts of SLIME work (e.g., C-M-x, or C-x C-e), but
> this doesn't . I didn't understand the previous messages in this
> thread:
> 1) Stephen Gilardi said to add "<path-to-clojure-trunk-svn-directory>/
> src/clj" to his classpath - what classpath? The swank-clojure-jar-
> path in my .emacs? Or another classpath?
> 2) Feng suggested a patch, but didn't mention what file to make that
> patch in - what file was that for?
> Has this problem been patched yet? Should I just update my swank-
> clojure, or something? Any help is appreciated. (I'm inferring from
> the first method that swank-clojure supports slime-edit-definition -
> if I'm incorrect, please let me know.)
The problem has been fixed. If you download both the latest SVN
version of Clojure and the latest GIT version of swank-clojure, you
should be fine.
- Bill
Hmm, looks like I was mistaken in my earlier email. I get the same
thing when I do M-. on "render-place". However, if I place the point
on "defn" (or any other symbol name that is in a jar file), it goes to
the correct source in the jar file. At first, I thought it was because
ant.clj was not in the class path; however, it doesn't work when
ant.clj is in the class path either. I applied the
find-definitions-for-emacs patch proposed in the earlier email;
however, that doesn't work either. This used to work for local
definitions and was broken a few svn changes ago. It was fixed for
clojure definitions that are in jar files; however, it seems to still
be broken for local definitions.
- Bill
On Wed, Dec 10, 2008 at 12:47 PM, MattyDub <Matty...@gmail.com> wrote:
>
> I can confirm that that patch fixed my problem - I can now M-. to
> render-place. Thanks, Bill!
Good to hear that the patch fixes the issue for you.
> What paths does slime-edit-definition search for the definitions?
> It's not finding the clojure macros/functions (like defn, dosync,
> etc.), so I must not have that path configured correctly.
> -Matt
Basically, it searches a bunch of standard Java locations plus the
locations you specified in your classpath. If you want to see what
will be searched, enter the following 2 statements in your Clojure
REPL:
(in-ns 'swank.commands.basic)
(slime-search-paths)
Note: the function "slime-search-paths" isn't public
If M-. isn't working on standard Clojure symbols, it could be for a
number of reasons:
1. You're using an old version of Clojure
2. You've built Clojure excluding source from the jar file
3. The Clojure source isn't in your classpath (only necessary if #2 is true)
- Bill
FYI - Jeffrey Chu just sent me an email and the patch has now been
applied to swank-clojure.
- Bill