Re: Clojure & Slime, how to jump to a def/defn?

2009-02-23 Thread David Nolen
You're right, works perfectly on clojure sources, but not the instances
you've described.  It would be great if this would work again. I don't
understand swank/slime well enough to try it myself.
On Mon, Feb 23, 2009 at 9:23 PM, Alec Berryman  wrote:

>
> David Nolen on 2009-02-23 16:58:40 -0500:
>
> > Is this supported yet? M-. is supposed to handle this, but I get an error
> > when I try.
>
> It works for me with Clojure sources (for example, M-. on rest), even if
> they're in jars, but not with applications I've compiled through
> load-file, slime-compile-defun, or slime-compile-region.  I think I
> remember this working a while ago.
>
> The backtrace I get is very reproducable:
>
> (:emacs-rex
>  (swank:find-definitions-for-emacs "bar")
>  "foo" :repl-thread 19)
> (:return
>  (:abort)
>  19)
> (:debug 2 1
>("java.lang.StringIndexOutOfBoundsException: String index out of
>range: -1 (NO_SOURCE_FILE:0)" "  [Thrown class
>clojure.lang.Compiler$CompilerException]" nil)
>(("ABORT" "Return to SLIME's top level.")
> ("CAUSE" "Throw cause of this exception"))
>((0 "clojure.lang.Compiler.eval(Compiler.java:4235)"
>(:restartable nil))
> (1 "clojure.core$eval__3894.invoke(core.clj:1711)"
>(:restartable nil))
> (2 "swank.core$eval_in_emacs_package__275.invoke(core.clj:55)"
>(:restartable nil))
> (3 "swank.core$eval_for_emacs__350.invoke(core.clj:123)"
>(:restartable nil))
> (4 "clojure.lang.Var.invoke(Var.java:348)"
>(:restartable nil))
> (5 "clojure.lang.AFn.applyToHelper(AFn.java:179)"
>(:restartable nil))
> (6 "clojure.lang.Var.applyTo(Var.java:457)"
>(:restartable nil))
> (7 "clojure.core$apply__3162.doInvoke(core.clj:408)"
>(:restartable nil))
> (8 "clojure.lang.RestFn.invoke(RestFn.java:428)"
>(:restartable nil))
> (9 "swank.core$eval_from_control__278.invoke(core.clj:62)"
>(:restartable nil))
> (10 "swank.core$eval_loop__281.invoke(core.clj:67)"
> (:restartable nil))
> (11
> "swank.core$spawn_repl_thread__409$fn__438$fn__440.invoke(core.clj:168)"
> (:restartable nil))
> (12 "clojure.lang.AFn.applyToHelper(AFn.java:171)"
> (:restartable nil))
> (13 "clojure.lang.AFn.applyTo(AFn.java:164)"
> (:restartable nil))
> (14 "clojure.core$apply__3162.doInvoke(core.clj:408)"
> (:restartable nil))
> (15 "clojure.lang.RestFn.invoke(RestFn.java:428)"
> (:restartable nil))
> (16
> "swank.core$spawn_repl_thread__409$fn__438.doInvoke(core.clj:165)"
> (:restartable nil))
> (17 "clojure.lang.RestFn.invoke(RestFn.java:402)"
> (:restartable nil))
> (18 "clojure.lang.AFn.run(AFn.java:37)"
> (:restartable nil))
> (19 "java.lang.Thread.run(Thread.java:636)"
> (:restartable nil)))
>(19))
> (:emacs-rex
>  (swank:throw-to-toplevel)
>  nil 2 20)
> (:debug-activate 2 1 true)
> (:return
>  (:abort)
>  20)
> (:debug-return 2 1 nil)
>
>
> >
>

--~--~-~--~~~---~--~~
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 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Clojure & Slime, how to jump to a def/defn?

2009-02-23 Thread Alec Berryman

David Nolen on 2009-02-23 16:58:40 -0500:

> Is this supported yet? M-. is supposed to handle this, but I get an error
> when I try.

It works for me with Clojure sources (for example, M-. on rest), even if
they're in jars, but not with applications I've compiled through
load-file, slime-compile-defun, or slime-compile-region.  I think I
remember this working a while ago.

The backtrace I get is very reproducable:

(:emacs-rex
 (swank:find-definitions-for-emacs "bar")
 "foo" :repl-thread 19)
(:return
  (:abort)
  19)
(:debug 2 1
("java.lang.StringIndexOutOfBoundsException: String index out of
range: -1 (NO_SOURCE_FILE:0)" "  [Thrown class
clojure.lang.Compiler$CompilerException]" nil)
(("ABORT" "Return to SLIME's top level.")
 ("CAUSE" "Throw cause of this exception"))
((0 "clojure.lang.Compiler.eval(Compiler.java:4235)"
(:restartable nil))
 (1 "clojure.core$eval__3894.invoke(core.clj:1711)"
(:restartable nil))
 (2 "swank.core$eval_in_emacs_package__275.invoke(core.clj:55)"
(:restartable nil))
 (3 "swank.core$eval_for_emacs__350.invoke(core.clj:123)"
(:restartable nil))
 (4 "clojure.lang.Var.invoke(Var.java:348)"
(:restartable nil))
 (5 "clojure.lang.AFn.applyToHelper(AFn.java:179)"
(:restartable nil))
 (6 "clojure.lang.Var.applyTo(Var.java:457)"
(:restartable nil))
 (7 "clojure.core$apply__3162.doInvoke(core.clj:408)"
(:restartable nil))
 (8 "clojure.lang.RestFn.invoke(RestFn.java:428)"
(:restartable nil))
 (9 "swank.core$eval_from_control__278.invoke(core.clj:62)"
(:restartable nil))
 (10 "swank.core$eval_loop__281.invoke(core.clj:67)"
 (:restartable nil))
 (11 
"swank.core$spawn_repl_thread__409$fn__438$fn__440.invoke(core.clj:168)"
 (:restartable nil))
 (12 "clojure.lang.AFn.applyToHelper(AFn.java:171)"
 (:restartable nil))
 (13 "clojure.lang.AFn.applyTo(AFn.java:164)"
 (:restartable nil))
 (14 "clojure.core$apply__3162.doInvoke(core.clj:408)"
 (:restartable nil))
 (15 "clojure.lang.RestFn.invoke(RestFn.java:428)"
 (:restartable nil))
 (16 "swank.core$spawn_repl_thread__409$fn__438.doInvoke(core.clj:165)"
 (:restartable nil))
 (17 "clojure.lang.RestFn.invoke(RestFn.java:402)"
 (:restartable nil))
 (18 "clojure.lang.AFn.run(AFn.java:37)"
 (:restartable nil))
 (19 "java.lang.Thread.run(Thread.java:636)"
 (:restartable nil)))
(19))
(:emacs-rex
 (swank:throw-to-toplevel)
 nil 2 20)
(:debug-activate 2 1 true)
(:return
  (:abort)
  20)
(:debug-return 2 1 nil)


--~--~-~--~~~---~--~~
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 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---