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: Sun, 10 Nov 2024 17:36:36 +0100 Message-ID: <801bbd24-8f79-48a4-9615-f5ef21b2341e@gmx.at> References: <87setpdv21.fsf@gmail.com> <87frotqx90.fsf@gmail.com> <87y12iyidd.fsf@gmail.com> <87iktld1bd.fsf@gmail.com> <87r085r2gl.fsf@gmail.com> <87zfms6z1a.fsf@gmail.com> <71571413-02ba-4e3c-ad43-35c110811fab@gmx.at> <875xpfns32.fsf@gmail.com> <0a2f09a0-4115-4421-a391-30d27e7d0821@gmx.at> <87ses9k9wo.fsf@gmail.com> <877c9ersei.fsf@gmail.com> <51068b75-e12d-4161-9a63-8c280e8b2668@gmx.at> <8734k1gnt9.fsf@gmail.com> <8a2007d9-d501-404b-966d-57a7a51310ef@gmx.at> <87ses0r81d.fsf@gmail.com> <69658762-5fc7-4a9d-9262-528dfd9e93cd@gmx.at> <87wmhb2yew.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="10165"; 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 Sun Nov 10 17:37:39 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 1tAAwU-0002X6-MM for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Nov 2024 17:37:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAAvc-0002Sr-Dv; Sun, 10 Nov 2024 11:36:44 -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 1tAAvb-0002SS-1f for emacs-devel@gnu.org; Sun, 10 Nov 2024 11:36:43 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tAAvZ-0003XN-64; Sun, 10 Nov 2024 11:36:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.at; s=s31663417; t=1731256597; x=1731861397; i=rudalics@gmx.at; bh=ytZNG6SUVI9puwpIrPd4GiEHaeIURWqV8ziLoFgQLE8=; 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=QhtcooUaawZy6ekZ5r/O/6XM/natjeymSN1UEg3oWL6PWlzwpcubf9irz/XwEXXt qkRJE91gvo3r6S9ykrdV0qvmYlO1/GhoSgc1nIf0lh+crPPh2njUIlvZQfGG7fzLQ nqP7nq6RUbPl2GKlTexAld3oH2H3nspDItin47UiaJkF0lWnXpLUruk/OhfOCF1Ob UqLqSEMGtCyKuviH6OaHfLBQPxCV+QG6O7J3ROnnkyy/bA2j+htuOSIkIcnD+lGtZ qWW/5yg+YGmNhFLnT/7DHydUm0VROJRjke3v8ui92ETUqHz8dsdyjUt009cg9Xa8L xPO4jovOlsWaAyHHrw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([212.95.5.25]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MRCKC-1tOQYD1diO-00PfJr; Sun, 10 Nov 2024 17:36:37 +0100 Content-Language: en-US In-Reply-To: <87wmhb2yew.fsf@gmail.com> X-Provags-ID: V03:K1:28/OHUo7fL5VQ80/QbZ7tfYkjuhXrw97zDvW5k2xaVFPlt3W5D1 NWRr+DTb4HXTBEYs6+f/Jc7DYIt0tozYZtX0pVZkIk6Rmuj/xqNhUiEXgL5MVNTbBlcaVQN nUhkvXzE3uikuZty9ZVwx3lW9CAVd+c1y+IY0advJOKjvq3WnE8kjYCyeky1MlrT+zy7kQk bwWENsmMDRl5J0w3PSBsQ== UI-OutboundReport: notjunk:1;M01:P0:WA5SoKUgjP0=;SYXDwHmYQcmmUN8pqf8j0ldGYX9 c4B/R2usqcc2nKd1fux03M+uxHrT2X2mVttiN3W3B8YUVxBzkZFaqlpBLrWrU4+bJzlu8ReoV ofCkKbj95dD/HXor+VJF3Bdbz7ICAzz67BGcx9E+XmqddvA98Kq7tq6L0nmOVH+HZVP1TDDCQ zl7H/zbTY/wGK36RACkfd3s6woaigzRC8WPUmNZWNwwTrOwOX5FqSHGYLAxCEs8w5Qa912d6n vKEpvTRGAVSwkMDO/adXlOubZizRPIYaWCAx8jb/p70VSVCtmdKl8lhYH/iLxe3H1BsTOwbgx grOpG1NW3WHVaheUty0zC9/zMsFG+FFDz3yYQUEi0Y3PejgLkBD+Lq+YDZl2NfgxPCZ1NaerV 4AhzJErEoXVt/Iakxc/FHXvFR0dNeQasuous1Ja3GgxAqnTnL2a0i8+QKpU1L+2eTKYAWvsmd jyKQPS1Uo/ceSaCnsKhMKpEHkyClZPq1zu6gbe5OXpS1dXjCQCC3zEgMwUwlJ51j1/NVOWhEC GvBobn6JuUh2Yhrk284JzQRvQ+N85B13Ub1Xyefphat8PnLHrOPC9YEZDnULXPFh4w9Vs//wz pGBSG2IppQjQsy1wH/hBx95hgLMwtVUY0T34NYHCELyotd62YJARQ5KdE/RRA5lR+wazmjE0S G7Srt4GGwLNuYm+Sxhkb84TVf9G5+w2KgAdmTGgcQc8lF75uNbKQs+xANe8ehWnD6i7na5dAu kSped2BY/qjb0vfFDHwVKB8je+NoSWhlwhOnQ9k6IVoCxQZdl0ant4JhmrAdfTd/buNosgJI Received-SPF: pass client-ip=212.227.17.21; envelope-from=rudalics@gmx.at; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_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:325377 Archived-At: > The on where I showed in earlier screenshot, where the parent window > being split gets messed up. IIRC I fixed that earlier by binding 'window-combination-limit' appropriately. >> - might fail with atomic windows > > What's an atomic window? I read the manual but still couldn't understand>> And always keep in mind that once our functions exist, people will use >> them on-the-fly, expecting them to "just work". They won't forgive the >> smallest misbehavior. > An atomic window is a parent window - considered the root of the atomic window - such that all its descendants have the 'window-atom' parameter set to t. 'split-window' when called with any of these windows as first argument makes the new window always on a side of the atomic window. With other words it splits the root instead. Also, deleting one of these windows deletes the root instead and deleting all other windows deletes all other windows but the root. The idea of an atomic window is that although it is build from internal and live windows, it behaves like a live window for the operations mentioned above. It's the smallest unit for them and you cannot split it just like you cannot split an atom chemically. I added a 'no-rotate' parameter that can be used for atomic windows so they do not rotate inside. But I have not tested it well yet. >> - doesn't care about fixed size windows >> >> - might fail with small windows. > > Highly unlikley, I tried it with very small splits and it worked. Note that I've bound 'window-min-width' and 'window-min-height' to zero. 'split-window' will automatically choose the nearest admissible size but it will fail in a trivial case where you do say a couple of C-x 3 in a frame that is 80 columns wide but only two lines high. Hopefully the 'condition-case' will catch them all - precalculating sizes and rejecting a rotate when they do not fit would be no fun. >> The latter two probably mean that we should run the algorithm with >> fixed sizes and minimum window sizes in place first. If >> 'split-window' complains, re-run the algorithm ignoring fixed-size >> windows and minimum sizes. > > What is the expected thing to happen in fixed size windows? That they do not change their height, width or both however you rotate them. If you do say C-h f setq and you have 'temp-buffer-resize-mode' turned on, Emacs will try to resize the help window and later changes of the window structure will usually try to keep the size of the help window fixed, if that is possible at all. > ngl, when you say it like that it sounds like I am making food for a kim > jong ung It's more like making a diet plan for him. martin