8 The Editor

8.2 Displaying and swapping between buffers

The contents of the editor window is usually referred to as the buffer. Technically speaking, when you edit a file, its contents are copied into a buffer which is then displayed in the window. You actually edit the contents of the buffer, and never the file. When you save the buffer, its contents are copied back to the actual file on disk. Working in this way ensures that there is always a copy of the file on disk -- if you make a mistake, or if your computer crashes, the last saved version of the file is always on disk, ensuring that you do not lose it completely.

Because of this distinction, the term buffer is used throughout, when referring to the text in the window. You are not aware of the distinction when you are using the editor yourself, however.

An editor can only have one editor window, although there can be many buffers open at once. This means that you can edit more than one file at once, although only one buffer can be displayed at a time in the window -- any others remain hidden.

The diagram below shows the distinctions between the window, buffers and files on disk.

Figure 8.2 Distinctions between the window, buffers, and files on disk

The buffers view allows you to display a list of all the buffers that are currently open in the editor, and gives you an easy way of navigating between them Choose View > Buffers to switch to the buffers view. The editor appears as shown in Figure 8.3 below.

Figure 8.3 Listing buffers in the editor

The buffers view has two areas, described below.

8.2.1 - Filter area
8.2.2 - Buffers area

Common LispWorks User Guide, Liquid Common Lisp Version 5.0 - 18 OCT 1996

Generated with Harlequin WebMaker