From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Add function to rotate/transpose all windows Date: Wed, 25 Sep 2024 10:05:14 +0200 Message-ID: References: <87setpdv21.fsf@gmail.com> <86zfnxcg57.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20301"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: emacs-devel@gnu.org To: Eli Zaretskii , pranshu sharma Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 25 10:06:37 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 1stN2j-0005A3-F1 for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Sep 2024 10:06:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1stN1n-0006LU-Dq; Wed, 25 Sep 2024 04:05:39 -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 1stN1g-0006HS-IB for emacs-devel@gnu.org; Wed, 25 Sep 2024 04:05:34 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stN1c-0004hf-S0; Wed, 25 Sep 2024 04:05:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1727251517; x=1727856317; i=rudalics@gmx.at; bh=CNodJA1cWyNXGbygEM9a46vy8+DshCwTFcUsYWShzWI=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=sb+XMDLYJKu+u35SsYtOauZ4w5Ox1iMizse0jat+szo9jnLX1DIjgF2nTwVTBw9Z MwvOSDEMFs8T7rONFTYWqN5hvRG/xbh0EFAvlNWhIYPYWz5+20i0M/zJKOTgk/iNi 9Fl7BG+uLCE8gvhjx77svaDnRRtipE5m/cs+h2jMvypKuPtshn2cBdxl83vrlqshs ehVqw9Q5uxy8nQfSmRpd87bsFwbHGaglaBTRTOUQxVs1f7PfcL80pxg777+KGmacz qzBEq3fgCHqVPstViTcIRr2CMP17sWLBdkcWmM3E6syxi8GRNqCK2MU9/a8jadd+K Zb23wxNeEq+gYkrXog== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([212.95.5.44]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MiaYJ-1sFvX01t7H-00pCkk; Wed, 25 Sep 2024 10:05:17 +0200 Content-Language: en-US In-Reply-To: <86zfnxcg57.fsf@gnu.org> X-Provags-ID: V03:K1:lESOJwdGm2/33Tlnb6EB69lhyw/V8PKixFN1E6UYxmEwTE79h0y KnDl0dzArPFw6wvXp/XMuQxWTDx8x4vdXePpHevV9MWaQsGDRqokI0KtSy2AqfwQTb6HEIH mJJsFKj7tVmFvzhBM/ZHokzheekXo4xpwByWMI8ed2+/oeDj7Bizd42SANfhvly9Ts1yS7n 6AN2ioyI4wtjCWzaa9YIw== UI-OutboundReport: notjunk:1;M01:P0:9jwn9L7kKVw=;oth3m2pLRrKDaaWUlz/4dpm0Th5 nVr3Lb/tmtcezVIofzjgmzu7xLGsQN3yTPSuar3sQ2WTpbwZl44AYrg2mAH+5rP2IxPpngYE9 QsKcur0XpV8ZI3Hr5d4CulW+1Mu3wL5kOILexiGB/abpn1DikCbmKkbHPxssPDpXvVpSGEG57 h+Bd15uhUu7G+QgyAaFsnXsFfEuTn9fSS/g0JgtSZ03+eEyL7GnuI/TC4O9WWIP25LIio+ZRx RemVn3A2+/VXBzVOGyJDdIuF6uJcpiGfZzpFdtBzD7my0+TQ2qzWJgKuScQFxH2FpmnhGOYMh kWMyE7FpB8EZiSy7zNZU8naBd1kZvYcTVJqDnrQMVpwXd2Qn33NF9+IExCmxdty52CGsSIhyp aTu6f4i7QYQ1WSJX+kDzlatUmhjz3/v3JBwpStz5oWwrF9emofJyEF8ZFn9DRcB2832bZ3mnf s3h23rBPZ6b007s37JjQzRQmmSMAjx52Dhr4vpJ68w379IN6fbXwr2r95KzX6dIZ9fbhVHVIH wub1E3PBbisngCDpIrl/ZzJhl4sqDJzU60gRO5pdQxthgdnj8R7NKdB/ii7qIgvoIUKskB9g1 0AlUpDZ7TgwTYm4jn5LqiAnMRNTucI/44Mrusjixlb/4OKvNgSdcKPkwr6wkbeTgoMIXuMWn1 NhFPhduiqHAWEp4SdNqZyX9pKmw2IaHSxX3167jrEHt38pnoiy/meyypO1v+B2mqxktjhIRxu 1RqQ8a8fN82JKIdZp0PpF8b8RHzW7evV9OFEMJizi1I7MowJSUzUQyLa+hTEvaQgHDybFsN2 Received-SPF: pass client-ip=212.227.17.22; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -36 X-Spam_score: -3.7 X-Spam_bar: --- X-Spam_report: (-3.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.898, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:324052 Archived-At: >> https://www.emacswiki.org/emacs/TransposeFrame >> The code in this has the following limitations: >> - Does not work in emacs 29.1 It works here when I remove the (window-redisplay-end-trigger tree) (set-window-redisplay-end-trigger window (pop config)) lines in such versions. >> - No good way to transpose only specific parts of window tree Then the FRAME arguments should probably become WINDOW-OR-FRAME and accept arbitrary internal windows as value. > Thanks. > > Martin, any comments or suggestions? The problem of any such package is that Emacs never provided a suitable balance between explicit management of objects like buffers or windows (via 'kill-buffer' and 'delete-window') and the subsequent internal handling of these objects. In particular, the 'delete-window'/'split-window' paradigm may fail when window objects have been stored in variables. Take this excerpt from TransposeFrame (if (eq (overlay-get ol 'window) orig-window) (overlay-put ol 'window window)))) If this gets called within a 'save-window-excursion', then the 'window' property of overlays may change from 'orig-window' to 'window'. When 'save-window-excursion' exits and restores 'orig-window' and deletes 'window', these overlays will now reference a dead window. This problem could be partially fixed by using the 'clone-of' parameter of the window. But that would fail when windows are rotated a second time. Such problems could be fixed if we were able to reference windows by their number (or an arbitrary name) and have Lisp references to a window use that number instead of the object. It might, however, take considerable time to have such a concept enter the minds of people used to storing window identities as Lisp objects. martin