ErgoEmacsEmacsLispBlogEmacsLispBuy Tutorial
Web Hosting by 1&1

29.8 Frames and Windows

Each window is part of one and only one frame; you can get that frame with window-frame.

— Function: window-frame window

This function returns the frame that window is on.

All the non-minibuffer windows in a frame are arranged in a cyclic order. The order runs from the frame's top window, which is at the upper left corner, down and to the right, until it reaches the window at the lower right corner (always the minibuffer window, if the frame has one), and then it moves back to the top. See Cyclic Window Ordering.

— Function: frame-first-window &optional frame

This returns the topmost, leftmost window of frame frame. If omitted or nil, frame defaults to the selected frame.

At any time, exactly one window on any frame is selected within the frame. The significance of this designation is that selecting the frame also selects this window. Conversely, selecting a window for Emacs with select-window also makes that window selected within its frame. See Selecting Windows.

— Function: frame-selected-window &optional frame

This function returns the window on frame that is selected within frame. If omitted or nil, frame defaults to the selected frame.

— Function: set-frame-selected-window frame window &optional norecord

This sets the selected window of frame frame to window. If frame is nil, it operates on the selected frame. If frame is the selected frame, this makes window the selected window. This function returns window.

Optional argument norecord non-nil means to neither change the order of recently selected windows nor the buffer list (see The Buffer List).

Another function that (usually) returns one of the windows in a given frame is minibuffer-window. See Definition of minibuffer-window.

blog comments powered by Disqus