Hello Clojurians,

I've a Clojure newbie, and I've just started running clojure-mode and
slime under emacs (on Windows). I'm running into several issues.  Some
of these are definitely bugs in my understanding; others may be bugs
in my install or the implementation itself. I'd appreciate any help
anyone can provide on the following questions:

Slime seems to be working to a degree.  I have a functional repl, but
I have some issues with "compiling":

I know that ^C^L from clojure mode will load a file (defaults to the
file associated with te current buffer), and that this is in effect
the equivalent of typing the file's contents directly into the repl.
There is also ^C^K which the slime menu describes as compile/load
file.

Annoyingingly, emacs claims "C-c C-k is undefined" when I ask the help
system about that binding.

In any event, I'm not quite sure what "compile" means in this
context.  Is this truly "AOT compile into class files", or is it
something more general?  I suspect it's the latter; I don't see class
files being generated anywhere.  If the file I'm "compiling" contains
no errors, the effect seems to be just like ^C^L except that the
minibuffer says something like "Compilation finished: 0 errors  0
warnings  0 notes [0.00 secs]"  Is there any important difference
between the two here?

If there are errors, e.g., an intentional typo, other strangeness
occurs.  I'll get a message like "Compilation failed: 2 errors  0
warnings  0 notes [0.00 secs]".  Fine. From the file.clj buffer, I
think I should be able to use M-n and M-p to navigate amongst the
errors (or is it the notes?) but I only get "No next note."

If I then go to the *SLIME Compilation* buffer, I'll see something
like this:

2 compiler notes:
error:
java.lang.Exception: Unable to resolve symbol: greeto in this context
(hi.clj:3)
error:
java.lang.Exception: Unable to resolve symbol: greeto in this context


I'm not sure why the same error is appearing twice, but the first
instance even has the correct source code filename and line number. I
try to navigate from here by pressing enter.  No matter what line I'm
on when I press enter, emacs says "No error here".  Huh?

If, instead, I load the file with the typo with ^C^L I get a new
buffer in sldb mode, as shown below:

java.lang.Exception: Unable to resolve symbol: greeto in this context
(hi.clj:3)
  [Thrown class clojure.lang.Compiler$CompilerException]

Restarts:
 0: [ABORT] Return to SLIME's top level.
 1: [CAUSE] Throw cause of this exception

Backtrace:
  0: clojure.lang.Compiler.analyze(Compiler.java:4340)
  1: clojure.lang.Compiler.analyze(Compiler.java:4286)
  ... etc ...

Clearly this is a debugger.  I won't ask for details as to what I can
do here, except for this:  Typing 0 will get me back to the repl.
Fine.  However, Typing 1 will "Throw cause of this exception".  What
exactly does that mean?  Is it rethrowing the same exception, or doing
something different?  How is it useful?

Thanks to anyone who can help me with any of these issues.

   Mike

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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

Reply via email to