From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Emacs does not listen on w32 Date: Mon, 14 Apr 2008 14:02:59 -0400 Message-ID: References: <4800D965.9080202@gmail.com> <480208C8.3030401@gnu.org> <480212F7.7090409@gmail.com> <4802249D.2060909@gmail.com> <480271D2.7040304@gmail.com> <4802FD64.1080602@gmail.com> <48038487.3060201@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208196868 1532 80.91.229.12 (14 Apr 2008 18:14:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Apr 2008 18:14:28 +0000 (UTC) Cc: Juanma Barranquero , Eli Zaretskii , jasonr@gnu.org, emacs-devel@gnu.org To: "Lennart Borgman \(gmail\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 14 20:14:59 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JlT2a-0005N4-Fa for ged-emacs-devel@m.gmane.org; Mon, 14 Apr 2008 20:04:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlT1w-0003M8-7X for ged-emacs-devel@m.gmane.org; Mon, 14 Apr 2008 14:03:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JlT1L-0002q6-Sc for emacs-devel@gnu.org; Mon, 14 Apr 2008 14:03:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JlT1J-0002p3-Ut for emacs-devel@gnu.org; Mon, 14 Apr 2008 14:03:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlT1J-0002ot-BZ for emacs-devel@gnu.org; Mon, 14 Apr 2008 14:03:09 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182] helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JlT1B-0007ds-15; Mon, 14 Apr 2008 14:03:01 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAPc4A0hMCqsI/2dsb2JhbACBXqk5 X-IronPort-AV: E=Sophos;i="4.25,656,1199682000"; d="scan'208";a="18486596" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 14 Apr 2008 14:02:59 -0400 Original-Received: from pastel.home ([76.10.171.8]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id UWQ78359; Mon, 14 Apr 2008 14:02:59 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 599E37F3C; Mon, 14 Apr 2008 14:02:59 -0400 (EDT) In-Reply-To: <48038487.3060201@gmail.com> (Lennart Borgman's message of "Mon, 14 Apr 2008 18:21:27 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:95192 Archived-At: > Yes, I know, but I think there are at least two problems here: > - I do not believe this is the right semantics for WM_CLOSE. That's what I gathered from your bug-report -;) > - If you run the above code in a timer (like I did) it is worse. There is no > way at all to stop it. (Except from Task Manager.) This is completely independent from WM_CLOSE and is a much more general problem: any code run from a timer (or other places that set inhibit-quit, such as jit-lock) should guarantee that it only runs for a short time (and/or check input-pending-p, or use with-local-quit. The core of the problem here is that too many programmers don't know about it, and that there's no (easy) way to automatically catch code that doesn't follow those guidelines. > For both these problems I think a change in the semantics for WM_CLOSE (and > related messages) are the best cure. For the second problem, you have to realize that it will bite you in many more cases than just WM_CLOSE. > - Give Emacs say 4 seconds to finish what it is doing. (The documentation > for IsHungAppWindow says that an application should be considered hung if it > does not respond in 5 seconds.) If it did not finish then ask the user > whether to interrupt or not. If you have such an infinite loop within a timer code, then Emacs *is* hung, and it seems perfectly fine to let the OS's IsHungAppWindow deal with it. Stefan