emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Functions transpose/rotate/flip windows


From: Pranshu
Subject: Re: Functions transpose/rotate/flip windows
Date: Wed, 29 Jan 2025 05:05:19 +1000
User-agent: K-9 Mail for Android

On 29 January 2025 3:17:50 am AEST, martin rudalics <rudalics@gmx.at> wrote:
>> I see, btw I think having ascii in docstrings should be fine, some other
>> code in core does it, eg see docstring of
>> c-ts-mode--macro-heuristic-rules (it's not ascii drawing but it's still
>> diagram)
>
>Let's concentrate on getting the drawings in the Elisp manual right first.
>
>>>> Yes, because their is an odd number of elements.  This command would
>>>> basiclly reverse the (window-list) (or the cyclic odering of windows),
>>>> and in reversing, the middle pivot does not get changed if there is one.
>>>>
>>>>    ___________      ___________
>>>> |           |    |           |
>>>> |     A     |    |     D     |
>>>> |___________| -> |___________|
>>>> |   |   |   |    |   |   |   |
>>>> | B | C | D |    | C | B | A |
>>>> |___|___|___|    |___|___|___|
>>>>
>>>> Here the since there is even number of windows, no window is where it
>>>> was before.
>>>
>>> And what would the new command produce instead?
>>>
>>
>> Wdym? I put the inital layout on left and layout after command is called
>> on right, I'll actually just implement it sometime to show
>
>Above you say that "the middle pivot does not get changed if there is
>one". 

Bad wording, I meant middle pivot only exists where there are odd number of 
windows in that case, as wasn't in my example

> When I do 'rotate-windows' in the that example I get
>
>  ___________      ___________
> |           |    |           |
> |     A     |    |     D     |
> |___________| -> |___________|
> |   |   |   |    |   |   |   |
> | B | C | D |    | A | B | C |
> |___|___|___|    |___|___|___|
>
>
>So you mean the new function should behave as 'rotate-windows' with A
>and C changing locations.  Right?

These 2 functions are completely independent. One "rotates" the cyclic ordering 
and new one flips it.

So if you call new command twice you are back to where you started (flip + flip)

But to get back by started by rotating, you would have to call for each number 
of windows (rotate 360)




reply via email to

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