From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#51883: 29.0.50; Command to get accidentally deleted frames back Date: Fri, 21 Jan 2022 12:52:35 -0500 Message-ID: References: <87czn1gfb1.fsf@web.de> <838rxo0zk7.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25176"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: michael_heerdegen@web.de, Gregory Heytings , 51883@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 21 19:24:17 2022 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 1nAya8-0006M8-IR for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 Jan 2022 19:24:16 +0100 Original-Received: from localhost ([::1]:50574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAya7-000079-IC for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 Jan 2022 13:24:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAy5z-0003iY-5J for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2022 12:53:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42115) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nAy5u-0002gb-6F for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2022 12:53:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nAy5t-0005FD-U0 for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2022 12:53:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jan 2022 17:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51883 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51883-submit@debbugs.gnu.org id=B51883.164278756520135 (code B ref 51883); Fri, 21 Jan 2022 17:53:01 +0000 Original-Received: (at 51883) by debbugs.gnu.org; 21 Jan 2022 17:52:45 +0000 Original-Received: from localhost ([127.0.0.1]:35018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nAy5d-0005Eg-Gn for submit@debbugs.gnu.org; Fri, 21 Jan 2022 12:52:45 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:21964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nAy5b-0005ET-Fx for 51883@debbugs.gnu.org; Fri, 21 Jan 2022 12:52:44 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C29B844267E; Fri, 21 Jan 2022 12:52:37 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3710D441002; Fri, 21 Jan 2022 12:52:36 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1642787556; bh=kP5nR34wdvvE2cm1PCpL3YYr0vMrucmVyzW2ng7VpAk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=erbvFyw6EAOi+nL00eceDcDRheeJOqEGPqwD1j7DgQ1j27P86kFWuNnSIU6b9O1Jc WKA+JlogkG/unBgVwOeW1mseO3hVGPAoXhxtB/gkYfBfU41qWnCMeNXBB7qC7YZmu9 ArX7Wad9a9jRFQVDdXFpToxtp2d/c5ugxAbsXEJ1zf1TDB40j8G+KOUW2phx9jEqs0 BAVG5wxCPHKlIxH1PF3d4OXRwWWDTSInNUaQ9avZGO+GlnMm26QoX18Xe2k/bpOhaJ 9H3E/wtsqDtwT2V65zj5GcOxl85qVFC8eD2DhFRMttsUTE/mvHpWCbfabvCccnFE6I DDu4XJaHgLpsA== Original-Received: from alfajor (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2165612047E; Fri, 21 Jan 2022 12:52:36 -0500 (EST) In-Reply-To: <838rxo0zk7.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 16 Nov 2021 19:40:08 +0200") 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:224790 Archived-At: Eli Zaretskii [2021-11-16 19:40:08] wrote: >> +(add-hook 'delete-frame-functions #'undeleted-frame--save-deleted-frame) > > I'd rather we didn't do that by default. Several reasons: > > . the startup code deletes the terminal frame, so the above means we > will always load frameset, which is not a small package, at > startup, even if the user has no use for this functionality Clearly we should avoid putting the special initial-frame in the undo log since we don't want (and can't) recreate it later anyway. But as for loading the package, the problem is more general in the sense that maybe we should refrain from loading the package just because a frame is deleted. So maybe we should change the code so the hook's function doesn't require loading `frameset.el`. AFAICT fundamentally, the only function from `frameset.el` that it needs is `frameset-filter-params`, so maybe we should move some of that code to `frame.el`. To make up for it, maybe we can move some of the `undelete-frame` code to `frameset.el` since it can't be used without `frameset.el` anyway? > . saving configurations of 16 deleted frames _by_default_ means we > again impose on all users something that only some of them will use IIUC framesets are designed to be serializable so they shouldn't hold on to external data like buffers and windows, so such 16 elements should cost very little in terms of heap use. Stefan