Hi slime-devel,
When an invalid character is sent to the remote lisp from the REPL, an error is signalled leaving the cursor in a funny position. The following patch to SLIME-REPL-EVAL-STRING fixes that by calling the :abort result handler.
Is there a case for putting this error handling in SLIME-DISPATCH- EVENT (:emacs-rex path) so all components get the :abort message when an error in transmission occurs?
Thanks Mark
Index: slime-repl.el =================================================================== RCS file: /project/slime/cvsroot/slime/contrib/slime-repl.el,v retrieving revision 1.22 diff -r1.22 slime-repl.el 521,526c521,533 < (slime-rex () < ((list 'swank:listener-eval string) (slime-lisp-package)) < ((:ok result) < (slime-repl-insert-result result)) < ((:abort) < (slime-repl-show-abort)))) ---
(let ((send-error t)) (unwind-protect (progn (slime-rex () ((list 'swank:listener-eval string) (slime-lisp-package)) ((:ok result) (slime-repl-insert-result result)) ((:abort) (slime-repl-show-abort)) ) (setf send-error nil)) (when send-error (slime-repl-show-abort)))))
* Mark Cox [2009-06-25 06:38+0200] writes:
Hi slime-devel,
When an invalid character is sent to the remote lisp from the REPL, an error is signalled leaving the cursor in a funny position. The following patch to SLIME-REPL-EVAL-STRING fixes that by calling the :abort result handler.
I assume that you entered a non-encodable character. If that's the case then nothing was sent and nothing was evaluated on the remote Lisp. I don't think that this is a very common situation and would just leave everything as it is. The cursor may be in a funny position but pressing return brings everything back to normal. Users who enter a lot of funny characters can use utf8 as encoding to avoid this problem.
Is there a case for putting this error handling in SLIME-DISPATCH- EVENT (:emacs-rex path) so all components get the :abort message when an error in transmission occurs?
I don't think so. slime-dispatch-event doesn't look like the right place for dealing with encoding problems and the :abort continuation even less so.
Helmut.