[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add function to rotate/transpose all windows
From: |
martin rudalics |
Subject: |
Re: Add function to rotate/transpose all windows |
Date: |
Sat, 28 Sep 2024 16:48:25 +0200 |
User-agent: |
Mozilla Thunderbird |
> 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)
> #<window A>
> #<window C>)
> #<window B>)
>
> 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
- Re: Add function to rotate/transpose all windows, (continued)
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/09/28
- Re: Add function to rotate/transpose all windows, Eli Zaretskii, 2024/09/28
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/09/28
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/09/28
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/09/28
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/09/28
- Re: Add function to rotate/transpose all windows,
martin rudalics <=
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/09/29
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/09/29
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/09/29
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/09/29
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/09/30
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/09/30
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/09/28
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/09/27
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/09/27
Re: Add function to rotate/transpose all windows, Petteri Hintsanen, 2024/09/24