On Thu, Aug 17, 2006 at 11:35:09PM -0700, Brad Beveridge wrote:

> 
> Hi all, I'm working with a Vim that has been hacked so that you can
> get callbacks when data appears on a socket.
> Basically, our callback system works in pretty much the same way as
> the code in FEAT_SNIFF.  We add the filedescriptors that we are
> interested in to the select/poll code in os_unix, if there is data
> pending on a socket then we callback a registered function, which
> should clear the data from the socket.
> In my particular case, the callback calls into Lisp code in our
> embedded Lisp interpreter, which writes data to buffers using
> ml_replace and ml_append.
> 
> [snip]
>
> Q4) Would this callback mechanism be more generally useful for other
> scripting engines?

Hi Brad,

I'm not sure about other scripting engines -- But I can certainly think
of one very good use: Poling for email :). If you add
/var/spool/mail/uname to the select'ed file descriptors, then it would
be nice to have a little message line pop up saying "You have new
mail". I know this can be done using biff / xbiff / kbiff, etc. But I
much prefer a vimbiff :-).

GI

-- 
When an actress saw her first strands of gray hair, she thought she'd
dye.

Reply via email to