Выбрать главу

Chapter 6, Writing Macros, discusses using macros to eliminate repetitive tasks.

Chapter 7, Simple Text Formatting and Specialized Editing, covers basic text formatting (such as tabs, indentation, and centering) as well as some of the more rarefied features, like outline mode and rectangle editing.

Chapter 8, Markup Language Support, describes Emacs support for HTML, XML, TEX, and LATEX.

Chapter 9, Computer Language Support, covers Emacs as a programming environment, including editing support for C, Java, Lisp, Perl, and SQL, as well as the interface to compilers and the Unix make utility. It also describes the Java Development Environment for Emacs (JDEE).

Chapter 10, Customizing Emacs, describes Emacs's customization facilities. The interactive Custom tool allows you to change variables without editing your startup file. The chapter also explains how to set up your .emacs customization file. It describes how to modify your display, keyboard commands, and editing environment as well as how to load Lisp packages for extra functionality.

Chapter 11, Emacs Lisp Programming, describes the basics of Emacs Lisp, the language you can use to further customize Emacs.

Chapter 12, Version Control, describes VC mode for version control and its interface to CVS, RCS, Subversion, and SCCS.

Chapter 13, Platform-Specific Considerations, discusses how to install Emacs on Unix, Windows, and Mac OS X. It also provides platform-specific information for Windows and Mac OS X.

Chapter 14, The Help System, describes Emacs's rich, comprehensive online help facilities.

Appendix A, Emacs Variables, lists many important Emacs variables, including all the variables mentioned in this book.

Appendix B, Emacs Lisp Packages, lists some of the most useful Lisp packages that come with Emacs.

Appendix C, Bugs and Bug Fixes, tells you how (and when) to report bugs you find in Emacs. It also describes how to contribute to the GNU Project, whether through code enhancements or monetarily.

Appendix D, Online Resources, gives a tour of some important Emacs-related web sites.

Appendix E, Quick Reference, provides brief descriptions of the most important Emacs commands discussed in this book.

The book concludes with a glossary that defines Emacs terms you'll encounter, an index, and a detachable quick reference card that summarizes important commands for easy access.

What We Haven't Included

GNU Emacs is a large and powerful editor; in this book, we give you only a sample of what it does. Many features have been left out, and more features are added all the time. Some topics, however, are not covered:

Compatibility modes

GNU Emacs provides compatibility modes for vi, for example. We've left a discussion of these modes out. If you really want to use vi or another editor, do so. You're better off getting to know Emacs on its own terms rather than pretending it is something else.

Many programming language modes

In this book, we discuss editing modes for C++, Java, Lisp, Perl, and SQL. There are many modes for other languages, including rare languages like Scheme. There's no way we could discuss everything.

Advanced Lisp programming

GNU Emacs incorporates a complete Lisp interpreter. We give a very basic and brief introduction to Emacs Lisp; Chapter 11 should be enough to get you started, but it really only scratches the surface. We recommend the FSF's Emacs Lisp Reference Manual, now included in the Emacs distribution.

Using Emacs to access the Internet

When our last edition came out, it was common to use Emacs to access Internet resources or read email. Now that isn't so common; better mailers, browsers, and other tools are commonly in use on all platforms.

Unicode support

At present, Emacs is on its way to full Unicode support; that is the most important change slated for the next major release. At this writing, Unicode support is spotty.

Games and amusements

GNU Emacs includes an eclectic bunch of games and amusements, including the ability to pipe random quotations from Zippy the Pinhead into the famous "Eliza" pseudopsychoanalyst. Emacs 21 includes a Games menu under Tools with several cool ways to waste time in Emacs (and it doesn't even include Emacs's version of pong, one of our favorites). Alas, we had to draw the line somewhere.

The Meta Key

Emacs commands consist of a modifier, such as Control, which you hold down as you would the Shift key, and a series of keystrokes. For example, Control-x Control-s saves a file.

The other modifier Emacs uses is the Meta key. Few keyboards have keys labeled Meta. Because of this, in previous editions of this book, we refused to talk about the Meta key and substituted Esc in all our instructions.

In this edition, we want you to learn where the Meta key is. Typically Meta keys are to the immediate left and right of the Space bar. On Linux and Windows keyboards, the Alt key is the Meta key. On Mac keyboards, the Apple key, often called Command is the Meta key by default.

Why learn about and use the Meta key? The reason is speed. We emphasize key bindings in this book. New users may find icons and menus helpful, but in the long run, learning how to keep your hands on the keyboard allows you to gain speed and boosts your productivity. The Meta key will help you gain that speed and make it easy for you to use Emacs help, which refers to Meta.

Depending on your style, you may still prefer to use Esc instead of Meta. Just bear in mind that with Esc you press and release the key, then press the next key.

Conventions Used in This Book

This section covers the conventions used in this book.

Keystroke Notation

Emacs commands consist of a modifier, such as Ctrl or Meta, followed by one or two characters. Commands shown in this book abbreviate Ctrl to C and Meta to M:

C-g

Hold down the Ctrl key and press g.

M-x

Hold down the Meta key and press x.

Sometimes Meta is followed by a literal hyphen character. In these cases, we spell out Meta:

Meta -