Next 17.G: Help Up 17: Emacs Prev 17.E: Mode Lines Contents


Specialized

§ 17.F: Using Multiple Windows in emacs


Using multiple windows is the heart of the emacs editor. This is true even when accessing the computer through a telnet session. This allows you to edit several files (or different parts of the same file) at the one time, to move data from one file to the other, or even to have emacs compile a program in one window and send the results to another window.

To create a second window, enter

The number 2 means create two windows (4 windows is the maximum). To go back to one window, enter

The second window you just opened is actually a copy of your first window.

To pull up a different file in a window

If you can't use your mouse with emacs, use the "other" window command C-x o to switch windows. Each window has it's own cursor position, but only one, the active window, actually shows the cursor on the screen.

Editing commands apply to the active window only. Closing a window does not save it or kill it; it is still there in the buffer waiting for you to act on it. So again, if you want to save your edits, make sure to save the buffer contents before killing the buffer.

The kill ring is common to all buffers. So killing and yanking text from one window to another is the same procedure described before, only now you need to activate the appropriate window.

Another useful command to remember when copying between files is

With this command you can keep the cursor in the window where you are editing, while advancing through the other window you are reading.

Now that we know to use the most useful option in emacs, let's got to what just might be the most helful section, Getting Help in emacs.


Next 17.G: Help Up 17: Emacs Prev 17.E: Mode Lines Contents