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.) Thanks, -Matt
On Nov 14, 1:38 pm, Feng <[EMAIL PROTECTED]> wrote: > On Nov 14, 4:09 pm, "Graham Fawcett" <[EMAIL PROTECTED]> wrote: > > > > > On Fri, Nov 14, 2008 at 4:01 PM, Stephen C. Gilardi <[EMAIL PROTECTED]> > > wrote: > > > > On Nov 14, 2008, at 3:38 PM, Graham Fawcett wrote: > > > > I'm sure there's a work-around, of course. The meta information is still > > > there: > > > > This appears to be because the sources are no longer included in > > > clojure.jar. I added "<path-to-clojure-trunk-svn-directory>/src/clj" to my > > > classpath and now it works. > > > Thanks, Steve -- an easy fix! > > > Best, > > Graham > > > > --Steve > > M-. will jump to wrong place if defs are not in namespace master .clj. > I already reported it to swank-clojure owner. I guess the fix should > be in git repo soon. > > This should fix it. > > (defn- namespace-to-path [ns] > (let [ns-str (name (ns-name ns))] > (-> ns-str > (.substring 0 (.lastIndexOf ns-str ".")) > (.replace \- \_) > (.replace \. \/)))) > > (defslimefn find-definitions-for-emacs [name] > (let [sym-name (read-from-string name) > sym-var (ns-resolve (maybe-ns *current-package*) sym-name)] > (when-let [meta (and sym-var (meta sym-var))] > (if-let [path (or (slime-find-file-in-paths (str (namespace-to- > path (:ns meta)) > (.separator > File) > (:file meta)) > (slime-search-paths)) > ;; This is OK for namespace master .clj, but not for help files. > ; (slime-find-file-in-paths (str (namespace- > to-path (:ns meta)) ".clj") > ; (slime-search- > paths)) > (slime-find-file-in-paths (:file meta) > (slime-search-paths)))] > `((~(str "(defn " (:name meta) ")") > (:location > ~path > (:line ~(:line meta)) > nil))) > `((~(str (:name meta)) > (:error "Source definition not found."))))))) > > regards, > > - Feng --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---