Emacs - the Text Editor Content from the guide to life, the universe and everything

Emacs - the Text Editor

2 Conversations

Emacs is a computer program for editing plain text files such as source codes, web pages, emails, or print documents, and it works with all major computer systems. It's an extremely powerful tool, and therefore not trivial to handle. Nevertheless, Emacs is very widely used and probably the favourite editor for professional computer users. It's free software - you don't have to pay for it - available from the GNU Project.

Origin

Emacs has a long history. Its principal author is Richard Stallman, the initiator of the GNU open software project1. In fact, 'classical' Emacs is part of GNU2.

Birth

Emacs is a typical child of the hacker subculture of the 1960s and 1970s. Emacs was born in 1976 at the MIT (Massachusetts Institute of Technology). The name Emacs means 'Editor Macros' - it started as a set of macros for an ancient text editor called TECO3. TECO ran under the very ancient ITS operating system4 on prehistoric DEC PDP-10 computers, which were very popular at that time. As you can see, all these things have long become extinct. Emacs, however, was re-written to an independent program - and survived.

The Early Years

Emacs' childhood lasted until 1985 and is a bit of a mystery. However, in the middle of 1985 version 15 was released (containing a substantial amount of code written by James Gosling, who later created the Java language). A period of intensive development followed until the early 1990s. With version 19, the program was split up into two major projects: The XEmacs, and the GNU Emacs, the 'classical' one.

Present Situation

Since then, the program has been considered mature and stable, but users and developers are never content. Generations of hackers, students, professors and other volunteers have made their contributions. Today Emacs' standard source code (version 21) has a size of 70MBytes (although the compiled version is much smaller), which seems to be ridiculously large for a plain text editor. It has always been a rather resource-consuming tool. On the other hand, you get an amazing amount of functionality, and on a typical modern computer its size doesn't hurt much.

What Can Emacs Do?

Despite all the extensions and plug-ins, by and large Emacs is still a text editor for plain text files. There are hundreds of such programs out there, but Emacs merges most of their abilities into a single editor.

Why Such Dull Text Files at All?

Despite the ubiquitous (often proprietary) binary file formats, text files are used everywhere. Programmers produce them every day in large numbers, and HTML web pages or simple emails are plain text files, too. Another very important field is the LaTeX typesetting system. It is used by most mathematicians, computer scientists, physicists, many engineers and even some jurists for their documents, and it is based entirely on text files.

Additionally, text files are easy to share, to send via the Internet, and to be processed by different programs at the same time. The reason for this versatility is that they are the lowest common denominator of all kinds of files.

Basics

With Emacs, you have a fast view on your document, you can scroll through it, position a cursor at the desired position and modify the text. You can open as many files as you wish and split the screen in multiple sub-windows to see more than one file at the same time.

All of this is less trivial than it seems, especially because Emacs offers this on all operating systems (such as Linux, Windows, Unix, VMS, MS-DOS, MacOS, and very old machines that even don't have graphics) in the same fashion. You only have to learn one editor, regardless of the computer systems you have to work with in your life.

Advanced Use

Emacs is famous for its more sophisticated functions. It has an extremely powerful search-and-replace routine. You can totally re-structure your document with an arbitrarily big archive of cut-out text fragments. You can save text positions in registers and jump back to them later. Those registers can also be filled with snippets for later use.

Emacs communicates with some external programs for you, so you don't need to learn them. The spell checker 'ispell' knows probably all human languages you could enumerate. Another program called 'RCS' keeps track of every change you've made, so you can re-view a version of your text that you saved years ago, or see a 'history' of your project. There are many more such helpers - although they remain stand-alone programs, they are so well integrated into Emacs that they seem to be part of it.

The most practical thing is that Emacs auto-detects the type of the file, whether it's HTML, a C source code, or something else entirely. Emacs then turns itself into an editor optimised exactly for the respective file type. It can test the validity of your web page, can call the C compiler for you, or it displays a concise table of contents of your master thesis.

Things Written for Emacs

Emacs contains a complete - albeit somewhat slow - programming language, a non-standard Lisp (List Processing) dialect called Emacs Lisp. There are many applications written in this language. Emacs Gnus for example is one of these programs within Emacs. Gnus is regarded as one of the best newsgroup readers. Other modules let you send and receive emails, and collect them in different folders.

The calendar in Emacs can not only organise your diary, you can also convert the current (or another) date to the Islamic, Hebrew, Mayan, Chinese and whatever calendar. Although you probably don't need that, it shows the philosophy of Emacs developers: If you do it, do it thoroughly. It will be hard to find a function that you need and that nobody else has thought about so far and thus has already implemented.

Disadvantages of Emacs

If Emacs is so good, and it's free, and it runs on various operating systems, why do so many people use other text editors?

First of all, most ordinary computer users use text files quite rarely. That's a pity, but a totally different issue.

You Must Like Using the Keyboard

A real problem is that Emacs has old roots and uses a very uncommon interface - the menu bar is quite awkward to use, and sometimes it's not even available. Instead, Emacs relies heavily on keyboard short cuts, something many people are afraid of. However, skilfully used, such short cuts can be a comfortable way to tell a computer what to do.

For instance, it used to be a popular joke on console Unix systems to let a beginner start Emacs and to tell him, 'Well, now just leave Emacs'. Such systems have neither a mouse nor a menu bar. Most would then try something like ALT-X, ALT-Q, or ALT-F4, but the solution is CTRL-X-C which you would be unlikely to guess.

Sometimes Just Too Big

Another problem is that because it's such a powerful tool, it can be quite intimidating for many users. Emacs does a lot of things automatically, trying to guess what you want. However, sometimes you have to change this standard behaviour. And then you can easily get lost in loads of options, parameters, and configuration files.

Emacs' size itself has disadvantages. Not so much for the free space on the hard disk, but even on modern computers it may take a couple of seconds to start, and for trivial modifications (which may occur quite frequently) smaller editors like 'vim' are more appropriate. Therefore some people see in 'EMACS' a recursive acronym for 'Emacs Makes A Computer Slow'.

The Success

Emacs is regarded as the most complete editor, with all pros and cons that means. Like with Linux, some sort of cult has come into existence, with a logo, with merchandising, and an uncounted number of in-jokes. In various large newsgroups many experts quickly give answers to questions from beginners.

Since 1971, the most important computer society, the ACM (Association for Computing Machinery), annually awards the Grace Murray Hopper Award for 'a single recent major technical or service contribution'. Information technology legends like professor Don Knuth5 (TeX), Stephen Wozniak (Apple), and Bjarne Stroustrup (C++) have won so far. In 1990, Richard Stallman was awarded 'for pioneering work in the development of the extensible editor EMACS'.

Eventually a Matter of Taste

As almost every famous tool that has to meet very individual preferences of the user, Emacs is involved in a holy war6. This one involves several other free editors (especially vi), all of them smaller and for some people more handy than Emacs. Although Emacs offers so much, the competitors have attractive features too. So choosing Emacs as a tool also expresses personal taste and ideology.

1Maybe you know Linux; the biggest component of Linux is the GNU system.2GNU is a recursive acronym for 'Gnu's Not Unix'. For other acronyms see the Emacs jargon entry.3Curiously enough, today TECO can be used inside Emacs, turning the father into a son.4Which is older than Unix, which was created in the early 1970s.5Author of The Art of Computer Programming.6Hacker jargon, see The New Hacker's Dictionary.

Bookmark on your Personal Space


Edited Entry

A839135

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry

Categorised In:


Written by

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more