Chapter 1. Preface

Emacs is the most powerful text editor available today. Unlike most other editors (in particular, unlike the standard UNIX editor, vi), Emacs is a complete working environment. No matter what you do, you can start Emacs in the morning, work all day and all night, and never leave it: you can use it to edit, rename, delete, and copy files; to compile programs; to do interactive work with the UNIX shell; to read and organize electronic mail; to access the Internet, and so on. Before window systems like X became popular, Emacs often served as a complete windowing system of its own. All you needed was a terminal, and you could live within Emacs forever. Emacs is also infinitely flexible; you can write your own commands, change the keys that are associated with commands, and (if you are willing to take the time) do just about anything you want.

Why Read This Book?

Because it does so much, Emacs has a reputation for being extremely complicated. To date, most of the Emacs manuals that have been published have been comprehensive reference manuals rather than how-to books designed for people who are new to Emacs. That’s the reason for this book: to teach you how to learn Emacs from the ground up, covering first the basics and then some of the more advanced features.

In this book, we have tried to reach as broad an audience as possible: from the administrative assistant who needs to use Emacs only to write mail messages and office memos, to the professional writer who needs to write complex documents full of formatting codes, to the advanced programmer who would like to use Emacs to format source code. No matter what you do with Emacs, you will find it’s easy to learn; after one or two sessions, you’ll know the basics of editing any file. After you learn the basics, you can go on to learn about more advanced topics that provide the real benefits of using Emacs. These include

  • Using multiple windows and buffers so you can work on several files at once

  • Customizing your keyboard commands

  • Tailoring Emacs to fit your work style using variables

  • Making Emacs your work environment where you can do all your everyday tasks, such as reading mail, compiling programs, and issuing shell commands

  • Creating macros to streamline repetitive tasks

  • Using Emacs to support programming in many languages (including C, C++, LISP, and FORTRAN)

  • Formatting files with various markup languages

  • Using word abbreviations to avoid spelling out long phrases or to correct common misspellings

  • Accessing Internet resources through Emacs

Of course, many of the topics may not apply to you; some topics may be appropriate for a second reading but not for the first. Toward the end of the preface, we’ll sketch several different ways to approach the book, depending on your interests and experience.

We do make a few assumptions. We assume that you’re basically familiar with UNIX (or, if not UNIX, whatever operating system you’re using). In particular, you should know what files and directories are, how they are named, and the basic things you can do with them (copy, delete, rename; under UNIX, these are done with the cp, rm, and mv commands). If you’re completely new to UNIX, we recommend that you read Learning the UNIX Operating System, by Grace Todino, John Strang, and Jerry Peek, and published by O’Reilly & Associates.

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.