unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers
@ 2018-09-26 23:39 Juri Linkov
  2018-09-27 18:45 ` martin rudalics
  0 siblings, 1 reply; 78+ messages in thread
From: Juri Linkov @ 2018-09-26 23:39 UTC (permalink / raw)
  To: 32850

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?





^ permalink raw reply	[flat|nested] 78+ messages in thread

end of thread, other threads:[~2018-11-22  7:41 UTC | newest]

Thread overview: 78+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-26 23:39 bug#32850: 27.0.50; window-swap-states doesn't swap window prev/next-buffers Juri Linkov
2018-09-27 18:45 ` martin rudalics
2018-09-27 22:52   ` Juri Linkov
2018-09-30  8:00     ` martin rudalics
2018-09-30 20:00       ` Juri Linkov
2018-10-01  8:35         ` martin rudalics
2018-10-08 22:41           ` Juri Linkov
2018-10-09  7:44             ` martin rudalics
2018-10-15 20:48               ` Juri Linkov
2018-10-16  8:45                 ` martin rudalics
2018-10-16 22:37                   ` Juri Linkov
2018-10-17  7:31                     ` martin rudalics
2018-10-17 21:58                       ` Juri Linkov
2018-10-18  8:05                         ` martin rudalics
2018-10-18 22:37                           ` Juri Linkov
2018-10-19  7:40                             ` martin rudalics
2018-10-20 21:40                               ` Juri Linkov
2018-10-21  8:22                                 ` martin rudalics
2018-10-21 18:14                                   ` Juri Linkov
2018-10-22  9:07                                     ` martin rudalics
2018-10-23 20:45                                       ` Juri Linkov
2018-10-24  9:45                                         ` martin rudalics
2018-10-24 23:39                                           ` Juri Linkov
2018-10-25  6:04                                             ` martin rudalics
2018-10-25 19:19                                               ` Juri Linkov
2018-10-26  7:39                                                 ` martin rudalics
2018-10-26  7:59                                                   ` Eli Zaretskii
2018-10-27 20:09                                                   ` Juri Linkov
2018-10-28  9:00                                                     ` martin rudalics
2018-10-28 19:29                                                       ` Juri Linkov
2018-10-29  8:44                                                         ` martin rudalics
2018-10-29 22:45                                                           ` Juri Linkov
2018-10-30  9:00                                                             ` martin rudalics
2018-10-30 21:23                                                               ` Juri Linkov
2018-10-31  8:11                                                                 ` martin rudalics
2018-10-31 21:25                                                                   ` Juri Linkov
2018-11-01  9:03                                                                     ` martin rudalics
2018-11-01 22:30                                                                       ` Juri Linkov
2018-11-02  8:43                                                                         ` martin rudalics
2018-11-05 21:38                                                                           ` Juri Linkov
2018-11-06  3:26                                                                             ` Eli Zaretskii
2018-11-06 22:35                                                                               ` Juri Linkov
2018-11-06  8:46                                                                             ` martin rudalics
2018-11-10 21:56                                                   ` Juri Linkov
2018-11-11  8:53                                                     ` martin rudalics
2018-11-11 20:23                                                       ` Juri Linkov
2018-11-12  8:53                                                         ` martin rudalics
2018-11-12 23:47                                                           ` Juri Linkov
2018-11-13  9:09                                                             ` martin rudalics
2018-11-13 23:43                                                               ` Juri Linkov
2018-11-14  8:34                                                                 ` martin rudalics
2018-11-15  0:02                                                                   ` Juri Linkov
2018-11-15  9:12                                                                     ` martin rudalics
2018-11-15 21:30                                                                       ` Juri Linkov
2018-11-16  8:52                                                                         ` martin rudalics
2018-11-17 22:04                                                                           ` Juri Linkov
2018-11-18  9:23                                                                             ` martin rudalics
2018-11-17 17:01                                                                         ` Charles A. Roelli
2018-11-17 22:01                                                                           ` Juri Linkov
2018-11-18  9:23                                                                             ` martin rudalics
2018-11-18 22:47                                                                               ` Juri Linkov
2018-11-19  9:42                                                                                 ` martin rudalics
2018-11-19 22:28                                                                                   ` Juri Linkov
2018-11-20  9:27                                                                                     ` martin rudalics
2018-11-21  0:08                                                                                       ` Juri Linkov
2018-11-21  8:20                                                                                         ` martin rudalics
2018-11-21 23:44                                                                                           ` Juri Linkov
2018-11-22  7:41                                                                                             ` martin rudalics
2018-11-15  9:23                                                                     ` martin rudalics
2018-10-18 23:18                   ` Juri Linkov
2018-10-19  7:40                     ` martin rudalics
2018-10-25 19:31                       ` Juri Linkov
2018-10-26  7:41                         ` martin rudalics
2018-10-27 21:11                           ` Juri Linkov
2018-10-27 21:39                           ` Juri Linkov
2018-10-28  9:01                             ` martin rudalics
2018-10-28 19:09                               ` Juri Linkov
2018-10-29  8:43                                 ` martin rudalics

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).