From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Add function to rotate/transpose all windows Date: Sat, 28 Sep 2024 14:35:48 +0300 Message-ID: <86v7yg57u3.fsf@gnu.org> References: <87setpdv21.fsf@gmail.com> <86zfnxcg57.fsf@gnu.org> <877cb09ln4.fsf@gmail.com> <9005cccc-7545-4257-b2c0-885a13d3bde2@gmx.at> <86o74aa41b.fsf@gnu.org> <3d4546ac-70d9-4865-b42d-0dc50cb0f3a7@gmx.at> <86zfns6vjw.fsf@gnu.org> <1bcc1236-0a12-4988-bb77-4cd38fc95b42@gmx.at> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34420"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pranshusharma366@gmail.com, emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 28 13:36:51 2024 Return-path: Envelope-to: ged-emacs-devel@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 1suVko-0008mD-M1 for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Sep 2024 13:36:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1suVjx-0008Ix-EX; Sat, 28 Sep 2024 07:35:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1suVju-000831-1C for emacs-devel@gnu.org; Sat, 28 Sep 2024 07:35:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1suVjs-0007LM-IY; Sat, 28 Sep 2024 07:35:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=yrYdFvi6d3t2Fc1yh9xo8s8MZeEUFKods5V6bFnCjcY=; b=EW521tiSLgqO kjF1lrNuGsdZvZJgsLWJE/metAhaAi1aOqb0xKlLTTT8nR8YwcsXtJaFzGPxJdQrz34RDGdB1RZc6 4uOkXIKFACXXNnKU9dZsViy3ICs5D3virvOGCQFrCntwL30zCXIf9jeXSxTb7F3zl9F5qogXBYB7H oqUOPQc4YW6Ce/kiN0eRGWDz3B0wPW6Ptc+zq1SctVR/Ti0ugBFZ9SFnpMzpSwWkuP/GN/sMqjcgQ 4EaEhBbTN+90Cg0B9y2lfyw9FImFX7fIE1e0Yem/V9wgT6Ed81IhrxPpMOPpniPjZZ4F45HNHjYfk wrDJKUK5M+vLm4ZRKnam2Q==; In-Reply-To: <1bcc1236-0a12-4988-bb77-4cd38fc95b42@gmx.at> (message from martin rudalics on Sat, 28 Sep 2024 11:40:27 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:324166 Archived-At: > Date: Sat, 28 Sep 2024 11:40:27 +0200 > Cc: pranshusharma366@gmail.com, emacs-devel@gnu.org > From: martin rudalics > > >> + if (!BUFFERP (r->old_buffer)) > >> + error ("Dead reference window was not a live window"); > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > This seems to imply that the function expects a dead window to be a > > live window(??). > > In our misleading terminology a dead window can be either (i) a former > live window or (ii) an internal or former internal window. I have to > exclude (ii) because an internal window should never become a leaf > window and vice-versa. So maybe this is better: Dead REFER window was not a leaf window" > >> + else if (!WINDOW_LIVE_P (refer)) > >> + error ("Reference window must not be internal"); > > > > Are we sure "internal" here will be understood? How about using "leaf > > window" instead? > > But it's the opposite - a "non-leaf window". Yes, so I suggested replacing "must not be internal" with "must be a leaf window". Is that wrong? > >> unchain_marker (XMARKER (w->start)); > >> + wset_old_buffer (w, w->contents); > > > > What is this about? > > When we make a new window and delete it before redisplay runs > window_change_functions for the first time, the old buffer of the window > is nil. But that would have caused the "Dead reference window's old > buffer is dead" error with the earlier proposed 'resurrect-window' while > in fact the window (made by 'split-window' right before) did have an old > buffer. It has no significance for the new 'split-window'. So this fixes a related but different bug?