Hi again,
-------- Original-Nachricht --------
Datum: Sun, 15 Nov 2009 15:22:54 +0100 Von: "Stefan Kamphausen" skampi@gmx.net An: slime-devel@common-lisp.net Betreff: Re: [slime-devel] broken clojure REPL
I raised the topic on the Clojure discussion group. Thank you for providing background information.
after that I tried to understand what's happening behind the scenes. And now I'd like to ask some questions.
First and most important to me is the line
(defconst slime-cursor-marker 'swank::%cursor-marker%)
from contrib/slime-parse.el. If I tracked things correctly this symbol gets inserted in the form sent to swank, which is passed to arglist-for-echo-area by the swank-evaluation mechanism. This seems to rely on the fact that "swank::%cursor-marker%" is a valid name in the backend. Surely, this is true for CL-backends, unfortunately not for Clojure. There "::" should be a "/" and the "%"s are not allowed. Please see http://groups.google.com/group/clojure/t/eef10af52a619eee for a thread on the Clojure-list.
While I understand that it would be nice to have a real symbol denoting the current cursor position, it feels rather hackish to me (and it /kills/ the swank-threads in Clojure). Would you mind replacing it with a not-so-special string? As far as I can tell, the code wouldn't need to change too much (cases of eq would probably become string= or something like that in a few places, but I may be wrong).
I managed to get the backend working again, well, kind of. After not crashing anymore, I could analyze the new way forms get sent over the wire and changed a few functions.
What remains then is an error message from eldoc, e.g.
eldoc error: (wrong-type-argument listp [string file line))
I still have to find the piece of code that throws this, but it seems to be related to braces and brackets, some code seems to rely on parens being the only kind of parenthesis.
Kind regards, Stefan