Mark Engelberg <mark.engelb...@gmail.com> writes:

> On Wed, Feb 1, 2012 at 5:38 AM, Hugo Duncan <duncan.h...@gmail.com> wrote:
>> SLIME works fully within the code blocks. For example C-x C-e can be
>> used to evaluate expressions. Paredit also works.
>
> My understanding is that unless you use C-c C-k to evaluate the entire
> file (which I don't think works in a literate program) the expressions
> evaluate in a way that doesn't provide Clojure with line numbers,
> making stacktraces even more obtuse.  Am I wrong, or has anyone found
> a way around this issue?

I use ritz [1], which keeps track of of both repl source forms, and sets
correct line numbers when compiling functions with C-c C-c. 

Each REPL source form is numbered, and you can list them with M-x
slime-list-repl-forms.

When running a function compiled from a markdown file with C-c C-c
(which is M-x slime-compile-defun), any exception ends up showing the
line number in the markdown file. eg.

  Backtrace:
    0: user$f.invoke (2012-01-14-script.md:27)

Also, exceptions land you in the debugger, so it is quite easy to see
where a problem is occurring.


[1] https://github.com/pallet/ritz

-- 
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