GNU Emacs

UNIX Text Editing and Programming

Michael A. Schoonover, John S. Bowie, William R. Arnold

Publisher: Addison-Wesley, 1992, 609 pages

ISBN: 0-201-56345-2

Keywords: Programming

Last modified: March 10, 2022, 1:46 a.m.

GNU Emacs is quickly becoming the text editor and programming environment of choice among UNIX users. This book is a succinct tutorial and comprehensive reference to standard GNU Emacs.

GNU Emac's text-editing capabilities are impressive: outline editing, spell checking, handling multiple files (buffers), indenting, text filling, sorting, passing text through shell filters, keeping backups automatically, printing buffers, etc. In addition, GNU Emacs provides the Dired facility for managing your files without leaving the Editor!

GNU Emacs' capabilities as a programming environment are unequaled by other UNIX text editors. This book discusses GNU Emacs programming modes for C, FORTRAN, LISP, and even Pascal. These modes allow you to do syntax-direct editing, compiling, comment insertion, automatic program indentation, multiple-file search-and-replace operations (with tag files), and source documenting (with ChangeLog files).

If you are new to GNU Emacs, you will find the step-by-step tutorials invaluable. You will also appreciate the gentle introduction to basic capabilities, leading you gradually toward more advanced usage.

If you are an experienced GNU Emacs user, the command summaries allow you to quickly access needed reference information, and you will pick up some tricks and new ideas from the sections and chapters on advanced usage.

