From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: Uhm... weird frame behaviour Date: Mon, 12 Sep 2011 15:17:54 -0400 Message-ID: <87obypvacd.fsf@stupidchicken.com> References: <4E6C80BF.2060002@gmx.at> <4E6DCB0A.4060605@gmx.at> <87mxeaar26.fsf@wanadoo.es> <4E6DFF55.3000708@gmx.at> <87ehzlnaxj.fsf@wanadoo.es> <4E6E1D4C.7030601@gmx.at> <87littrcyy.fsf@wanadoo.es> <831uvlyckf.fsf@gnu.org> <83zki9wx4u.fsf@gnu.org> <4E6E4EC7.8070901@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1315855091 6366 80.91.229.12 (12 Sep 2011 19:18:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 12 Sep 2011 19:18:11 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 12 21:18:04 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 1R3C15-0002Ci-SV for ged-emacs-devel@m.gmane.org; Mon, 12 Sep 2011 21:18:04 +0200 Original-Received: from localhost ([::1]:36078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3C15-000479-B3 for ged-emacs-devel@m.gmane.org; Mon, 12 Sep 2011 15:18:03 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:36976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3C12-00046s-EA for emacs-devel@gnu.org; Mon, 12 Sep 2011 15:18:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3C11-0002md-DK for emacs-devel@gnu.org; Mon, 12 Sep 2011 15:18:00 -0400 Original-Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]:51696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3C10-0002mB-7D; Mon, 12 Sep 2011 15:17:58 -0400 Original-Received: from furball (dhcp-128-36-14-41.central.yale.edu [128.36.14.41]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id p8CJHs9L024898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 12 Sep 2011 15:17:55 -0400 In-Reply-To: <4E6E4EC7.8070901@gmx.at> (martin rudalics's message of "Mon, 12 Sep 2011 20:26:15 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.132.50.145 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:143948 Archived-At: martin rudalics writes: > Is there a way to get IS_DAEMON in Elisp, `initial-window-system' is > deprecated AFAICT. The function `daemonp' is for this. But I don't think daemon mode has much to do with this. The issue is more fundamental: Firstly, the function window-deletable-p should only look at frames on the current terminal. Emacs should never automatically delete the last frame on a terminal; that is obnoxious. So other-visible-frames-p needs to be changed to handle this. (Not sure why that function is in C, btw; it could be written in Lisp.) Secondly, the current code is too aggressive in deciding that a frame can be deleted. Consider the following sequence: C-h k RET C-x o => switch to the *Help* window C-x 5 2 => pop to a new frame displaying *Help* q => the frame is deleted I don't think this is quite right. The new frame was not created as a "temporary frame" for displaying the *Help* window, but by the user's explicit `C-x 5 2' command. It just so happened that a special-mode buffer was current at the time. In this situation, quit-window should not delete the frame.