Great ! thanks Konrad ! Another, presumably more "general" solution, but implying modifications (by adding another optional attribute) to clojure.main/repl, would be to give to the REPL a particular instance whose meaning could be interpreted by the reader as "end the current reader".
This instance could be returned by a utility function provided by debug-repl as a global function. This could be of general utility, not just for debugging purposes. But then, we could even go one level deeper: not only provide a particular instance that would allow to quit the REPL, but a set of instances. And if the returned value of the call to the REPL returns one of the instances in the set, then quit. This would allow to nest debug-repls (but is it interesting ?) calls, and to go back to the encapsulating repl by e.g. a call to debug-repl/quit(1), or to go up 2 levels in the debug-repls nesting by calling debug-repl/quit(2), ... or to go back to the main environment by e.g. a call to debug-repl/quit(). 2009/12/11 Konrad Hinsen <konrad.hin...@fastmail.net> > On 10 Dec 2009, at 21:34, George Jahad wrote: > > > are you using slime? Currently, you need to use a non-slime repl, (I > > think because of how slime handles io redirection) > > I don't use slime, but I had a similar issue with Counterclockwise/ > Eclipse, which doesn't quite understand that end-of-stream (Ctrl-D) > is meant to terminate not the stream, but just the portion of the > stream going to the debug repl. > > Here is a modified version that permits quitting the debug REPL by > typing "()" (empty list): > > http://gist.github.com/254110 > > It works fine with Counterclockwise, so perhaps it's also a solution > for Slime users. > > Konrad. > > -- > 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<clojure%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > -- 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