all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Kevin Ryde <user42_kevin@yahoo.com.au>
Cc: 26458@debbugs.gnu.org
Subject: bug#26458: 25.1; abort on X close window
Date: Wed, 12 Apr 2017 09:14:40 +0300	[thread overview]
Message-ID: <83mvbmjgof.fsf@gnu.org> (raw)
In-Reply-To: <87r30yusjn.fsf@blah.blah> (message from Kevin Ryde on Wed, 12 Apr 2017 15:02:52 +1000)

> From: Kevin Ryde <user42_kevin@yahoo.com.au>
> 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.





  reply	other threads:[~2017-04-12  6:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-12  5:02 bug#26458: 25.1; abort on X close window Kevin Ryde
2017-04-12  6:14 ` Eli Zaretskii [this message]
2017-04-14  3:56   ` Kevin Ryde
2017-04-14  7:40     ` Eli Zaretskii
2017-04-17  6:42       ` Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83mvbmjgof.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=26458@debbugs.gnu.org \
    --cc=user42_kevin@yahoo.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.