GNU Emacs is the most popular and widespread of the Emacs family of editors. It is also the most powerful and flexible. Unlike all other text editors, GNU Emacs is a complete working environment -- you can stay within Emacs all day without leaving. This book tells you how to get started with the GNU Emacs editor. It will also "grow" with you: as you become more proficient, this book will help you learn how to use Emacs more effectively. It takes you from basic Emacs usage (simple text editing) to moderately complicated customization and programming.
The second edition of Learning GNU Emacs describes all of the new features of GNU Emacs 19.30, including fonts and colors, pull-down menus, scroll bars, enhanced X Window support, and correct bindings for most standard keys. GNUS, a Usenet newsreader, and ange-ftp mode, a transparent interface to the file transfer protocol, are also described.
Learning GNU Emacs, second edition, covers:
Using Emacs as an Internet Toolkit (to use electronic mail and Usenet news, telnet to other computers, retrieve files using FTP, browse the World Wide Web, and author Web documents)
Emacs' rich, comprehensive online help facilities
How to edit files with Emacs
Using Emacs as a "shell environment"
How to take advantage of "built-in" formatting features
How to use multiple buffers, Emacs windows, and X Windows
The Emacs interface to the X Window System, which allows you to use a mouse and pop-up menus
Whys and hows of writing macros to circumvent repetitious tasks
Emacs as a programming environment
The basics of Emacs LISP
How to get Emacs
The book is aimed at new Emacs users, whether or not they are programmers. Also useful for readers switching from other Emacs implementations to GNU Emacs.
Chapter 1 Preface
Why Read This Book?
Which Emacs Is Which?
GNU Emacs and the Free Software Foundation
An Approach to Learning Emacs
What We Haven’t Included
Conventions Used in This Book
How to Contact Us
Chapter 2 Emacs Basics
Understanding Files and Buffers
A Word About Modes
About the Emacs Screen
Opening a File
Chapter 3 Editing Files
Moving the Cursor
Marking Text to Delete, Move, or Copy
Editing Tricks and Shortcuts
Stopping Commands and Undoing Changes
Making Emacs Work the Way You Want
Chapter 4 Search and Replace Operations
Different Kinds of Searches
Search and Replace
Word Abbreviation Mode
Chapter 5 Using Buffers and Windows
Files, Buffers, and Windows
Working with Multiple Buffers
Working with Windows
Holding Your Place with Bookmarks
Temporarily Suspending Emacs
Using Multiple X Windows
Chapter 6 Emacs as a Work Environment
Executing UNIX Commands in Shell Buffers
Working with Files and Directories
Printing from Emacs
Reading Manpages in Emacs
Using Time Management Tools
Using Your Emacs Work Environment
Chapter 7 Email and Usenet News
Working with Mail
Sending Mail from Within Emacs
Reading Mail from Within Emacs
Reading Usenet News with Gnus
Chapter 8 Emacs as an Internet Toolkit
Using Telnet Mode
Using Ange-ftp Mode
Browsing the Web with W3
Chapter 9 Simple Text Formatting and Specialized Editing
Inserting Page Breaks
Making Simple Drawings
Using Outline Mode
Chapter 10 Marking up Text with Emacs
Marking up Text for troff and nroff
Marking up Text for TEX and LATEX
Using Html-helper Mode
Chapter 11 Writing Macros
What Is a Macro?
Defining a Macro
Tips for Creating Good Macros
Adding to an Existing Macro
Naming and Saving Your Macros
Executing a Named Macro
Building More Complicated Macros
Chapter 12 Customizing Emacs
Emacs LISP Packages
Chapter 13 Emacs for Programmers
C and C++ Modes
The LISP Modes
Chapter 14 Emacs LISP Programming
Introduction to LISP
LISP Primitive Functions
Useful Built-In Emacs Functions
Programming a Major Mode
Customizing Existing Modes
Building Your Own LISP Library
Chapter 15 Emacs and X
Using Emacs with X Fonts and Colors
X Display Customizations
Customizing via Your .Xdefaults File
Properties, Frames, Menus, and Mouse Events
Communicating with the X Server
A Note on Good X Programming Style
Chapter 16 Version Control Under Emacs
The Uses of Version Control
Version Control Concepts
How VC Helps with Basic Operations
Editing Comment Buffers
VC Command Summary
VC Mode Indicators
Which Version Control System?
Individual VC Commands
What VC Is Not
Using VC Effectively
Chapter 17 Online Help
Help in Complex Emacs Commands
Appendix How to Get Emacs
FTP on the Internet
Free Software Foundation
Other CD-ROM Sources
Appendix Making Emacs Work the Way You Think It Should
Debra Cameron is president of Cameron Consulting. In addition to her love for Emacs, Deb researches and writes about emerging technologies and their applications. Her latest book, Optical Networking: A Wiley Tech Brief, published in 2002 by John Wiley & Sons, covers the practical applications of optical networking and was written in the hope that true broadband will be more widely deployed. Deb also edits OReilly titles, including DNS and Bind, DNS on Windows 2000, TCP/IP Network Administration, HTML and XHTML: The Definitive Guide, Java Security, Java Swing, Learning Java, and Java Performance Tuning. She has presented numerous videos for WatchIT.com, covering security and networking as well as e-business topics. She has moderated roundtables on PlanetIT on advanced networking and intranet design. Deb resides in Gaithersburg, Maryland with her husband Jim and their three children, Meg, David, and Bethany.
Bill Rosenblatt is president of GiantSteps/Media Technology Strategies, a consulting firm in New York City. Before founding GiantSteps, Bill was CTO of Fathom, an online content and education company associated with Columbia University and other scholarly institutions. He has been a technology executive at McGraw-Hill and Times Mirror, and head of strategic marketing for media and publishing at Sun Microsystems. Bill was also one of the architects of the Digital Object Identifier (DOI), a standard for online content identification and DRM.
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal featured on the cover of Learning GNU Emacs is a gnu or wildebeest. Gnus are African antelopes which inhabit the Serengeti Plains. Male gnus are no more than 52 inches in height and 500 pounds in weight, but have the most lethal horns of any of the antelopes. Bulls are very territorial and tend to remain alone. The females and young generally live in small herds. However, they may congregate in the tens of thousands during migration. Gnus are the favorite prey of lions. UNIX and its attendant programs can be unruly beasts. Nutshell Handbooks(R) help you tame them.
Edie Freedman designed this cover and the entire UNIX bestiary that appears on other Nutshell Handbooks. The beasts themselves are adapted from 19th-century engravings from the Dover Pictorial Archive.
The text of this book is set in Times Roman; headings are Helvetica; examples are Courier. Text was prepared using SortQuad's sqtroff text formatter. Figures are produced with a Macintosh. Printing is done on a Tegra Varityper 5000.
Comments about oreilly Learning GNU Emacs, 2nd Edition:
This book covers toomuch useless material. Nobody is going to check mail/ftp/telnet/news/browse with emacs. Yes, Emacs can do these things, but so what? It dosn't mater. A browser like NS can do it too, and better. The main point of emacs is that it's suposed to be a good word processor; that it can be use to write and assist in debuging code.
My intrest in Emacs was as a programer, and this book failed me totaly. The section on programing is 10 pages long. If you want to use emacs to code, just look for the info on the net. There isn't anything in this book that you couldn't find in a student essay on using emacs as a programing tool.
I find this book to be much to long getting to the point. The material covered in the frist five chapters is covered in the free tutorial included with emacs. 120 pages to explain what the sentence "Open emacs, press Ctrl-h t and read the tutorial."
I think that the writers (yes, it took 3 people) of this book thought that people might want to use emacs for word processing, and I think the writer was paid by the page, not the project, hence the 500 page book.
To the editors I say: Trim about 200 pages off this one. Emacs is full of features, but lots of them are useless and exotic. Try to make the next edition of this book more like your book on bash (shell).
To people wanting this book I say: forget it. Your throwing your cash away. Do a search on Google, this book dosn't deliver. I would take mine back to the store, but I pulled out the little 'hint' card in the back, so they wont take it back.