next-window - Move the cursor to the next window
previous-window - Move the cursor to the previous window
n next-window (C-x o)
n previous-window (C-x p)
next-window makes the next window down the current window, if the current window is the last one in the frame the first one is selected. The numeric argument n can be used to modify this default behaviour, it is a bitwise flag where the bits are defined as follows:
0x01
0x02
0x04
previous-window makes the next window up the current window. The numeric argument n has the same effect on this command as for next-window except bit 0x04 starts the search at the last window of the frame.
The following example visits every window in the current frame printing the buffer it displays with a second pause between each one:
; go to the first window !force 6 next-window !while $status 1000 ml-write $buffer-bname ; go to the next window - fail if this is the last !force 2 next-window !done
Both commands fail if a suitable window cannot be for, see the example on how this can be used.
next-window-find-buffer(2), next-window-find-file(2), set-position(2), goto-position(2), $window-flags(5).
(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12