April 21, 2019

New HOWTO: Emacs Beginner's HOWTO

Table of Contents, Section 1

  • March 26, 2001
  Emacs Beginner's HOWTO
  Jeremy D. Zawodny: Jeremy@Zawodny.com
  v1.12, 2001-03-25

  This document introduces Linux users to the Emacs editor. It assumes
  minimal familiarity with vi or a similar editor. The latest version of
  this document is usually available from http://www.wcnet.org/jza�

  Table of Contents

  1. Introduction

     1.1 Copyright
     1.2 Audience and Intent
     1.3 What is Emacs?
        1.3.1 Ports and Versions
        1.3.2 Getting Emacs

  2. Running Emacs

     2.1 Starting & Quitting Emacs
        2.1.1 What you'll see
  The Menu Bar
  The Status Bar and Mini-buffer
     2.2 Some Terminology
        2.2.1 Buffers & Files
        2.2.2 Point & Region
        2.2.3 Windows
        2.2.4 Frames
     2.3 Keyboard Basics
        2.3.1 Command Keys (Meta, Esc, Control, and Alt)
        2.3.2 Moving Around in a Buffer
        2.3.3 Essential Commands
        2.3.4 Tab Completion
     2.4 Tutorial, Help, & Info

  3. Emacs Modes

     3.1 Major vs. Minor Modes
     3.2 Programming Modes
        3.2.1 C/C++/Java
        3.2.2 Perl
        3.2.3 Python
        3.2.4 Others
     3.3 Authoring
        3.3.1 Spell-Checking (
        3.3.2 HTML (
        3.3.3 TeX (
        3.3.4 SGML (
     3.4 Other Modes
        3.4.1 Version Control (
        3.4.2 Shell Mode
        3.4.3 Telnet and FTP
        3.4.4 Man
        3.4.5 Ange-FTP

  4. Customizing Emacs

     4.1 Temporary Customization
        4.1.1 Variable Assignments
        4.1.2 File Associations
     4.2 Using a
     4.3 The Customize Package
     4.4 X Windows Display

  5. Popular Packages

     5.1 VM (Mail)
     5.2 Gnus (Mail and News)
     5.3 BBDB (A rolodex)
     5.4 AucTeX (another TeX mode)

  6. Other Resources

     6.1 Books
        6.1.1 Learning GNU Emacs
        6.1.2 Writing GNU Emacs Extensions
        6.1.3 Programming in Emacs Lisp: An Introduction
        6.1.4 The GNU Emacs Lisp Reference Manual
     6.2 Web Sites
        6.2.1 EMACSulation
     6.3 Newsgroups
     6.4 Mailing Lists
     6.5 The Emacs Lisp Archive

  7. Credits


  1.  Introduction

  1.1.  Copyright

  Copyright � 1998 - 2001 Jeremy D. Zawodny. Permission to distribute
  and modify this document is granted under the GNU General Public
  License. An on-line copy is available at

  1.2.  Audience and Intent

  This document is targeted at the Linux user interested in learning a
  bit about Emacs and trying it out. This actually began as the outline
  of a brief tutorial that I was to give at a Toledo Area Linux User
  Group meeting: http://www.talug.org/. It has since grown a bit as the
  result of the helpful feedback I have received from the community. See
  the Credits section for details.

  Having said that, there is virtually nothing Linux-specific in this
  document. It applies to virtually all flavors of Unix and even Emacs
  running on Microsoft Windows. But since this document is part of the
  Linux Documentation Project, I make a point of saying that it was
  developed for Linux users--because it was.

  And finally, those of you who prefer the name GNU/Linux to simply
  ``Linux'' (read http://www.gnu.org/gnu/linux-and-gnu.html to see why
  one might) are welcomed to mentally substitute GNU/Linux for all
  occurrences of Linux in this document. While I don't disagree with the
  reasoning and spirit behind that idea, I don't feel compelled to write

  1.3.  What is Emacs?

  Emacs is different things to different people. Depending who you ask,
  you'll could get any of the following responses:

  �  Text Editor

  �  Mail Client

  �  News Reader

  �  Word Processor

  �  Religion

  �  Integrated Development Environment

  �  Whatever you want it to be!

  But for our purposes, let's just pretend it's a text editor--an
  amazingly flexible text editor. We'll dig deeper into the question
  later on. Emacs was written by Richard Stallman (founder of the Free
  Software Foundation: http://www.fsf.org/ and the GNU project
  http://www.gnu.org/) and he still maintains it today.

  Emacs is one of the most popular and powerful text editors used on
  Linux (and Unix). It is second in popularity only to vi. It is known
  for it huge feature set, ability to be easily customized, and lack of
  bugs. It's large feature set and ability to be customized actually are
  the result of how Emacs was designed and implemented. Without going
  into all the details, I'll simply point out that Emacs isn't ``just an
  editor''. It is an editor written mostly in the programming language
  Lisp. At the core of Emacs is a full-featured Lisp interpreter written
  in C. Only the most basic and low-level pieces of Emacs are written in
  C. The majority of the editor is actually written in Lisp. So, in a
  sense, Emacs has an entire programming language ``built in'' which you
  can use to customize, extend, and change its behavior.

  Emacs is also one of the oldest editors around. The fact that is has
  been used by thousands of programmers over the past 20 (?) years means
  that there are many add-on packages available. These add-ons allow you
  to make Emacs do things that Stallman had probably never dreamed
  possible when he first began work on Emacs. More on that in a later

  There are many other web sites and documents which give a better
  overview of Emacs, its history, and related matters. Rather than
  attempt to reproduce much of that here, I suggest that you check out
  some of the places listed in Section ``Other Resources'' section of
  this document.

  1.3.1.  Ports and Versions

  It's worth pointing out that there are actually two different Emacs
  editors: GNU Emacs and XEmacs. Both come from the same heritage and
  share most of the same features. This document focuses on GNU Emacs
  (version 20.3, specifically) but much of what you'll read here will
  apply just as well to XEmacs and earlier versions of GNU Emacs.
  Throughout this document I will simply refer to ``Emacs''. When I do
  so, bear that in mind.

  1.3.2.  Getting Emacs

  Getting Emacs is easy. If you are using a popular Linux distribution
  like Debian, RedHat, Slackware, or any of the others, Emacs is
  probably an optional package that you can install from your
  distribution media. If not, you can get the Emacs source code and
  compile it yourself. Visit the GNU web site for the exact location:

Most Popular LinuxPlanet Stories