[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rotate split windows

From: Markus Triska
Subject: Re: rotate split windows
Date: Wed, 06 Dec 2006 19:12:28 +0100

Marco Wahl <address@hidden> writes:

> alternative for [...] GNU Emacs 21.3.1

No nice one (you can calculate the split using `window-egdes'):

  Primitives to look inside of window configurations would make sense,
  but none are implemented.

The code posted by Chris only rotates the buffers and doesn't flip the
split as requested; a more concise version:

(defun rotate-window-buffers ()
  (let* ((ws (window-list))
         (bs (mapcar 'window-buffer ws))
         (ps (mapcar 'window-point ws))
         (w (pop ws)))
    (dolist (v (append ws `(,w)))
      (set-window-buffer v (pop bs))
      (set-window-point v (pop ps)))))

All the best,
Markus Triska

reply via email to

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