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: Sun, 17 Nov 2024 12:45:35 +1000
User-agent: Gnus/5.13 (Gnus v5.13)

martin rudalics <rudalics@gmx.at> writes:

> When I set up my frame thusly
>
> (defun window-transpose-setup ()
>   (interactive)
>   (let ((foo (get-buffer-create "*foo*"))
>       window)
>     (delete-other-windows)
>     (setq window (split-window nil nil t))
>     (set-window-buffer window foo)
>     (split-window window)
>     (setq window (split-window window nil t))
>     (split-window window)
>     (select-window window)))
>
> and then run 'rotate-windows-clockwise' I'm told
>
> which is one of the problems I tried to make you aware of.  IIUC window
> 44 is a deleted parent window and you try to get its pixel height.  But
> Emacs doesn't allow to retrieve the width or height of a deleted window.
>

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.

Attachment: window-transpose.el
Description: application/emacs-lisp


reply via email to

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