From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: signal handling bogosities Date: Thu, 02 Jan 2003 13:38:12 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200212311750.gBVHoo0U025254@stubby.bodenonline.com> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1041533232 15287 80.91.224.249 (2 Jan 2003 18:47:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 2 Jan 2003 18:47:12 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18UAN4-0003y0-00 for ; Thu, 02 Jan 2003 19:47:10 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18UAPJ-0006XT-00 for ; Thu, 02 Jan 2003 19:49:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18UAJc-0003YI-01 for emacs-devel@quimby.gnus.org; Thu, 02 Jan 2003 13:43:36 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18UAHx-0002wo-00 for emacs-devel@gnu.org; Thu, 02 Jan 2003 13:41:53 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18UAFf-0002Iz-00 for emacs-devel@gnu.org; Thu, 02 Jan 2003 13:39:34 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18UAEQ-00024N-00 for emacs-devel@gnu.org; Thu, 02 Jan 2003 13:38:14 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 18UAEO-00041Y-00; Thu, 02 Jan 2003 13:38:12 -0500 Original-To: jan.h.d@swipnet.se In-reply-to: <200212311750.gBVHoo0U025254@stubby.bodenonline.com> (jan.h.d@swipnet.se) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10412 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10412 > The XEmacs developers told me 10 years ago that XEmacs used an > inside-out structure, where Xt implements the event loop and calls > Emacs to handle each events. That unnatural structure makes it > impossible to write your own loop in Lisp. I rejected it. One could argue that for a GUI application the XEmacs approach is the natural loop :-) It prevents the Lisp code from being natural. That is more important. The natural structure for an event loop in Lisp is (while ... (let ((input (read-events-somehow))) (execute input))) Any change in Emacs that would prevent the Lisp code from looking like this has a major drawback. I haven't looked at this in detail, but it seems to me that a lot could be gained if Emacs could wait for events in some toolkit specific routine, like XtAppNextEvent for Xt. Emacs needs to wait for input from various descriptors at the same time, adn with a timeout. If it is possible to do that with XtAppNextEvent, then it is possible to use XtAppNextEvent.