Emacs, the self-documenting editor

| emacs

In response to cmarguel’s blog entry:

Miguel Arguelles wondered what was so self-documenting about Emacs.
Paolo showed him the source code, but Miguel pointed out people have
to type those comments in anyway. So what makes Emacs a
self-documenting editor and my favorite tool?

Emacs is called a self-documenting editor because the source code to
_any_ function can be found with a few keystrokes. Curious about how
M-x find-file works? Use C-h f to look up the definition, follow the
link in the help buffer, and get as much detail as you want. You can
even use the Emacs debugger (edebug) to explore the behavior of
functions. Emacs exposes its internals to an extent no other editor
has even attempted.

Code? Why are we looking at code? Shouldn’t we be looking at neat
comments explaining how everything works? The paradigm shift here is
that _code_ is often the best documentation for itself. Comments
should explain usage and the background reasons for coding, but the
code itself should be clear and easy to understand. Programming
languages like C and Java tend to encourage short, almost cryptic
identifiers. Lisp may initially seem daunting because of the
parentheses, but the long identifier names and the simple structure
make it easy to read even if you don’t have a background in functional
programming.

Not only can you look functions up, but you can also _change_ them
while Emacs is running. Don’t like the way save-buffer works? You can
redefine it with a little Emacs Lisp programming. Want to do some pre-
or post-processing? There’s support for that too. Emacs is a rapid
development environment for itself. That’s why there are so many
modules available for it. Emacs is an editor you can customize to your
heart’s content.

Documentation is just a few keystrokes away. All the commonly-used
functions and variables have clear instructions for usage. Emacs
coding style suggests having a documentation string explaining the
arguments and usage for each function, and there are tools for
checking compliance. Emacs also has a lot of contributed documentation
on http://www.emacswiki.org and other Emacs-related sites.

Emacs doesn’t hide anything from you. That’s why Emacs is called a
self-documenting editor. Even after trying out other editors like
Eclipse and vim, I still go back to Emacs. I’ve tasted power, and I’m
hooked.

You can comment with Disqus or you can e-mail me at sacha@sachachua.com.