GNU bug report logs -
#32850
27.0.50; window-swap-states doesn't swap window prev/next-buffers
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Thu, 27 Sep 2018 00:06:02 UTC
Severity: minor
Found in version 27.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
For a long time I've been using my own implementation that swaps window states:
(defun rotate-window-buffers (&optional n)
"Exchange buffers in all windows N times.
With positive N, it uses the window order of `window-list'.
With negative N, does this in the reverse order."
(interactive "p")
(let* ((ws (window-list))
(ls (mapcar (lambda (w)
(list (window-buffer w)
(window-point w)
(window-next-buffers w)
(window-prev-buffers w)))
ws))
(n (mod (or n 1) (length ws))))
(dolist (w (append (last ws n) (butlast ws n)))
(let ((l (pop ls)))
(set-window-buffer w (nth 0 l))
(set-window-point w (nth 1 l))
(set-window-next-buffers w (nth 2 l))
(set-window-prev-buffers w (nth 3 l))))))
Now I wanted to throw it away and to use window-swap-states
from Emacs core that should do the same. But after trying
I see that window-swap-states breaks the order of window buffers
for 'C-x <C-left>' (previous-buffer) and 'C-x <C-right>' (next-buffer)
because it doesn't swap window-prev-buffers and window-next-buffers.
Shouldn't window-swap-states also swap prev/next buffers?
This bug report was last modified 6 years and 183 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.