Does slime provide a way to abort reading from the listener?
For example, say you evaluate a form that reads from the listener:
? (read)
At this point, swank has dispatched :read-string to the client/emacs. Swank then wait-for-event :emacs-return-string until it gets the string.
How can the wait-for-event be aborted from the client to result in :read-aborted?
-- Terje Norderhaug
Terje Norderhaug terje@in-progress.com writes:
Does slime provide a way to abort reading from the listener?
For example, say you evaluate a form that reads from the listener:
? (read)
At this point, swank has dispatched :read-string to the client/emacs. Swank then wait-for-event :emacs-return-string until it gets the string.
How can the wait-for-event be aborted from the client to result in :read-aborted?
With C-c C-c
On Sep 26, 2009, at 1:39 PM, Stas Boukarev wrote:
Terje Norderhaug terje@in-progress.com writes:
Does slime provide a way to abort reading from the listener?
For example, say you evaluate a form that reads from the listener:
? (read)
At this point, swank has dispatched :read-string to the client/emacs. Swank then wait-for-event :emacs-return-string until it gets the string.
How can the wait-for-event be aborted from the client to result in :read-aborted?
With C-c C-c
Thanks. The resulting :emacs-interrupt event does indeed induce a break in the (read)... but it also activates the debugger.
I need to abort the reading and get back to the repl-prompt without further ado. How can the wait-for-event be aborted from the client yet avoid activating the debugger?
-- Terje Norderhaug
Terje Norderhaug terje@in-progress.com writes:
I need to abort the reading and get back to the repl-prompt without further ado. How can the wait-for-event be aborted from the client yet avoid activating the debugger?
Consider using SWANK::READ-FROM-MINIBUFFER-IN-EMACS instead. That will return NIL if the user aborted by pressing C-g, and "" if the user just pressed RET.
-T.
* Terje Norderhaug [2009-09-27 00:26+0200] writes:
I need to abort the reading and get back to the repl-prompt without further ado. How can the wait-for-event be aborted from the client yet avoid activating the debugger?
Perhaps you can use something like this:
(swank::interrupt-thread (swank::find-repl-thread (swank::default-connection)) (lambda () (abort)))
Helmut