From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#51883: 29.0.50; Command to get accidentally deleted frames back Date: Tue, 16 Nov 2021 09:53:51 +0200 Organization: LINKOV.NET Message-ID: <86a6i4v8mo.fsf@mail.linkov.net> References: <87czn1gfb1.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16967"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 51883@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 16 08:56:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmtKA-0004E1-UA for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Nov 2021 08:56:14 +0100 Original-Received: from localhost ([::1]:46608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmtK9-0001YO-HX for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 16 Nov 2021 02:56:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmtJy-0001Y2-5T for bug-gnu-emacs@gnu.org; Tue, 16 Nov 2021 02:56:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45395) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmtJx-0001hP-TP for bug-gnu-emacs@gnu.org; Tue, 16 Nov 2021 02:56:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mmtJx-0003Nw-Mo for bug-gnu-emacs@gnu.org; Tue, 16 Nov 2021 02:56:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Nov 2021 07:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51883 X-GNU-PR-Package: emacs Original-Received: via spool by 51883-submit@debbugs.gnu.org id=B51883.163704932512960 (code B ref 51883); Tue, 16 Nov 2021 07:56:01 +0000 Original-Received: (at 51883) by debbugs.gnu.org; 16 Nov 2021 07:55:25 +0000 Original-Received: from localhost ([127.0.0.1]:56941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmtJN-0003Mx-KR for submit@debbugs.gnu.org; Tue, 16 Nov 2021 02:55:25 -0500 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:41743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmtJM-0003Mi-6B for 51883@debbugs.gnu.org; Tue, 16 Nov 2021 02:55:25 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id F32DB240007; Tue, 16 Nov 2021 07:55:16 +0000 (UTC) In-Reply-To: <87czn1gfb1.fsf@web.de> (Michael Heerdegen's message of "Tue, 16 Nov 2021 00:38:42 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:220097 Archived-At: > Maybe having it in C would be better - I don't know. To avoid implementing the whole function in C, 'delete-frame' could call a hook with the frame as its arg, then you can add your code to the hook. > A more convenient access to frames killed earlier than the last one, > instead of using the prefix arg like above, might be appropriate (making > the command repeatable, maybe?) Apart from these details the above is > a start and could just go to frameset.el. Opinions? Very useful feature. And like tab-undo is bound to 'C-x t u', the frame closing undo could be bound to 'C-x 5 u'. I haven't yet tested whether your implementation restores the tab-bar as well, or maybe it would require more handling. I suspect that instead of framesets you might need to use window-state-get/window-state-put like it's used in 'clone-frame'. This means that code could go to frame.el.