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: martin rudalics
Subject: Re: Add function to rotate/transpose all windows
Date: Sat, 16 Nov 2024 17:54:40 +0100
User-agent: Mozilla Thunderbird

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

Debugger entered--Lisp error: (wrong-type-argument window-valid-p #<window 44>)
  window-pixel-height(#<window 44>)
  window--transpose-1(((nil . #<window 47>) (979 . 1680) (#<window 44> (979 . 840)) ((t . #<window 49>) (979 . 840) ((nil 
. #<window 51>) (490 . 840) (#<window 48> (490 . 420)) ((t . #<window 53>) (490 . 420) (#<window 52 on *foo*> (245 
. 420)) (#<window 54> (245 . 420)))) (#<window 50> (489 . 840)))) #<window 44> (left . below) nil)
  window--transpose(#<window 47> (left . below) nil)
  rotate-windows-clockwise(nil)
  funcall-interactively(rotate-windows-clockwise nil)
  call-interactively(rotate-windows-clockwise nil nil)
  command-execute(rotate-windows-clockwise)

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.

Again I can only suggest to set up a window alist _before_ deleting
anything so you can retrieve the sizes of the deleted window from there.

martin



reply via email to

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