Sams Teach Yourself Emacs in 24 Hours

ContentsIndex

Hour 3: Getting Started with Emacs

Previous HourNext Hour

Sections in this Hour:

 

Buffers, Windows, and Frames

It is important in Emacs to distinguish between the file read into Emacs (but still located on disk) and the content that you edit in the Emacs window. The reason for this is twofold:

Therefore a special word, buffer, has been appropriated to describe the entity containing the text which you edit in Emacs.

A buffer, therefore, contains the text you look at or edit. A buffer might either be a copy of the text from a file, or text that Emacs has generated by other means. When a file is loaded into a buffer in Emacs, this buffer is, of course, also written to this file when you save it later.

By default, buffers that do not correspond to files on disk contain stars around their names.

In Emacs it is possible to edit several buffers at a time (you do of course edit only one at any given time, but it's possible to shift between several active buffers). You can also show several buffers at a time in one X11 window. Each of these buffers is said to be shown in a window. Furthermore it is possible to make Emacs show its content in several X11 windows. Each of these windows is called a frame. This can be seen in Figure 3.8.

Figure 3.8
Buffers, windows, and frames.

In Figure 3.8, one frame is shown. This frame displays three windows. Two of the frames in these three windows are the same buffer, whereas the third buffer does not correspond to a file.

Caution - Be warned of possible confusion here! One X11 or Microsoft Windows window is called a frame not a window. A frame can show several windows, each showing a buffer.


Sams Teach Yourself Emacs in 24 Hours

ContentsIndex

Hour 3: Getting Started with Emacs

Previous HourNext Hour

Sections in this Hour: