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, 27 Nov 2024 10:18:47 +0100 Message-ID: <9b460366-f34e-48f6-a680-e7fa5bc7f598@gmx.at> References: <87setpdv21.fsf@gmail.com> <87wmhb2yew.fsf@gmail.com> <801bbd24-8f79-48a4-9615-f5ef21b2341e@gmx.at> <87ikstsu7f.fsf@gmail.com> <68dc98d6-42c0-431a-aefe-eecb02991764@gmx.at> <875xosy316.fsf@gmail.com> <87bjyfcncu.fsf@gmail.com> <87cyiuefxs.fsf@gmail.com> <878qthewbq.fsf@gmail.com> <8599bc67-b05d-4afc-8e6e-1ba64a30054e@gmx.at> <87frnp2x85.fsf@gmail.com> <823c7cca-63d4-4568-94bc-11f5949d6c5c@gmx.at> <87h683muss.fsf@gmail.com> <02432e6c-6ee2-4c68-9ebb-246f6be88918@gmx.at> <877c8wadke.fsf@gmail.com> <878qt8spp2.fsf@gmail.com> <0ce35c7a-8b28-4905-a6ab-caf50f2fc750@gmx.at> <87mshl2i6h.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="33044"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Juri Linkov , Eli Zaretskii , emacs-devel@gnu.org To: Pranshu Sharma Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 27 10:19:11 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 1tGECU-0008Pm-Uj for ged-emacs-devel@m.gmane-mx.org; Wed, 27 Nov 2024 10:19:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGECH-0000iB-CF; Wed, 27 Nov 2024 04:18:57 -0500 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 1tGECE-0000Mi-Hs for emacs-devel@gnu.org; Wed, 27 Nov 2024 04:18:54 -0500 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 1tGECC-0005c5-PN; Wed, 27 Nov 2024 04:18:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1732699128; x=1733303928; i=rudalics@gmx.at; bh=dnokKXRePPwOd4zPu7hZrs67Yl2OK0y0fhuTduZeFQY=; 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=sjhMfXy5qioCVgyAuu2z6aq7TBSg3GGkgU693udMD6EWMEGd+88apOWlhF5uH4Z5 zYjk8UcgUi9flWmWySyHjxw3qH5+xjpjht0L6EReXkb/YTl2mcVwwvfIIo926/AKu ZYO/dF2FDEvELWhy6kGC07SvnPg+F08max66KInHCJOhq3qyQ4TWgT+jszAlM0j3b T7OXYm2a7rAmxebuJZ4c67bk4YSU4GqzTq212v3naaw3WkYZxYzzvELje+gOZny6y NYIFA4w/kEMynanqgpSDRvvKNefBb/RuS5bVQguDlLULLGKotxBE/0rE0ogb7os2q Eq5mvye+brpqNqBFTA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([212.95.5.209]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MKsj7-1szwlJ2dW1-00JvkE; Wed, 27 Nov 2024 10:18:48 +0100 Content-Language: en-US In-Reply-To: <87mshl2i6h.fsf@gmail.com> X-Provags-ID: V03:K1:6x4UmNw/1oF1IVp6WOjWH2fAQlx6yn1OCMajt1bs06Os1uI4AhF tCG4gmEowpDguy87C6SZHpagfvOzKIml5HUOVGiL/gUhQqaz7jgjnKfSn2uKSMfwlGGsR1u 5aBCxN2fbdfqHgLJU2GKzzIGgOQrZU6gDHXEiZ2RHc0tNDX4OSjPLOxCnirQYRT7yvclVBm BW2ZK15SvoVfswaNpd4Ow== UI-OutboundReport: notjunk:1;M01:P0:IgsZIrBIox8=;dn6h7z1yitu449HnPfstqRYCLLF DhccA4hqgRJyRFCehiYz0dgijHGFFH5ltHY3yJV5Fn9rf+DsfXwOqJbhbgrpjzgw65i9vOpGe WAWU12MbYq9Gz1BB2AvAZfUef2lsPY+fDkcCfFp0Z0VhVwvoHXfOICDf0ZHVq7zcoHNgzvBSE rsNIz/Ifac8IebjkksaH2s75UWPjQcjVoVXconpkpmg4Ikog4ickDrUTlXh0iQACR3T6qAnHq EMMdPorrt8U1gsg2xArdrbl68C1dfqbnfjzzMS2Oj9nsFg3LMKBwD5KBDtvKBDQDBAewee3b3 K8oSwNhBwiDH5iukARn6h9mLkEvOrNz8Qflp8WGebN3e8uz2O93cIXIaByr/Q8Xa7Vy6CO3wP 9sgptNraK+KFzwuzyr69evQb/43dYCGYElVRl9AQLr6QAhBfdjT5BuwKqPvLy9TZPh+BRuYA2 rsRc6DG/jPm0X74YRk+BihcT7D2Qh4axo7EJemWhAZ6wzybynCc3x2U85AvdSLHq1YFyOKyAE ietYFpzN7qc22lAsGfIMM11twv5imGUxJDMbAJKyJg1LjxwvnTSrm+RypJ18VR16x7p9Be5R1 TVw99egzstoNfsDV1qIA4Pj3QW37NPSIXLbtImBu3dmoVygXb353oPMFjRl6a9ObewRh7PIZ3 ieRYEYCV9GvP+wd8cA6V7v2CeoN2q6sg3CAG3g6PXkby4tQKRhveyQ98qrzsfqfIzhWZyWkEN P7MDVULg4eJB9t14fwVsUlj1lF2qU45xeIm18jwqFBj37Yzqg4iS38eE7UOX2xJB3xTITMWm Received-SPF: pass client-ip=212.227.17.22; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 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.931, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:325745 Archived-At: > As of rn, compiling emacs bug outs for leim for some reason, so I can't > compile with the improvemnt, but I got it to work. What is the bug? > One thing you do in the code is check if parent of prev is equal to > current window, which is my mind must be true cuz is it isn't, then it > would go thoruhg another level of nesting. That's possible. I told you that my code is likely over-engineered. Your last version reuses all parent windows as expected so we should be done in principle. I see some problem with the sizes. Rotating a C-x 2 C-x o C-x 3 C-x 3 C-x 3 layout a couple of times continuously shrinks here one of the C-x 3 created windows in the middle down to its minimum size which does not look ideal. Could you try using 'window-normal-size' as I did in window-rotate.el? It should be able to preserve initial sizes better than using the real sizes as you do. The only clue here is that the normal size of a window is always relative to the size of its parent and not to that of the root window. martin