Writing GNU Emacs Extensions

Writing GNU Emacs Extensions

Authors: Bob Glickstein

Pages: 219

Publisher: O'Reilly

ISBN13: 9781565922617

Before you even begin to extend Emacs, it's already the highest-function text editor there is. Not only can it do everything you'd normally expect (formatting paragraphs, centering lines,searching for patterns, putting a block in upper case), not only does it have advanced features (matching braces in source code, employing color to highlight syntactic elements in your files,giving online help on every keystroke and other commands), but it also performs a host of functions you'd never dream of finding in a text editor. You can use Emacs to read and compose email and to browse the World Wide Web; you can have it run FTP for you, transparently making remote files editable as if they were local; you can ask it to remind you about upcoming meetings, appointments, and anniversaries. As if that weren't enough, Emacs can also play you in a game of Go-Moku (and win, more than likely); it can tell you today's date in the ancient Mayan calendar; and it can decompose a number into its prime factors.

With all that functionality, it may seem crazy that Emacs users often spend a significant portion of their time extending Emacs. After all, most programmers view their editors as tools for creating other software; why spend so much energy modifying the tool itself? A carpenter doesn't tinker with his hammer; a plumber doesn't tinker with his wrench; they use their tools to accomplish the job at hand. So why are Emacs users different?

The answer is that the carpenter and the plumber would tinker with their tools to make them better, if they knew how. Who knows exactly what they need better than they do? But they're not toolsmiths. On the other hand, Emacs is a special kind of tool: it's software, which means the tool is the same stuff as what Emacs users use it on. The user of Emacs is often a programmer,and programming Emacs is, after all, just programming. Emacs users are in the happy position
of being their own toolsmiths.