[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add function to rotate/transpose all windows
From: |
Pranshu Sharma |
Subject: |
Re: Add function to rotate/transpose all windows |
Date: |
Fri, 22 Nov 2024 00:04:01 +1000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
martin rudalics <rudalics@gmx.at> writes:
>> Thanks, the whole explenation really helped me, I now fixed the
>> thing so
>> that it preserves parents windows as well. I tested it with the:
>> C-x {3 2 o o 2} grid split and the parent window's were same before
>> and
>> after transposing.
>
> Good. It already works with my standard scenario. It does not yet work
> with
>
> C-x 2 C-x o C-x 3 C-x 3
>
> which gets me from
>
> ((#<window 15 on *foo*> . #<window 16>)
> (#<window 18 on *foo*> . #<window 16>)
> (#<window 17 on *foo*> . #<window 16>)
> (#<window 11 on *foo*> . #<window 14>))
>
> before
>
> ((#<window 15 on *foo*> . #<window 19>)
> (#<window 18 on *foo*> . #<window 19>)
> (#<window 17 on *foo*> . #<window 16>)
> (#<window 11 on *foo*> . #<window 14>))
>
> after 'rotate-windows-clockwise'. Initially, the parent window 16 hat
> three children 15, 18, 17 afterwards 15 and 18 got a new parent 19.
>
> I suppose you have to do the same I did: When calling 'split-window' do
> _not_ set the combination limit when the window to split has a previous
> sibling with the same parent as the window to split. window-rotate.el
> uses
>
> (or limit
> (not prev)
> (not (eq (window-alist-parent prev)
> (window-alist-parent window)))))
>
> where 'prev' is the previous sibling of the window to split.
I don't fully understnad why this is happening. iiuc, the purpose of
checking for previous split is to see if the (cons window parent) refer
split has already happened, to avoid doing it again. Instead of doing
this, I just use a vriable called `n-set' which determines if the parent
window has already been split with the cons refer argument, so I don't
belive this is neccasary.
>> I don't see any technical reason on not
>> being able to get the window-combination-limit of a dead window. It
>> would be helpful if this and alike functions would be able to work
>> on
>> dead windows.
>
> I have done that here for a couple of functions but for historical
> reasons it will never work for 'window-buffer', 'window-top-child' and
> 'window-left-child'.
Nice, can you send the whole diff.
- Re: Add function to rotate/transpose all windows, (continued)
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/16
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/16
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/17
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/17
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/17
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/17
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/17
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/18
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/19
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/19
- Re: Add function to rotate/transpose all windows,
Pranshu Sharma <=
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/21
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/24
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/26
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/26
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/27
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/27
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/27
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/27
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/28
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/28