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: Sat, 28 Sep 2024 16:48:25 +0200 Message-ID: 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> <878qvcgqpu.fsf@gmail.com> <0138d382-8e63-4b53-8c2c-fece826a7d0a@gmx.at> <87plooaw1w.fsf@gmail.com> 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="37716"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Eli Zaretskii , emacs-devel@gnu.org To: pranshu sharma Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 28 16:49:30 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 1suYlG-0009d3-I0 for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Sep 2024 16:49:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1suYkT-0000Do-0C; Sat, 28 Sep 2024 10:48:41 -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 1suYkI-0000D8-Ra for emacs-devel@gnu.org; Sat, 28 Sep 2024 10:48:31 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1suYkH-0003tx-3V; Sat, 28 Sep 2024 10:48:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1727534906; x=1728139706; i=rudalics@gmx.at; bh=j4ef1IlZwzm4WDI23gtE4hsag/nOJ8lH3B77w0JGTZE=; 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=gxZTDDtn77Fw8ZrBB5Li1y8FX2dlXTq2esqZZIk7ARCBVD/Zp/9Q30zFokGePP8R jfB27EcwSsPLFj272u7Me1qFjtDE2ea7l5WWbwooGEmaTszUmu4JOIKZiScXJ1VON WXOz1MXFxzvIbZJHsAiIUt8/rthjYU9TJVxdwLlmDhqoaWc7WQOrjgmi6QqtNrgM2 u2Ukt05qkE/MK2CLmrjHt4CNkT818IEeJBlzGJlqW9OC+knvTy9hOfuy9Od7SQ/TT r/0areiFBKzvCRVZT2p94GrDBT0DczkG1RR4Sph8+ttvXnzuyEmGef+z8A1xyJ8ZE TbmMsvSfpAFFcyaUMQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([212.95.5.151]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N8ob6-1rsQn60ZpG-016ddA; Sat, 28 Sep 2024 16:48:26 +0200 Content-Language: en-US In-Reply-To: <87plooaw1w.fsf@gmail.com> X-Provags-ID: V03:K1:GsFHy1Qlyu9cqIYapSoaVg9RLg5uiRXowcO6Brxu5C7lNKVQ3gx saRCIRzmm89dhyFQjagj6xew8d9x5kuNANZ+q+JH31BSFXoW2JEQqyytC2iCrvdw29bS0oa 0nPR6UuZE7ZW2i3KrATmuU38yzcF7WHLoAFAbx0Y13mAssMlXpZRiHQHJYExKuaOd/hyNQ6 BsKgiMbUgZhniSZpwvNSw== UI-OutboundReport: notjunk:1;M01:P0:cTn1wjLzRLQ=;5qucckuJT9ZJBVFpVaF5rAw2v+u 9xVKL8mDlQKEHHQwpOeM9VNhDxn80pMBf3+583QYTBT0mBSbw/ZUWIHMOYBM6EAfELeNDxpwT FZJMOHhpwcDiPTVCw6taJYUyWQsyHdFDYecD+HkeBC+QIo6V6A4t6UoeUL6bm8CXKZblzqVVI KN3JFA/JxMJ79nDwEX6T+44rGLS1qEygmjnla6fuP1y/XHYvZGrTCXk3YGDALJ0x1Ts+LcE3q Fu3vmHvLaP1SzZDPDqR8ODJO6KfzcTAJADK4XkYHADfnqEv4eoIcbsHsAwmaxM5yZy0+R3PJ2 ipeUk7eLVWS7mXAA5/Lc/5NN2yTkrn2keuaygGK3gm0Jk2x/8TbW6HDYxNKc7He7xQP1vwrAw 2wUyF5UII3oWlrSs6gqVhqEtauGunabwLiedUctvfBJ+4Ils9x7t7ahzu+HGr/BVD1tpIA/aG I1xMjcL8sFbwdxGp5LHGFpu8AQ0XaJqKBbSoiNZI17xA85Pi2lnak8Xxltq9IydlmHqVo+/js uD9QUKcv0fFAOW/q05HQaY4vXBoTZniOSGVi4m8LCVsmQZoC6/V4isoVsxOaqJQZlgG/H9kEK 9FlDxWTln57zgbtwG5vE3IcfiOoV4Xi9upu0dTC+690zd63PApfKcCSstB7HS23MbSi+fhcDB IX7QLWeecMMv7YAjSufd84a5UzEJLgMJVLcOH7kyTdnu1WAdZCZdevwWFHKp75oWNG1jewX8a fb2xjvyUf7Ct0DQEoq05LwTntDSZuEwQ3FBifBNE/TDC5wc9cNjOSVc1EFd9ATlyTGr7FLML Received-SPF: pass client-ip=212.227.15.19; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_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:324172 Archived-At: > Say you save window layout: > - +----+--+ > - | A |C | > - |____|__| > - | B | > - +-------+ > > (car (window-tree)) returns: > > > (t (0 0 137 30) > ;; Following sexp is returned by (caddar (window-tree)) > (nil (0 0 137 15) > # > #) > #) > > In a scinario like this, where (caddar (window-tree)) is a list, the > function does not work as it will not have any anchor point. Do you mean that your function doesn't work because A has to be split twice - once to produce B and then to produce C? > However transpose-frame will work on the following layout, as it can > anchor of A > > - +------+----+--+ > - | | B |C | > - | A |____|__| > - | | C | > - +------+-------+ What is the anchor point here? Does it work because you have to split A once only and then deal with the split off window only? I don't know how to help you but I suppose your function should work by extracting from the window tree all windows on the same level and recursively apply itself on the respective tails of the window tree at that level. >> Whatever you do someone has to delete all "other" windows and start with >> one specific live window that you subsequently split. > > wdym? The standard case is where you rotate the entire window tree of a frame. In that case you would call 'delete-other-windows' and start splitting. But in your initial posting you said that TransposeFrame has "No good way to transpose only specific parts of window tree". Suppose you have the configuration you just mentioned +------+----+--+ | | B |C | | A |____|__| | | D | +------+-------+ and want to leave A in place. So you have to delete the other windows C and D first and then start splitting B (alternatively, you could temporarily bind the 'no-delete-other-windows' parameter of A to t and reset it after calling 'delete-other-windows' on B). martin