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: Thu, 27 Jan 2022 19:21:24 +0200 Organization: LINKOV.NET Message-ID: <86ilu5857v.fsf@mail.linkov.net> References: <87czn1gfb1.fsf@web.de> <838rxo0zk7.fsf@gnu.org> <86lez73auf.fsf@mail.linkov.net> <86y236vlfm.fsf@mail.linkov.net> <86zgnms469.fsf@mail.linkov.net> <8635ld0zq7.fsf@mail.linkov.net> <838rv5j87a.fsf@gnu.org> <83o840huco.fsf@gnu.org> <91592ff6-3f5b-0fbc-27d0-7681240b5641@gmx.at> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3324"; 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: michael_heerdegen@web.de, gregory@heytings.org, 51883@debbugs.gnu.org, monnier@iro.umontreal.ca To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 27 19:09:27 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 1nD9D5-0000lY-Ay for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Jan 2022 19:09:27 +0100 Original-Received: from localhost ([::1]:60480 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nD9D4-0000WH-6B for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Jan 2022 13:09:26 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nD8W7-0000Rr-BG for bug-gnu-emacs@gnu.org; Thu, 27 Jan 2022 12:25:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35307) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nD8W7-000699-0s for bug-gnu-emacs@gnu.org; Thu, 27 Jan 2022 12:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nD8W6-0003k9-Um for bug-gnu-emacs@gnu.org; Thu, 27 Jan 2022 12:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Jan 2022 17:25:02 +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.164330429714354 (code B ref 51883); Thu, 27 Jan 2022 17:25:02 +0000 Original-Received: (at 51883) by debbugs.gnu.org; 27 Jan 2022 17:24:57 +0000 Original-Received: from localhost ([127.0.0.1]:56439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nD8W1-0003jS-LQ for submit@debbugs.gnu.org; Thu, 27 Jan 2022 12:24:57 -0500 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:56489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nD8Vv-0003iy-Ng for 51883@debbugs.gnu.org; Thu, 27 Jan 2022 12:24:52 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 15A6FFF80C; Thu, 27 Jan 2022 17:24:42 +0000 (UTC) In-Reply-To: <91592ff6-3f5b-0fbc-27d0-7681240b5641@gmx.at> (martin rudalics's message of "Tue, 25 Jan 2022 16:58:15 +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:225381 Archived-At: --=-=-= Content-Type: text/plain >> Which other parameters would you suggest to remove (on master)? > > It would be pretentious to answer that question. The comment starting > at line 261 of frameset.el tells that > > ;; - `window-id', `outer-window-id', `parent-id': They are assigned > ;; automatically and cannot be set, so keeping them is harmless, but they > ;; add clutter. `window-system' is similar: it's assigned at frame > ;; creation, and does not serve any useful purpose later. > > so according to that comment, leaving 'parent-id' in the list should not > have caused any problems. Thanks to Juri, we know better now. I confirm that removing 'parent-id' is sufficient to fix the bug in Emacs 28. So here is the minimal patch for the release branch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=clone-frame.patch diff --git a/lisp/frame.el b/lisp/frame.el index 86c52dc438..69119b4c24 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -798,8 +798,9 @@ clone-frame (windows (unless no-windows (window-state-get (frame-root-window frame)))) (default-frame-alist - (seq-remove (lambda (elem) (eq (car elem) 'name)) - (frame-parameters frame))) + (seq-remove (lambda (elem) + (memq (car elem) '(name parent-id))) + (frame-parameters frame))) (new-frame (make-frame))) (when windows (window-state-put windows (frame-root-window new-frame) 'safe)) --=-=-=--