emacs-devel
[Top][All Lists]
Advanced

[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: Mon, 07 Oct 2024 01:52:59 +1000
User-agent: Gnus/5.13 (Gnus v5.13)

martin rudalics <rudalics@gmx.at> writes:

>> I was thinking more about making it easier to programticly change the
>> layout, as window-configurations are in C source, which is far from
>> userland.  This would make it possible to do stuff like recursivly go
>> through window tree and do whatver you want, eg make vertical split
>> windows a bit larger.
>
> Hmm..  You can't do that by simply resizing windows?
>
>>> No.  Look at your your example above: All we know about the parent
>>> window is what type of combination it is and what sizes it has.
>>
>> Do you mean the windows lile #<window nnn>, that are not included in
>> (window-tree) and return nil in window-live-p?
>
> Yes.
>
>> If so, what do we need to know about them apart from sizes,
>> transpose-windows and that know nothing about them and still work.
>
> Because internal windows usually don't have properties.  The only
> exception are window parameters.  With emacs -Q do C-x 2, then do
>
> (set-window-parameter (window-parent) 'foo 3)
>
> M-x transpose-windows
>
> (window-parameter (window-parent) 'foo)
>
> Gets me nil here so the parameter is lost.

I see, seems like this is low level, complex and will require lot of
work to do right.  I'm out.  Let just focus on getting the orignal
functions added.

>> It just makes them dissapear in gui, and in terminal it makes them blank.
>>
>> Try this:
>> C-x t n
>> C-x 2
>> C-x 3
>> M-x flip-windows
>> C-x z
>
> Works here (with 'flip-windows-horizontally') as expected.  At the end
> there are two tabs, one for a one window configuration and one for a
> three windows one.

I'm on master branch if that changes anything.  Also you have to call
flip-windows-horizontally at least twice for it to work.

I attached demo of this.

Attachment: out.mp4
Description: video/mp4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]