Chapter 15. Emacs and X

Though Emacs can run on a character terminal, it is a native X client application and doesn’t need to run through xterm. This feature gives it the ability to use multiple fonts, interpret mouse events, display through more than one X window and use X’s whole range of facilities. In this chapter, we’ll introduce you to the Emacs X interface.

User-Interface Features

Many of the X features are instantly ready to use when you fire up your Emacs. We’ll describe these first, then get into the features for Emacs customization and programming.

Window Scrollbars and X Mode Lines

The most obvious difference from an Emacs running on a terminal is that each Emacs X window has its own X scrollbar. Each of these scrollbars behaves much like the scrollbar on an xterm window; you can drag the thumb with your mouse to scroll the window continuously or click on the scrollbar to jump-scroll up and down through it. You can also click on and drag a window mode line. It will move, resizing the windows above and below it.

The Menu Bar

You’ll also notice that the top line of your Emacs generically resembles a Macintosh menu bar, with headings for Buffers, Files, Tools, Edit, Search, and Help. If you click on these, you’ll get pull-down menus that make it easy to mouse-select various common commands. (Starting with Emacs version 19.30, a version of this menu bar is also available in terminal mode, but you have to navigate it with keystrokes rather than a mouse.)

For example, the Buffers ...

Get Learning GNU Emacs, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.