From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pranshu Sharma Newsgroups: gmane.emacs.devel Subject: Re: Add function to rotate/transpose all windows Date: Wed, 27 Nov 2024 00:14:57 +1000 Message-ID: <87frne84ke.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9695"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Juri Linkov , Eli Zaretskii , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 26 17:31: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 1tFyTe-0002Mv-FL for ged-emacs-devel@m.gmane-mx.org; Tue, 26 Nov 2024 17:31:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFySz-0007be-E0; Tue, 26 Nov 2024 11:31:09 -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 1tFwLL-0008Fj-JU for emacs-devel@gnu.org; Tue, 26 Nov 2024 09:15:07 -0500 Original-Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFwLI-000888-9O; Tue, 26 Nov 2024 09:15:06 -0500 Original-Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-7fbc65f6c72so4432235a12.1; Tue, 26 Nov 2024 06:15:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732630502; x=1733235302; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=G7awMLXqjgLOxGmkj54Jnz57Xx0eWrhGOGya18rX/UQ=; b=Mx9NZjfs/tFV5MmtojCvh7o1fERhdF2VBn14WXTfYtAgkGd/HRJWeRZSYvjU4QzPMZ VmdRqRtqiZg4t1H2HfWZUOwUlLlfF583XGKZWdaJsHYAifZfBv/WiFbRQHbMzueNqKCC rSxZ0yqnn2m1Ouomo09B3m4NanqHYVG/VnUzFssO6yEKfEcyEblmYWQLUILmLNyeo8lv RzWpbODb5P9MRw3rydmPzIcA2F73USil6V1Eb4zPc2yM88HTpAGjyVbxyfFa7dWNAKn6 582jG1vZhSXgFxvDQ1G7oMLp0IUZFyYZ/Jd1OWqjTBnYV4UiqOavNl+6spepyMpVCO0k 1ZrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732630502; x=1733235302; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=G7awMLXqjgLOxGmkj54Jnz57Xx0eWrhGOGya18rX/UQ=; b=K8M4zcQHhmJgAA2Lx2PM3iBLTluO2KdXCsJGaqLhGFIMmchilnD4Ma3RYCWDJ7253D bXfQmGVp0QiAWyLtWS9nQSr1T7VQSsmsBJfZjcT0aEVLtxuLpHKOnMIfaX11RFe9J+3Q X8nD2bWPPbUQHMhMXg7/Lb975icQM1S4tiqXInfjNWZNpOCsjgCjPZjDpzeebsY0mZ3F VsZnUO3svPnE7z639SNXziGsWQYJnYslyL4jVcYLLGVNEl6TYqKtDtQWBchEmWSz5wNR c9DwSW79EX6uMw0X8uIA6blmlYM9ojtQGBfPdQX2DRddN6rOkZ5cUS4oDy5o8yFT8Lef MWfw== X-Forwarded-Encrypted: i=1; AJvYcCVf7Q7db8cKD66KyELva53hqA6cdbao5UKd8pQsS2Vj69K8cZPck2EVIi9GY+Wp7o4DCC00l4n4ZK6oxUo=@gnu.org, AJvYcCX44AiArhoOA+KhECJo5q/Z+zB4yt5KjsvCCChbmzGTd2/4y35vT2D1rRSWWXjmZBLiZ+2I@gnu.org X-Gm-Message-State: AOJu0YzOyOmvOcy9iqznoHou8qmUfkICMEm1OJulmDD7JtKtd27NQ2MW Fcb/x+61TzwHjm6ATlNriketInx7ugvHR76aKLMBDnlgVI1tkbEdwv7iHcdj X-Gm-Gg: ASbGncsc7ZZNh/ZJzfCWttEu3pmKYtjTgXMly+ZIlGfb9ZOGr+8e7EE4JjdUVTIxCGY TBJytclyshnTKv+T/fJQNH5+UH8jX3pL1iE+tw5WbU2DqFayNXhPSpVCaButXxXZT+NuF0/V3Kv pyajvT4TB1pkzpzAy1l9Do8SLRNn7eNJFAUNma1v5N+oSnLc/e59PH1M9Bt0kWptIKguzSVKrRZ tGXx5C6kJvW94ekWvQ3NGwgHL8trfId4rTu6oy3zfXoVWrI7nvKQQ== X-Google-Smtp-Source: AGHT+IHl7jtQx3Y/VnGTIlCdEQeofVKdLhdm5UqWyASgt60+5IU3QQ4vjxNrbLpKBsvy2ZCQmBfNBQ== X-Received: by 2002:a05:6a20:ac43:b0:1e0:d4f4:5b39 with SMTP id adf61e73a8af0-1e0d4f45d54mr5846428637.24.1732630501650; Tue, 26 Nov 2024 06:15:01 -0800 (PST) Original-Received: from pebl ([2001:8003:7816:8300:6d84:b241:b7d8:a641]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724de55502csm8345712b3a.134.2024.11.26.06.14.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 06:15:01 -0800 (PST) In-Reply-To: <0ce35c7a-8b28-4905-a6ab-caf50f2fc750@gmx.at> (martin rudalics's message of "Tue, 26 Nov 2024 10:49:14 +0100") Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=pranshusharma366@gmail.com; helo=mail-pg1-x536.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 26 Nov 2024 11:31:07 -0500 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:325716 Archived-At: martin rudalics writes: >> Ok so I got the thing to work under the split you described and and a >> coupla other splits, and it works fine now. > > I still see the same problem after C-x 2 C-x o C-x 3 C-x 3 > > Before 'rotate-windows-clockwise' > > ((# . #) > (# . #) > (# . #) > (# . #)) > > After 'rotate-windows-clockwise' > > ((# . #) > (# . #) > (# . #) > (# . #)) > > Both, windows 15 and 18 have the new parent 19. Incidentally, they can > get their old parents back when calling 'rotate-windows-clockwise' a > second time but after a few rotations more they switch to new parents > again. Ok, I tried using your solution but it didn't plug into the code well, for 2 reasons: - The window is not split from it's sibling, it is always split from cwin. This makes a difference in that the 'prev' would sometimes be non existent, when intended to be a parent window. Wait writing this out made me think of a solution. Will do tommorow. It's late here. - The windows are split in reverse direction, so the previous window would actuallt be the window to split. Wow, writing things out seems effective, I came up with another solution. >> Also have a look at the cycle-window >> command, wdyt? > > I don't understand yet what it is supposed to do. Please give it a > doc-string. "This cycles windows basiclly so that for all windows, each window becomes it's `other-window'. +-----+ +-----+ | A | | C | |-----| -> |-----| |B | C| | A| B| +-----+ +-----+" Look at this video: https://github.com/daichirata/emacs-rotate/blob/master/image/rotate-window.gif This package does same thing, but in the worst way possible, which is using set-window-buffer. IMO this command would be more useful than the other commands. >> Sorry for the late reply, the temprature where I live dropped to 20C > > Fahrenheit or Celsius? Celsius. I can't even comprahend how 20 f would feel like. Also I found out windows can be fixed size in one direction, but I'll still error out if I see them and do-not-convert-size is nil, since it still won't make that big of a difference.