From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: sit-for Date: Wed, 02 Aug 2006 01:24:09 +0200 Message-ID: References: <854px1e8xx.fsf@lola.goethe.zz> <877j1spg1d.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1154474776 14417 80.91.229.2 (1 Aug 2006 23:26:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 1 Aug 2006 23:26:16 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 02 01:26:13 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G83cl-0003h4-T1 for ged-emacs-devel@m.gmane.org; Wed, 02 Aug 2006 01:26:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G83cl-00016Z-DC for ged-emacs-devel@m.gmane.org; Tue, 01 Aug 2006 19:26:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G83cb-00015R-99 for emacs-devel@gnu.org; Tue, 01 Aug 2006 19:25:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G83cY-00013u-DA for emacs-devel@gnu.org; Tue, 01 Aug 2006 19:25:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G83cY-00013q-9x for emacs-devel@gnu.org; Tue, 01 Aug 2006 19:25:54 -0400 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G83fX-000831-He for emacs-devel@gnu.org; Tue, 01 Aug 2006 19:28:59 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepc.post.tele.dk (Postfix) with SMTP id C94B38A0002; Wed, 2 Aug 2006 01:25:40 +0200 (CEST) Original-To: Chong Yidong In-Reply-To: <877j1spg1d.fsf@stupidchicken.com> (Chong Yidong's message of "Tue, 01 Aug 2006 12:38:38 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:57968 Archived-At: Chong Yidong writes: >> Since we have the new sit-for implementation, I have a lot of times >> when Emacs just pauses in busy waiting for input. This happens >> spontaneously. One situation where it happens frequently is when >> reading news with gnus. > > Another possibility just occurred to me. Unlike the old sit-for, the > new sit-for is not interrupted by input coming from processes (as > opposed to user input). If gnus (or some other package) relies on > this behavior, a bug will arise. IMO, sit-for should never be interrupted by input coming from a subprocess (that is what accept-process-output is for), and code which relies on that behaviour is wrong. Process output is _not_ input in the normal sense. AFAICS, process output is still read during sit-for and passed to the proper filters or buffers--so the new sit-for is doing TRT. > > The question is: is this a bug of the new sit-for? If sit-for is > changed to interrupt due to processes, we have the same problem as > before: input coming from miscellaneous async processes will interfere > with towers of hanoi (or other animation code). > > One possibility is to bring back the old sit-for with its warts > (interruptable even if no new input events are available) and change > the animation code to use `read-event' with its new timeout argument. That would be a big step backwards! > > Another possibility is to leave sit-for as it is, try to find code > that relies on sit-for returning due to process output, and fix it. Richard specifically asked [someone] to check all sit-for calls to see if the new behaviour would break them. So [we] should already have done this (but I don't think anybody actually did that). -- Kim F. Storm http://www.cua.dk