From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#26458: 25.1; abort on X close window Date: Wed, 12 Apr 2017 09:14:40 +0300 Message-ID: <83mvbmjgof.fsf@gnu.org> References: <87r30yusjn.fsf@blah.blah> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1491977712 14906 195.159.176.226 (12 Apr 2017 06:15:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Apr 2017 06:15:12 +0000 (UTC) Cc: 26458@debbugs.gnu.org To: Kevin Ryde Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 12 08:15:07 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cyBYZ-0003lp-Gh for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Apr 2017 08:15:07 +0200 Original-Received: from localhost ([::1]:42378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyBYf-000484-6o for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Apr 2017 02:15:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyBYZ-00045m-2V for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2017 02:15:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyBYU-00075a-SY for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2017 02:15:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45360) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cyBYU-00075V-Ol for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2017 02:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cyBYU-00024w-7H for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2017 02:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2017 06:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26458 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26458-submit@debbugs.gnu.org id=B26458.14919776747942 (code B ref 26458); Wed, 12 Apr 2017 06:15:02 +0000 Original-Received: (at 26458) by debbugs.gnu.org; 12 Apr 2017 06:14:34 +0000 Original-Received: from localhost ([127.0.0.1]:43559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cyBY2-000241-9n for submit@debbugs.gnu.org; Wed, 12 Apr 2017 02:14:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cyBY0-00023n-Hm for 26458@debbugs.gnu.org; Wed, 12 Apr 2017 02:14:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyBXr-0006vv-Bp for 26458@debbugs.gnu.org; Wed, 12 Apr 2017 02:14:27 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyBXr-0006vr-96; Wed, 12 Apr 2017 02:14:23 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2857 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cyBXp-0004HX-9e; Wed, 12 Apr 2017 02:14:22 -0400 In-reply-to: <87r30yusjn.fsf@blah.blah> (message from Kevin Ryde on Wed, 12 Apr 2017 15:02:52 +1000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:131495 Archived-At: > From: Kevin Ryde > Date: Wed, 12 Apr 2017 15:02:52 +1000 > > Under X and motif mwm window manager, closing emacs using the window > manager does not save modified buffers, and sometimes aborts. Eg. > > emacs -Q /tmp/x > Ret # so modified > mwm Alt-f4 "close" > => > Connection lost to X server ':0.0' > file /tmp/x not saved > > where I hoped to get the usual query save before exit as by C-x C-c or > menu File/Quit. > > (Generally X clients can treat WM_DELETE_WINDOW message the same as > other user keyboard or menu input asking for an orderly shutdown -- so > interaction and display continuing as normal for however long.) Emacs does do this, so the problem is not on that high level, the problem is in the details. I'm guessing that Emacs does attempt to display the dialog you wanted to see, but it cannot do that without an X connection. > Sometimes WM_DELETE_WINDOW can make emacs abort, depending what the kill > hooks do. For example foo.el containing > > (add-hook 'kill-emacs-hook > (lambda () > (sit-for 5))) > > then > > emacs -Q -l foo.el > mwm Alt-f4 "close" > => > Connection lost to X server ':0.0' > Fatal error 6: Aborted > Backtrace: > emacs[0x8144f1c] > ... > /usr/lib/i386-linux-gnu/libX11.so.6(_XIOError+0x5d)[0xb7345c2d] > /usr/lib/i386-linux-gnu/libX11.so.6(_XEventsQueued+0x96)[0xb7343266] > /usr/lib/i386-linux-gnu/libX11.so.6(XPending+0x62)[0xb7334752] > ... Please show a full backtrace under a debugger, so we see where it aborts. It is best to run Emacs with -xrm "emacs.synchronous: true" on the command line for this experiment, so that X errors are noted right where they happen. Thanks.