[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: |
Fri, 18 Oct 2024 19:48:41 +0200 |
User-agent: |
Mozilla Thunderbird |
> Ok, so today I made major changes to the interactive side of the
> functions(new file attached), mostly because the function would error if
> you call iti with prefix arg, and the press C-x z, as it would use the
> last used argument of frame-or-window which is now dead.
If we did reuse parent windows too as I once suggested, it would be
still valid and in place.
Note that 'flip-windows-horizontally' binds "windows" instead of
"window". And please don't cascade ifs - the appropriate Lisp idiom
here is 'cond' as in
(let ((window (cond
(current-prefix-arg
(window-parent))
((windowp frame-or-window)
frame-or-window)
(t
(window-main-window frame-or-window)))))
BTW does it work if FRAME-OR-WINDOW is an internal window? In the doc
string you say that it must be a "live frame or window" but 'windowp'
returns t for internal windows too.
> The problem was that C-x z sends with same arguments, so using code in
> the (interactive (HERE)) would be repeated, which means same argument
> would be used in `repeat'.
I never use C-x z so I have no opinion here.
> I added subtree speicfic options to the docstring(before they were not
> there), and made changes to window--transpose. However it is weird if
> you C-u M-x transpose-windows C-x z multiple times, you get weired
> result since the parent window changes, nothing I can do about that,
> just how windows work.
If you optionally can supply REFER as a cons where the car is the
previous (currently deleted) parent and the cdr the previous (currently
deleted) leaf window (you have to keep pointers to all of them just in
case the collector runs in between), we can easily fix that. Just that
'window-tree-pixel-sizes' would have to report the old parent window too
(in front of the flag telling whether it constitutes a horizontal or
vertical split, probably). It's easy to do, believe me.
> Also I'm finally done with the bureaucracy, I got the copyright
> assignment done.
Fine.
> I'm ready to send final patch now, do you want it to be added to
> window.el or new file?
What about adding it to windmove.el? Eli or Juri will decide.
martin
- Re: Add function to rotate/transpose all windows, (continued)
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/10/09
- Re: Add function to rotate/transpose all windows, Juri Linkov, 2024/10/09
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/10/10
- Re: Add function to rotate/transpose all windows, Juri Linkov, 2024/10/10
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/10/13
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/10/13
- Re: Add function to rotate/transpose all windows, Juri Linkov, 2024/10/14
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/10/15
- Re: Add function to rotate/transpose all windows, Juri Linkov, 2024/10/15
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/10/18
- Re: Add function to rotate/transpose all windows,
martin rudalics <=
- Re: Add function to rotate/transpose all windows, Eli Zaretskii, 2024/10/18
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/10/19
- Re: Add function to rotate/transpose all windows, Eli Zaretskii, 2024/10/19
- Re: Add function to rotate/transpose all windows, Juri Linkov, 2024/10/19
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/10/19
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/10/20
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/10/20
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/10/20
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/10/21
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/10/21