GNU TeXmacsUser manualReferenceAboutEnglish
Links between buffers, views and windows

A buffer may have several views, and each view is displayed in at most one window, which displays exactly one view. The following routines, documented on the previous pages, convert between the three kinds of objects; those which may fail return #f:

From To Routine
buffer views (buffer->views buf)
buffer windows (buffer->windows buf), (buffer->window buf)
view buffer (view->buffer vw)
view window (view->window vw)
window view (window->view win)
window buffer (window->buffer win)
current objects (current-buffer), (current-view), (current-window)

Table 1. Conversions between buffers, views and windows.

The current buffer is always the buffer of the current view, and the current window the window of the current view, if any. Changing one of them thus changes the others:

A view which is not displayed in any window still holds an editor, so that the document can be typeset and modified (for instance by with-buffer); (view-delete vw) removes it. Closing a buffer deletes all its views, and the windows which displayed them switch to another buffer. See the server: buffers, views and windows for the C++ side.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".