Chapter 5. Using Buffers and Windows
One of the most universally useful features of Emacs is the ability to edit multiple buffers at once and to display more than one buffer using windows. The commands for doing this are simple; you learn only a few commands and yet experience a tremendous boost in productivity. The more you use multiple buffers and windows, the more uses you’ll think of for them.
In this chapter, we’ll discuss the differences between buffers and windows, some of the things you can do with multiple buffers, and how to display buffers in windows. We will then discuss how to work with the buffer list (an easy way to manage multiple buffers) and how to use bookmarks to hold your place in the all the various files you are working with. Sometimes you may need to suspend Emacs temporarily; you can do so in an instant, even though you may be working with many windows and buffers, and we’ll tell you how. Finally, at the end of the chapter, there is a section for X users, describing how to use multiple X Windows in a single Emacs session.
Files, Buffers, and Windows
All the editing you do in Emacs occurs in buffers. A buffer is usually a working copy of a file, although it has many other uses. When you are editing a buffer that contains a copy of a file, and you save your changes, Emacs takes the contents of the buffer and copies it into the file. In practice, you can cavalierly change a buffer and then not save the changes. On the other hand, you can save your changes from ...
Get Learning GNU Emacs, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.