From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.bugs Subject: bug#33498: 26.1; Unable to delete minibuffer-only+child frames Date: Mon, 26 Nov 2018 19:59:37 +0100 Message-ID: <871s77hdgm.fsf@hochschule-trier.de> References: <8736rpfklv.fsf@hochschule-trier.de> <5BFADE8C.9040500@gmx.at> <87h8g5ggft.fsf@hochschule-trier.de> <5BFAF08C.6080500@gmx.at> <87d0qtgdfx.fsf@hochschule-trier.de> <5BFBBD5A.4060002@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1543258694 7666 195.159.176.226 (26 Nov 2018 18:58:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Nov 2018 18:58:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 33498@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 26 19:58:09 2018 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 1gRM5B-0001rC-GO for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Nov 2018 19:58:09 +0100 Original-Received: from localhost ([::1]:38246 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRM7I-0005Zq-4j for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Nov 2018 14:00:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRM75-0005VL-QI for bug-gnu-emacs@gnu.org; Mon, 26 Nov 2018 14:00:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRM70-0006uC-Ri for bug-gnu-emacs@gnu.org; Mon, 26 Nov 2018 14:00:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45850) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gRM70-0006u6-Hd for bug-gnu-emacs@gnu.org; Mon, 26 Nov 2018 14:00:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gRM70-00078G-EA for bug-gnu-emacs@gnu.org; Mon, 26 Nov 2018 14:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Politz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Nov 2018 19:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33498 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33498-submit@debbugs.gnu.org id=B33498.154325878427369 (code B ref 33498); Mon, 26 Nov 2018 19:00:02 +0000 Original-Received: (at 33498) by debbugs.gnu.org; 26 Nov 2018 18:59:44 +0000 Original-Received: from localhost ([127.0.0.1]:50108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRM6i-00077N-Cd for submit@debbugs.gnu.org; Mon, 26 Nov 2018 13:59:44 -0500 Original-Received: from gateway-a.fh-trier.de ([143.93.54.181]:50194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRM6g-00077C-DM for 33498@debbugs.gnu.org; Mon, 26 Nov 2018 13:59:43 -0500 X-Virus-Scanned: by Amavisd-new + Sophos + ClamAV [Rechenzentrum Hochschule Trier (RZ/HT)] Original-Received: from localhost (x4db25101.dyn.telefonica.de [77.178.81.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id 2F5A117D2599; Mon, 26 Nov 2018 19:59:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=hochschule-trier.de; s=default; t=1543258778; bh=S8ek+EAKHHzQoM42PzC8BM1DqaA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=MrF1R/hwA9XZ/L76b/O9bmtOOvtBe6apqZk81cMaF9LwJmNLcr8QbjT+SNrP7/crF lVe4ie3bxQ1NpC8JPfyQRpgt8ETScyGRm97swGYAXuisHXWZkdpxblGABlYXtFgGbb s/d9w44ShZvAz+9V32odeb5PYTePLbmsvMxuBUUY= In-Reply-To: <5BFBBD5A.4060002@gmx.at> (martin rudalics's message of "Mon, 26 Nov 2018 10:31:06 +0100") 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:152798 Archived-At: Thanks for the detailed explanation. I was looking for a way to have the minibuffer at the top of the frame, which you'd probably already guessed. martin rudalics writes: > These operations would have to be automatized and improved as follows: > > Process a (minibuffer . child-frame) frame parameter to > > (1) make an _invisible_ top-level minibuffer-only frame similar to > what we are doing in the (minibuffer . nil) case, > > (2) create the minibuffer-less parent frame with the minibuffer window > set to the window made in (1), > > (3) reparent the minibuffer frame created in (1) and make it visible. Should this be a dedicated function, e.g. make-frame-with-minibuffer-child. Or a behavior triggered by an additional frame-parameter passed to the parent ? > Then deleting the parent frame would > > (4) make the minibuffer frame invisible and top-level, > > (5) delete the parent frame, > > (6) delete the minibuffer frame if possible or make it visible if it > still serves as minibuffer frame for another frame. > > (4)-(5) would have to handle the cases correctly where delete_frame > (the C function) is called from Elisp (via C-x 5 0, for example) and > from the window manager (by clicking the "x" on the title bar). The > Elisp call would not shut down Emacs, the window manager call could. > It seems to me that this code should go into Fdelete_frame ? > To process (6) we would maybe also want an 'auto-delete-minibuffer' > frame parameter (which could then be also used for non-child-frame > minibuffer-only frames). > > Finally, any such code will have to process the 'delete-before' frame > parameter appropriately to avoid running into an infinite loop of > failed deletion attempts. What if we allow the deletion of a minibuffer frame, if it will not violate the invariant that all frames have a minibuffer, i.e. because the frame in question will be deleted some time later (because this operation is already on the call-stack.). I don't know if this temporary violation (i.e. between deleting the child-minibuffer and deleting the parent) is a problem. Anyway, this would enable the user to delete these kinds of frames normally, even if it looks jerky. And then implement the special minibuffer-as-child-frame behavior and logic via dedicated functions, which display and undsiplay these frames nicely. (Still, delete-frame would have to be redirected to some proxy handling this case.) Andreas