This could be done by checking for input every 0.10 seconds during window redisplay (rather than every N lines).
This means that if redisplay is fast enough to complete within 0.10 seconds, it doesn't pre-empt. That would work, for a terminal, assuming it waits for the output to complete. I think it does fflush. Does fflush really wait for data to be sent to the terminal? Or does it return immediately once stdio's buffered data is processed by `write'? I suspect this measurement will be meaningless when using the net, because it would only tell you how long it took to write all the output into some buffer in the ethernet driver. You won't even know when it is sent out on the ethernet. It's possible that your suggestion will give good results nonetheless. Pre-emption probably doesn't work very well with added latency of an internet connection, especially given all the buffering. (The Supdup protocol, which I worked on in 1980 or so, limited the amount of buffering so that pre-emption of Emacs redisplay would work better.) Usually the whole screenful will get buffered anyway. So please install your patch, and document it. Then we can see how well it works. _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug