From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: Killing a frame sometimes kills emacs Date: Tue, 11 Oct 2011 16:53:24 +0200 Message-ID: <87sjmzbmvv.fsf@thinkpad.tsdh.de> References: <87d3flnxoo.fsf@thinkpad.tsdh.de> <83fwkhdld0.fsf@gnu.org> <871uw04lr9.fsf@thinkpad.tsdh.de> <87sjog35jj.fsf@thinkpad.tsdh.de> <4E5F7ECD.9060601@swipnet.se> <838vq8e0x5.fsf@gnu.org> <87sjn03tzx.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1318344836 10665 80.91.229.12 (11 Oct 2011 14:53:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 Oct 2011 14:53:56 +0000 (UTC) Cc: Eli Zaretskii , "Jan D." , schwab@linux-m68k.org, Ulrich Mueller , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 11 16:53:48 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RDdiF-0001OU-03 for ged-emacs-devel@m.gmane.org; Tue, 11 Oct 2011 16:53:47 +0200 Original-Received: from localhost ([::1]:54472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDdiD-0006bw-Ts for ged-emacs-devel@m.gmane.org; Tue, 11 Oct 2011 10:53:45 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:54819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDdi8-0006bg-H2 for emacs-devel@gnu.org; Tue, 11 Oct 2011 10:53:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDdi0-0004A7-Mb for emacs-devel@gnu.org; Tue, 11 Oct 2011 10:53:40 -0400 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:57821) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDdhy-00049N-MS; Tue, 11 Oct 2011 10:53:30 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 6133DD22E1; Tue, 11 Oct 2011 16:53:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at uni-koblenz.de Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yoPnIIhvxAeE; Tue, 11 Oct 2011 16:53:27 +0200 (CEST) X-CHKRCPT: Envelopesender noch thorn@fastmail.fm Original-Received: from thinkpad.tsdh.de (tsdh.uni-koblenz.de [141.26.67.142]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id 58458D22D7; Tue, 11 Oct 2011 16:53:27 +0200 (CEST) User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 141.26.64.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:144891 Archived-At: Stefan Monnier writes: Hi Stefan, >> With resepect to the Emacs 24 release, it's very likely that a lot of >> users will suffer from this issue, so although it's a gtk bug, there >> should be some workaround (probably enabled by default). > > I can't imagine why "a lot of users" would run Emacs with different > (but equivalent) values of $DISPLAY. They don't do that intentionally, it's a bug in GTK: https://bugzilla.gnome.org/show_bug.cgi?id=85715#c55 [Ulrich, I added you to Cc because you commented on the report above, so you probably know a bit better about what's going wrong there.] The problem in my usecase is that when I fire up emacs or emacsclient -c from the GNOME3 application menu or the run command dialog, it says it is on DISPLAY :0, i.e., (x-display-list) returns (":0"). In contrast, when I start emacs or emacsclient -c from a GNOME terminal or the file manager or web browser fire up an emacsclient -c, because I've set that up as default application for text files, the DISPLAY is :0.0. So as soon as I mix these two invocation styles, (x-display-list) returns (":0" ":0.0"). Those displays are different, and when I delete the last frame on one of the (equivalent) displays, emacs (including the original frames on the other displays) are killed. Not sure who kills emacs. Reading the bug report above, it seems that GTK deletes the display, and then emacs crashes because its display is gone. Maybe a workaround could be to initially tell GTK that emacs runs on both :0 and :0.0, so that GTK never thinks the last frame is going to be deleted. Bye, Tassilo