If you are a vi user who wants to switch to GNU Emacs, but you don't want to struggle with the associated learning curve, you will appreciate the comprehensive appendix that maps vi commands to their GNU Emacs counterparts. It shows you how to do all you favorite vi commands in GNU Emacs!

  1. Text Editing In Emacs
    1. A Quick Tour of Emacs
      • Starting Emacs
        • What If Emacs Does Not Start?
      • Exiting Emacs
        • Suspending Your Emacs Session
        • Ending Your Emacs Session
      • Understanding the Emacs Screen
        • The Workspace
        • The Cursor (Point)
        • The Mode Line
        • The Echo Area
        • Softkeys (Nonstandard)
      • Tying Text
      • Typing Commands
        • Control Key Commands
        • Meta Commands
        • Commands and the Echo Area
        • Aborting Commands
      • Using a Basic Set of Editing Commands
      • Getting Online Help
        • Finding Your Online Help and DEL Keys
        • Getting Help on Commands
        • Running the Online Tutorial
        • Other Online Information Sources
      • Using Emacs to Process Electronic Mail
      • Using Emacs to Manage Files
      • Changing Emacs' Behavior with Variables
      • Summary
    2. Basic Editing Commands
      • Visiting a File
      • Saving a Buffer
      • Listing Buffers
      • Switching to a Different Buffer
      • Killing A Buffer
      • Setting the Mode for a Buffer
      • Moving the Cursor
        • Using Arrow Keys
        • Using a Mouse
      • Using Line Numbers
      • Deleting Text
      • Undoing Mistakes
      • Using Regions
        • Seeing the Bounds of a Region
        • Moving a Region of Text
        • Copying a Region of Text
      • Searching for Text
        • Stopping the Search
        • Editing the Search String with DEL
        • Reusing a Search String
      • Searching and Replacing Text
      • Overwriting Text
      • Summary
    3. More Efficient Editing
      • Running a Command Multiple Times
        • Specifying Numeric Arguments with C-u
        • Specifying Numeric Arguments with the Meta Key
      • Modifying Command Behavior with Arguments
      • Inserting Control Characters into a Buffer
      • Working with Words, Sentences, and Paragraphs
        • Words
        • Sentences
        • Paragraphs
      • Working with Pages
      • Working with Blank Lines
      • Getting Cursor, Line, and Page Information
      • Transposing Text
      • Filling Text
        • Using the Fill Prefix
        • Enabling Auto-Fill Minor Mode
      • Indenting Text
        • Setting Tab Stops
        • Converting Tabs to Spaces
        • Using Auto-Indent Mode
      • Changing Letter Case
      • Searching and Replacing Text
        • Nonincremental Searches
        • Word Searches
        • Unconditional Search-and-Replace
      • Narrowing a Buffer
      • Moving the Cursor to Previous Marks (the Mark Ring)
      • Using the Kill Ring
        • How Text Is Placed in the Kill Ring
        • Stepping Through the Kill Ring
      • Completing Long Command Names
      • Completing File Names
      • Using Abbreviations (Text Expansions)
        • Enabling Abbreviations
        • Defining Abbreviations
        • Letter Case in Abbreviations
        • Expanding Abbreviations
        • Listing Abbreviations
        • Modifying Abbreviations
        • Removing All Abbreviations
        • Saving Abbreviations for Later Use
        • Retyping Long Words with Dynamic Abbreviation Expansion
      • Using Macros for Repeated Editing Tasks
        • Why Use a Macro?
        • Defining Macros
        • To Name or Not to Name
        • Naming and Running a Macro
        • Saving Macros
        • Retrieving Saved Macros
        • Including a Query in a Macro Definition
        • An Example of Using Macros
      • Scrolling Windows
      • Wording with Multiple Windows
      • Printing a Buffer
      • Listing a Directory
      • Summary
    4. Advanced Editing
      • Changing Emacs' Behavior with Commands
        • Changing the Goal Column for C-p and C-n Commands
        • Displaying Date and Time in the Mode Line
      • Changing Emacs' Behavior with Command-Line Arguments
      • Searching for Regular Expressions (Regexps)
        • Constructing Regexps
        • Using the Special Character \
        • Defining Groups with \( and \)
        • Referencing Prior Groups ina Regexp
      • Searching and Replacing Regexps
      • Editing Outlines
        • What Is an Outline?
        • Moving Among Headings
        • Hiding and Showing Lines
        • Changing the Heading Prefix
      • Manipulating Buffers
      • Advanced File Operations
        • Creating, Retrieving (Visiting), and Inserting Files
        • Saving and Writing Files
        • Changing a Buffer's Associated File and Directory
      • Managing Auto-Saving
        • Enabling/Disabling Auto-Saving
      • Managing Emacs Backup Files
        • Selecting a Backup Strategy
        • Backup File Naming Conventions
        • Controlling the Method of Creating Backup Files
        • Controlling the Deletion of Backup Files
        • Turning Off Automatic File Backup
      • Reverting a Buffer to Its Original Contents
      • Preventing Simultaneous Editing
      • Advanced Window Operations
        • Working in Other Windows
        • Changing Your Window Size
      • Editing Your Responses in the Minibuffer
        • Using Emacs' Command History
        • Exiting the Minibuffer
        • Letting Emacs Complete Your Responses
        • Displaying Completion Alternatives
      • Sorting Text
        • Example of Sorting Entire Lines
        • Example of Sorting by Fields
        • Example of a Numeric Field Sort
        • Example of Sorting Columns
        • Example of Sorting Paragraphs
      • Using Rectangles
        • Defining a Rectangle
        • Manipulating Rectangles
      • Using Registers
        • Using Registers to Mark Positions in a Buffer
        • Using Registers to Save and Retrieve Text
      • Summary
  2. Programming In Emacs
    1. Program Development in Emacs
      • Supported Editing Modes
        • Determining the Mode from the File Name
        • Specifying the Mode within the Source File
        • Explicitly Setting the Editing Mode
      • Using Fundamental and Text Mode Commands in Programming Modes
      • Moving by Function
      • Marking Functions
      • Indenting Programs Commenting Programs
      • Matching Parentheses, Braces, and Brackets
      • Forcing Balanced Parentheses
      • Selectively Displaying Program Lines
      • Getting Documentation on System Commands and Routines
      • Editing Across Multiple Files with Tag Tables
        • What Is a Tag?
        • Setting Up Tag Tables
        • Selecting the Tag Table
        • Finding Tags
        • Searching and Replacing Text
        • Visiting Files
        • Listing Tags in a File
      • Keeping Track of Changes to source with a ChangeLog
      • Compiling Programs
        • Compilation Status and Aborting
        • Correcting Syntax Errors
        • Re-Viewing Errors
      • Sexp Commands (Advanced Usage)
        • What Are Sexps?
        • The Commands
      • Summary
    2. Editing in C Mode
      • Invoking C Mode
      • Assumptions About C Source
      • Moving Among Functions
      • Marking Functions
      • Indenting Programs
        • Automatically Indenting Braces
        • Indenting Function Argument Declarations
        • Indenting Function Bodies
        • Indenting Continued Statements
        • Indenting Compound Statements
        • Indenting case, default, and label Statement
        • Indenting Extra-Long Lines
        • Altering the Behavior of TAB
      • Commenting Programs
      • Working with Sexps and Lists (Advanced Usage)
        • What Are Sexps and Lists in C Mode?
        • Moving Among Sexps and Lists
        • Marking Sexps
        • Transposing Sexps Around Point
        • Killing Sexps
      • Customizing Indentation (Advanced Usage)
        • Setting Indentation of Arguments 
        • Setting Indentation of Continued Statements
        • Changing Compound Statement Indentation
        • Setting Indentation of case, default, and label Statements
        • Setting Indentation of Function Bodies
        • An Example: Using Kernighan and Ritchie Indentation Style
      • Customizing Commenting (Advanced Usage)
        • Changing the Comment Column
        • Changing Comment Delimiters
        • Changing the Comment Search Patterns
        • Handling Multi-Line Comments
      • Summary
    3. Editing in FORTRAN Mode
      • Invoking FORTRAN Mode
      • Assumptions About FORTRAN Source
      • Moving Among Subprograms and Statements
      • Marking Subprograms
      • Indenting Programs
        • Making Continuation Lines
        • Visual Aids for Indentation
      • Labeling Lines
      • Commenting Programs
      • Using FORTRAN Keyword Abbreviations
      • Working with Sexps and Lists (Advanced Usage)
      • What Are Sexps and Lists in FORTRAN Mode?
        • Moving Among Sexps and Lists
        • Marking Sexps
        • Killing Sexps
      • Customizing Indentation (Advanced Usage)
        • Changing Indentation of Statements
        • Changing Indentation of do Statements
        • Changing Indentation of if Statements
        • Changing Indentation of Continuation Lines
      • Customizing Commenting (Advanced Usage)
        • Customizing Standard Comments
        • Customizing Nonstandard Comments
        • Additional Customizations
      • Summary
    4. Editing in Lisp Modes
      • Lisp Major Modes
      • Assumptions About Lisp Source
      • Moving Among Defuns
      • Moving Among Sexps and Lists
        • What Are Lists and Sexps in Lisp Modes?
      • List and Sexp Motion Commands
      • Marking Text
      • Transposing Sexps
      • Killing Sexps
      • Indenting Programs
        • Indenting a List's Contents
        • Shifting a List to Correct Alignment
      • Commenting Programs
        • Creating New Comments
        • Typing Multi-Line Comments
        • Aligning Comments
        • Setting the Comment Column
        • Killing Comments
        • Moving Comments
      • Evaluating Lisp Code
        • Evaluating Code in the Minibuffer
        • Emacs-Lisp Mode
        • Lisp Interaction Mode
        • Lisp Mode
        • Inferior Lisp Mode
      • Customizing Indentation (Advanced Usage)
        • Indenting for Defuns
        • General Indentation Rules
        • Overriding Default Indentation
      • Customizing Commenting (Advanced Usage)
        • Changing the Comment Column
        • Changing Comment Delimiters
        • Changing the Comment Search Pattern
      • Summary
  3. Additional Emacs Features
    1. Getting Online Help
      • Running Help Commands
      • Getting Instructions for Using Help
      • Getting Command Information
        • Displaying a Command Key Binding
        • Displaying Command Documentation
        • Displaying a Function Binding
        • Showing All Command Key Bindings
        • Searching for Commands (Apropos)
      • Summary
    2. Using Emacs for Electronic Mail
      • The RMAIL Facility and Other UNIX Mail Facilities
      • Reading Mail Messages
      • Exiting from the RMAIL Buffer Moving Around Your Mail Messages
      • Saving Messages to Files
        • Saving Messages in RMAIL vs. UNIX Mail Format
      • Removing Messages
      • Getting New Mail
      • Using a Mail Summary to Scan Messages
        • Creating a Mail Summary Buffer
        • Reading  Your Mail with a Summary Buffer
      • Composing and Sending Messages
        • Editing the Mail Message Header
        • Editing the Mail Header Separator (Don't!)
        • Editing the Message Body
        • Sending Your Message
        • Starting a New Message
        • Sending Replies to Messages
        • Forwarding a Message to Others
      • Using Mode Line Status Messages (Labels)
        • Creating and Searching for Message Labels
      • Using Multiple Mailbox Files
        • Caveat to the o Command
        • Caveat to the C-o Command
      • Reading Digest Messages
      • Associating UNIX Mailbox Files with RMAIL Mailbox Files (Advanced Usage)
      • Summary
    3. Managing Files and Buffers
      • Using the Dired Facility to Manage Files
        • Moving the Cursor in a Dired Buffer
        • Running Dired File Management Commands
        • Marking Files for Deletion
      • Managing Multiple Buffers with Buffer-Menus
      • Summary
    4. Miscellaneous Emacs Features
      • Checking Your Spelling
        • Checking a Word (M-$)
        • Checking the Words in a Buffer (M-x spell-buffer)
        • Checking the Words in a Region (M-x spell-region)
      • Rerunning Commands from the Command History
      • Recovering Files After System Crashes
        • Controlling How Often Auto-Saves Occur
        • Enabling and Disabling Auto-Saving
        • Auto-Saving to the Visited File
        • Where Are Unvisited Buffers Auto-Saved?
      • Using UNIX Commands in Emacs
        • Examples of Using M-! and M-|
      • Running a UNIX Shell in an Emacs Buffer
        • Shell Initialization
        • Shell Mode Commands
      • Nroff Major Mode
      • TeX Modes: LaTeX and Plain TeX
        • Configuring Emacs to Use TeX Modes
        • TeX Mode Commands
      • Picture Mode
        • Aligning the Cursor with "Interesting" Characters
        • Drawing Lines
      • Doctor Mode
      • Summary
  4. Customizing And Administering Emacs
    1. Customizing the Emacs Environment
      • Using a .emacs Start-Up File
      • Using Variables to Change Emacs' Behavior
        • Nil and T Values
        • String Values
        • Displaying a Variable's Value
        • Interactively Setting a Variable
        • Setting a Variable in Your .emacs File
        • Some Useful Variables
      • Changing Command Key Bindings
        • Finding Free or Unneeded Key Bindings
        • Setting Bindings Interactively
        • Setting Bindings in Your .emacs File
      • Forcing Confirmation for a Function
      • More About Variable (Advanced Usage)
        • Global (Default) and Local Variables
        • Making a Variable Local to a Buffer
        • Setting and Examining a Variable's Default Value
        • Using Local Variable Lists for Specific Files
        • Viewing and Editing Lists of Options
      • More About Key Bindings (Advanced Usage)
        • How Emacs Handles Prefix Keys
        • What Are Sparse Keymaps?
        • Local Keymaps
        • Using Emacs-Lisp to Set Bindings
      • Examples of .emacs Customizations
      • Summary
    2. Administering Emacs
      • Finding Emacs and identifying Its Parts
        • Emacs Is Not a Supported Product
        • Where Does Emacs Reside?
        • Finding the Other Emacs Files
        • More on the Emacs etc Directory
      • Using New (or Notes) to Get Emacs Information
      • Installing Emacs
        • Getting Help on Installation
        • Using Anonymous FTP to Get Files
        • Installing Emacs from Tape
      • Summary
  1. Editing in Pascal Mode
    • Obtaining a Pascal Mode
    • Enabling Pascal Mode
    • Assumptions About Pascal Source
    • Moving the Cursor
    • Indenting Programs
    • Commands That Build Pascal Constructs
    • Creating a New Program
      • Terminating  a Pascal Construct Command
      • Entering Optional Parameters
      • Undoing Pascal Construct Commands
      • Changing Keyword Case
      • Displaying the Current Procedure or Function's Name
      • Summary of Pascal Contruct Commands
    • Commenting Programs
    • Working with Sexps and Lists (Advanced Usage)
      • What Are Sexps and Lists in Pascal Mode?
      • List and Sexp Motion Commands
      • Marking Sexps
      • Killing Sexps
      • Transposing Sexps
    • Customizing Indentation
    • Customizing Commenting (Advanced Usage)
      • Changing the Comment Columns
      • Changing Comment Delimiters
      • Changing the Comment Search Patterns
      • Handling Multi-Line Comments
    • Summary
  2. Emacs-Lisp Programming
    • An Overview of Emacs-Lisp Programming
      • Calling Functions
      • Emacs-Lisp Data Types
      • A Useful Set of Emacs-Lisp Functions
      • Developing Your Functions
      • Interactive vs. Non-Interactive Functions
      • Declaring Interactive Functions
      • The Interactive Function
      • Specifying Read-Only Interactive Commands
      • Prompting for Multiple Interactive Arguments
      • Passing Emacs-Lisp Expression as Arguments
      • Code Letters to the interactive Function
    • Getting Documentation on Emacs-Lisp Defuns and Variables
    • Evaluating Lisp Code
      • Evaluating Code in the Minibuffer
      • Emacs-Lisp Mode
      • Lisp Interaction Mode
    • Loading Emacs-Lisp Libraries
      • Locating the Libraries on Your System
      • .el vs .elc Libraries
      • Loading and Running an Emacs-Lisp File
      • Loading and Running an Emacs-Lisp Library
    • Compiling Emacs-Lisp Code
      • Byte-Compiling a Single File
      • Byte-Compiling All the Files in a Directory
      • Compiling from the UNIX Command Line
    • Debugging Emacs-Lisp Code (Advanced Usage)
      • Canceling Debug-on-Entry
      • Setting Breakpoints
      • Using Debug Mode Commands
      • An Example Debug Session
      • An Example Using d to Step through Subexpressions
    • Converting Mocklisp to Emacs-Lisp (for Mocklisp Users)
    • Summary
  3. Switching from vi to Emacs
    • The vi Emulation Mode in Emacs
    • Starting the Editor
    • Saving Text and Exiting
    • Line Number Information Commands
    • Inserting Text
    • Undoing Commands
    • Repeating Commands
    • Rerunning Previous Commands
    • Moving the Cursor
    • Deleting Text
    • Using Marks
    • Searching for Text Search and Replace Text
    • Indenting Text
    • Copying and Moving Blocks of Text
    • Changing (Overwriting) Text
    • Scrolling Text
    • Using Shell Commands
    • Using Macros
    • Using Abbreviations
    • Miscellaneous Commands
  4. Emacs Command Reference
    • Abbreviations
    • Buffers
    • Buffer-Menu
    • Case Conversion
    • C Mode
    • Compilation
    • Cursor Motion
    • Debugger (Emacs-Lisp)
    • Deletion and Killing
    • Dired
    • Display Management
    • Editor Emulation (EDT, vi, Gosling Emacs)
    • Emacs-Lisp Programming
    • Exiting
    • Files
    • Filling
    • FORTRAN Mode
    • Help
    • Indentation
    • Key Bindings
    • Killing and Yanking (Moving and Copying)
    • Lisp Modes
    • Location and Date/Time
    • Macros
    • Mail
    • Minibuffer Editing
    • Modes
    • Nroff Mode
    • Numeric Prefix
    • Outline Editing
    • Pages
    • Paragraphs
    • Picture Mode
    • Printing
    • Rectangles
    • Regions
    • Registers
    • Searching
    • Searching and Replacing
    • Sentences
    • Sexps and Lists (Balanced Expressions)
    • Shells
    • Sorting
    • Spell-Checking
    • Tags
    • TeX Mode
    • Transposing
    • Undo
    • Variables
    • Windows
    • Words

Reviews

GNU Emacs

Reviewed by Roland Buresund

OK ***** (5 out of 10)

Last modified: Dec. 13, 2015, 1:53 p.m.

If you want to utilise emacs to the hilt, you need this tomb.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required