From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.bugs Subject: bug#26458: 25.1; abort on X close window Date: Wed, 12 Apr 2017 15:02:52 +1000 Message-ID: <87r30yusjn.fsf@blah.blah> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1491973638 28604 195.159.176.226 (12 Apr 2017 05:07:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Apr 2017 05:07:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) To: 26458@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 12 07:07:13 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 1cyAUq-0007Iu-OR for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Apr 2017 07:07:13 +0200 Original-Received: from localhost ([::1]:42198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyAUu-0006Ks-I6 for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Apr 2017 01:07:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyAUl-0006Km-Oh for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2017 01:07:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyAUg-0004MO-OM for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2017 01:07:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45340) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cyAUg-0004MH-Kd for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2017 01:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cyAUg-0000K2-CW for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2017 01:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kevin Ryde Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2017 05:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 26458 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14919735731155 (code B ref -1); Wed, 12 Apr 2017 05:07:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Apr 2017 05:06:13 +0000 Original-Received: from localhost ([127.0.0.1]:43539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cyATt-0000IZ-EG for submit@debbugs.gnu.org; Wed, 12 Apr 2017 01:06:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cyATr-0000IH-M0 for submit@debbugs.gnu.org; Wed, 12 Apr 2017 01:06:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyATl-00042y-FH for submit@debbugs.gnu.org; Wed, 12 Apr 2017 01:06:06 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36512) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cyATl-00042u-BX for submit@debbugs.gnu.org; Wed, 12 Apr 2017 01:06:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyATj-0006AV-P8 for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2017 01:06:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyATe-0003xX-OM for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2017 01:06:03 -0400 Original-Received: from nm28-vm9.bullet.mail.gq1.yahoo.com ([98.136.216.168]:59451) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1cyATe-0003wW-49 for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2017 01:05:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s2048; t=1491973556; bh=LAqCTmKdF9pFVhCGPqu3tsiFKCbsteFxQfroAKdyq94=; h=From:To:Subject:Date:From:Subject; b=OEqkvU4MZ79cV5Mcc9mEPUnMCSXYIBDS7z6ejXuMDF3FlCoAsOmymE8EK7GWCf8cjyjE0/JWSxbcN+blV/Ls+Tt0QK3OcacCSpyDUY+CpBLPsgZ/KHzsp1tGYC+4jNrobXpvtk+1IVPPKIcgmygMIcE6KoYbCFiP3MKBT/RQVWQ5hfZgEbwjKlT+xVYBT/svhpoCtAND6VcJp4rkrWHhVxl9/0mk0QdwGpcYNAxbh0rbWkrOgLSwNoGB4NihHZ66jRnVQrr58oBGynhsqgHPebVlJ+eH958BvFSHBxNE+d+nDDDhamr3h++vFZNzfn4m0pbmeb/s7cEBsrNaL73mdA== Original-Received: from [98.137.12.58] by nm28.bullet.mail.gq1.yahoo.com with NNFMP; 12 Apr 2017 05:05:56 -0000 Original-Received: from [208.71.42.200] by tm3.bullet.mail.gq1.yahoo.com with NNFMP; 12 Apr 2017 05:05:56 -0000 Original-Received: from [127.0.0.1] by smtp211.mail.gq1.yahoo.com with NNFMP; 12 Apr 2017 05:05:56 -0000 X-Yahoo-Newman-Id: 59700.73697.bm@smtp211.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: vgUtEv4VM1l7ZJp7RunwPlee7bk9U9HTH6FcAM_bVuAGpjb fF.sjtkH_pZX6oS_2IemBPOy_Wkdq7uRjDOPUdtq2Vn8m9xC3S6sXub1vP86 uvC9RFjG15.llAo4dPe41ZGeCbWJZQyXmmnJNLKdFthNcBPBjPqO.aog5V6O _g9TATiKVPkv3bR55F3RtIvbzA13_C18bEXQ4MRgJxGP31e6.xOjkHP95ARM RoNGe7J30qBKnAr1nMCEKK1AmlbWgFtVOzvg5jD8.xJgTWFwkeGAzswSx1QT Z23MgtHPzShLly1Jwur4Lz4O_0j29DsW1pxojQAZolzcTeCix0CwFts_jxRl .l6EiGTN0Vz0zS6OgMXAKifZ21BcBGTAouyTqKHfZMYBN5mL2ji2MvkDk7Eb YJzrYyT6LR.vVni2RCgd3RS07JVluoSnBVcws1fTz_fSw5BMfNTMuZa3zBrU jbOC6DiIAr0oLS0h3DJ8_9w3cJ3TBYm3o7udOAtTKNia02LE_.QaY9Q.ow4H K5GgviIKJMoZ8Glneu3E3.N9J0voD1a.s1zgO_Thydp7bJk62V6z3AiMBOpq Y X-Yahoo-SMTP: U8NKAo6swBAxDIMUovTitGGHebxdYQBZ5A-- X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:131493 Archived-At: 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.) 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] ... where I hoped it would not abort, and preferably not say a connection lost message. (Don't mind exactly when the window is closed in this case though, since kill-emacs-hook is not for interacting with the user.) xmon shows emacs gets ClientMessage WM_DELETE_WINDOW as expected, and a WM_SAVE_YOURSELF. Emacs does a bit of drawing and then closes the connection and aborts almost immediately, much sooner than 5 seconds sit-for. xmon of "save buffer" above similarly, but emacs starts doing something creating a window. Perhaps it's the start of the save-changes dialog, but it doesn't appear on screen. I tried kill-emacs-query-functions, and the connection close seems to be before it has a chance to ask user yes-or-no-p or similar. I first struck the abort with save-place saving places on exit (no buffers needing save, just save-place). But since abort happens just with a sit-for I presume it's only something about time taken, not anything specific save-place does. In GNU Emacs 25.1.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2017-01-01, modified by Debian built on x86-csail-01 Windowing system distributor 'The X.Org Foundation', version 11.0.11900000 Configured using: 'configure --build i686-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --build i686-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-lisp:/usr/share/emacs/site-lisp --with-sound=alsa --with-x=yes --with-x-toolkit=lucid --with-toolkit-scroll-bars --without-gconf --without-gsettings 'CFLAGS=-g -O2 -fdebug-prefix-map=/build/emacs25-H2ebel/emacs25-25.1+1=. -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 Important settings: value of $LANG: en_AU.iso88591 locale-coding-system: iso-latin-1-unix