bug#81406: 31.0.90; rotate-windows loses window balance when window-combination-resize is t
martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]> Fri, 31 Jul 2026 09:42:37 +0200
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
> In the commit from 2 weeks ago, you added this comment: > >> ;; Do we really care - the window/buffer relationship >> ;; should not be affected by rotating. > > before the user-error message it gives during rotate-window if all > windows are dedicated. Although from a technical perspective this is > not necessary, but there's 2 reasons why I can think of as to why it > should be that way. (1) Although rotate-window does move windows > around, it dosn't feel that way to the user as much as it feels like > the buffers are being moved around in the windows. If so, it would > seem intutive that windows that are dedicated to the buffer stay that > way. (2) If some(but not all) windows are dedicated, then those > windows are simply not rotated and the other windows rotate around > them. So the fact that dedicated windows will not be rotated seems > consistant with this feature. I added this comment for the case that if someone eventually wants to rotate dedicated windows, there's no technical reason against it. Currently, if we have two windows, one dedicated one not, what are we supposed to do? With emacs -Q (progn (split-window) (set-window-dedicated-p nil t) (rotate-windows)) gets me Debugger entered--Lisp error: (error "REFER’s car must specify a deleted, former live window") split-window-internal(#<window 7 on *scratch*> 396 below 0.5142857142857142 (#<window 7 on *scratch*> . #<window 6>)) split-window(#<window 7 on *scratch*> -385 below t (#<window 7 on *scratch*> . #<window 6>)) #f(compiled-function (arg0) #<bytecode -0x10edf7a3ea170cd3>)((#<window 7 on *scratch*> . 0.5)) mapc(#f(compiled-function (arg0) #<bytecode -0x10edf7a3ea170cd3>) ((#<window 7 on *scratch*> . 0.5))) window--transpose-1((t #<window 6> 1.0 1.0 (#<window 3> 0.5 1.0) (#<window 7 on *scratch*> 0.5 1.0)) #<window 7 on *scratch*> (below . right) t nil) rotate-windows() (progn (split-window) (set-window-dedicated-p nil t) (rotate-windows)) (progn (progn (split-window) (set-window-dedicated-p nil t) (rotate-windows))) eval((progn (progn (split-window) (set-window-dedicated-p nil t) (rotate-windows))) t) elisp--eval-last-sexp(nil) #f(compiled-function () #<bytecode 0x29b738bf17c22>)() handler-bind-1(#f(compiled-function () #<bytecode 0x29b738bf17c22>) (error) eval-expression--debug) eval-last-sexp(nil) funcall-interactively(eval-last-sexp nil) call-interactively(eval-last-sexp nil nil) command-execute(eval-last-sexp) which is not very helpful. martin