[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: |
Sun, 10 Nov 2024 17:36:36 +0100 |
User-agent: |
Mozilla Thunderbird |
> 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
- Re: Add function to rotate/transpose all windows, (continued)
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/08
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/09
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/09
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/09
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/09
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/10
- Re: Add function to rotate/transpose all windows,
martin rudalics <=
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/11
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/11
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/12
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/12
- 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