[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add function to rotate/transpose all windows
From: |
Eli Zaretskii |
Subject: |
Re: Add function to rotate/transpose all windows |
Date: |
Thu, 26 Sep 2024 17:22:08 +0300 |
> Date: Thu, 26 Sep 2024 16:10:48 +0200
> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
> From: martin rudalics <rudalics@gmx.at>
>
> I attach a function 'resurrect-window' that rotate/transpose/flip
> functions can call to resurrect the previous windows after having
> deleted them. Tested with:
>
> (let ((dead (split-window nil nil t)))
> (set-window-buffer dead "*Messages*")
> (message "%s" (next-window))
> (sit-for 2)
> (delete-window dead)
> (let ((live (split-window)))
> (resurrect-window dead live)
> (message "%s" (next-window))))
Thanks.
> +DEFUN ("resurrect-window", Fresurrect_window, Sresurrect_window, 2, 2, 0,
> + doc: /* Resurrect dead window DEAD in lieu of live window LIVE.
> +DEAD must denote a dead window that was a live window before it was
> +deleted. LIVE must denote a live window. Put the window object of DEAD
> +in the place of LIVE such that the resulting window inherits LIVE's
> +geometric properties and its position within the window tree while all
> +other properties including the buffer and its positions, decorations and
> +parameters are inherited from DEAD.
> +
> +DEAD must have been on the same frame as LIVE and its old buffer must be
> +still live. If LIVE was selected or its frame's selected window, select
> +DEAD or make it its frame's selected window instead. */)
This doc string needs to be more detailed in what it means to "put the
window object of DEAD in the place of LIVE". For example, it
currently keeps silent about what happens to LIVE after the call.
> + /* Add WINDOW to table of dead windows so when killing a buffer WINDOW
> + mentions, all references to that buffer can be removed and the
> + buffer be collected. */
There's no WINDOW argument. I think you meant LIVE instead.
Finally, this needs to be documented in the ELisp manual and called
out in NEWS.
- Add function to rotate/transpose all windows, pranshu sharma, 2024/09/24
- Re: Add function to rotate/transpose all windows, Eli Zaretskii, 2024/09/24
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/09/25
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/09/25
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/09/25
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/09/25
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/09/25
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/09/25
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/09/26
- Re: Add function to rotate/transpose all windows,
Eli Zaretskii <=
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/09/27
- Re: Add function to rotate/transpose all windows, Eli Zaretskii, 2024/09/28
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/09/28
- Re: Add function to rotate/transpose all windows, Eli Zaretskii, 2024/09/28
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/09/28
- Re: Add function to rotate/transpose all windows, Eli Zaretskii, 2024/09/28
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/09/28
- Re: Add function to rotate/transpose all windows, Eli Zaretskii, 2024/09/28
- Re: Add function to rotate/transpose all windows, martin rudalics, 2024/09/28
- Re: Add function to rotate/transpose all windows, pranshu sharma, 2024/09/28