[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, 17 Nov 2024 11:22:22 +0100 |
User-agent: |
Mozilla Thunderbird |
> In this case, cwin was the undead window that exists. I just had a bug
> in delete-other-windows-internal where the WINDOW argument was nil. I
> just changed that, and didn't touch the window--transpose-1 code and it
> works now. Look in the attached file.
OK. Now to the problematic part:
(split-window cwin split-size
split-type t
;; THIS IS WHERE IS GOES OF THE MAP spew
(cons win (cdar subtree))
;; To get a basic working thing, comment above line
and uncoment below line
;; win
Here window-rotate.el checks
(if (and (window-valid-p parent)
(eq parent (window-parent window)))
next
(cons next parent)))
when processing the next window in a combination and
(if (and (window-valid-p parent)
(eq parent (window-parent window)))
first
(cons first parent)))
when descending to the first live child where
- window is the window to split and
- parent is the parent of window before 'delete-other-windows-internal'
If parent has been already restored (has become valid again) you must
not pass it as cdr of REFER since then 'split-window-internal' will
complain with the error you've seen. 'split-window-internal' must
reject that argument because otherwise it may even crash Emacs.
So what you have to do is to pass only the former live window as REFER
argument and not use a cons in that case. I've tried with
(split-window
cwin
split-size
split-type
t
(progn
(while (listp (caaddr win))
(setq win (caddr win)))
(if (and (window-valid-p (cdar win))
(eq (cdar win) (window-parent (caaddr win))))
(caaddr win)
(cons (caaddr win) (cdar win)))))
and
(split-window cwin split-size
split-type t
;; THIS IS WHERE IS GOES OF THE MAP spew
(if (and (window-valid-p (cdar subtree))
(eq (cdar subtree) (window-parent win)))
win
(cons win (cdar subtree)))
;; To get a basic working thing, comment above line
and uncoment below line
;; win
))))
and they seem to work.
martin
- Re: Add function to rotate/transpose all windows, (continued)
- 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, 2024/11/10
- 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 <=
- 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/18
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/19
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/19
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/21
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/21
- Re: Add function to rotate/transpose all windows, Pranshu Sharma, 2024/11/24
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/11/26