From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: after-delete-terminal-functions (was: 23.0.60; Emacs should survive a lost X connection) Date: Wed, 13 Feb 2008 17:00:57 -0500 Message-ID: References: <20080205.155847.56398348.hanche@math.ntnu.no> <200802051957.m15Jv8r1019258@sallyv1.ics.uci.edu> <200802052349.m15NnxSu013983@sallyv1.ics.uci.edu> <200802062007.m16K7r78005498@sallyv1.ics.uci.edu> <200802080726.m187Q5gL002961@sallyv1.ics.uci.edu> <200802090504.m1954WTM028192@sallyv1.ics.uci.edu> <200802100803.m1A83Eq5026472@sallyv1.ics.uci.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1202940179 8225 80.91.229.12 (13 Feb 2008 22:02:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Feb 2008 22:02:59 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, dann@ics.uci.edu, hanche@math.ntnu.no To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 13 23:03:22 2008 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 1JPPh8-0005in-SE for ged-emacs-devel@m.gmane.org; Wed, 13 Feb 2008 23:03:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPPgf-00044B-3R for ged-emacs-devel@m.gmane.org; Wed, 13 Feb 2008 17:02:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JPPf1-0003KV-PG for emacs-devel@gnu.org; Wed, 13 Feb 2008 17:00:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JPPf0-0003K4-Rd for emacs-devel@gnu.org; Wed, 13 Feb 2008 17:00:59 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPPf0-0003Jy-Jg for emacs-devel@gnu.org; Wed, 13 Feb 2008 17:00:58 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JPPf0-0006Cd-Ce for emacs-devel@gnu.org; Wed, 13 Feb 2008 17:00:58 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1JPPez-0007tO-F6; Wed, 13 Feb 2008 17:00:57 -0500 In-reply-to: (message from Stefan Monnier on Tue, 12 Feb 2008 22:09:06 -0500) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:88985 gmane.emacs.pretest.bugs:21069 Archived-At: But now I wonder: is DELETE_TERMINAL_EVENT the right thing to do, or should we use run-at-time instead? I don't see any reason why run-at-time would work better, and it certainly is not cleaner. It is less clean. So, I removed the `error' call, but this makes things worse, apparently: Emacs then exits abruptly. It seems that it's important to abort execution at the end of x_connection_closed. So I re[placed the `error' call by a call to Fthrow. This finally worked. That seems like a plausible approach to me. However, another idea is to signal an error and do something special so that this error doesn't clear the event. Even better, the top-level loop could queue the event after catching this kind of error. Or the top-level loop could call the appropriate hook after catching this kind of error. That way there would be no event, just a hook. It could distinguish this error based on an error condition symbol. That would be clean.