[slim-vim] Possible issues with vim:add-input-listener
Jim Bailey
dgym.bailey at gmail.com
Sat May 20 18:18:49 CDT 2006
Hi Brad,
I haven't looked at what you have done yet but this might be
relevant so I thought it best to bring this up as soon as possible. One
very good and sure-fire way of freezing vim is to add an input listener
that doesn't read off all pending data on a socket. If you can think of
any reason why your input reading function could possibly be leaving
data on the socket despite multiple calls that would be a very good
place to start. It is very important to make sure that the
data is read off even if an error occurs, as otherwise the handler will
end up being called repetedly for ever.
Outputting to a buffer should be perfectly fine, it is the first
thing I tried when it became apparent that outputting to the message
line was a very bad thing to try and do.
Hopefully I will get a chance to try things out for myself soon and be
of more use.
Cheers,
Jim
On Sat, 20 May 2006 11:48:38 -0700
"Brad Beveridge" <brad.beveridge at gmail.com> wrote:
> Hi guys (and especially Jim :)
> I am trying to add automatic response to incoming Swank data, so I basically did
> (vim:add-input-listener stream #'slime-process-available-input)
> where stream is the socket stream to Swank, this works as expected -
> ie slime-process-available-input is called when incoming data is
> detected.
> However, in the course of handling this data, output is written to Vim
> buffers and possibly vim:msg - after a few packets of data have been
> handled Vim crashes (with various different errors), usually in
> dropping back to an ECL prompt - with the terminal no longer echoing.
> I have to issue (QUIT) and then "reset" at the console.
>
> I'm wondering if outputting to a buffer during the stream event
> handler is a bad thing. I'm pretty stuck right now and would
> appreciate it if somebody who knows Vim internals better (Jim? :)
> could take a look.
>
> Basically take the attached tarball and follow the instructions I
> posted a couple of days ago to reproduce the error.
>
> Thanks
> Brad
>
More information about the slim-vim
mailing list