Brain Candy #54 - A Powerful Freebie

Brain Candy #54 - A Powerful Freebie

This month, I'm going to talk about a specialized subject - text editors. I've been working with computers extensively for about 25 years now, and I still find a good, powerful text editor to be one of the most important tools for any computer user. The featureless Notepad, included with Windows for years, is a bare-bones example of a text editor, but if that's the only one you've ever used, you don't know what you are missing. Some folks use word processors for their text editing work, but the tool set of a word processor is somewhat different from what I typically need. Word processors have many features not needed for text editing (and which often get in the way) and lack many features that are necessary for productive text wrangling. I'll give two examples of what I've done with text editors.

Long ago, I owned a computer with a text editor, but I didn't own a spreadsheet. I was the secretary for a bowling league, and had to crunch the numbers each week for our league. These guys were spoiled - it was an employee league and I got complaints if the results weren't available the next morning. Since I got home about 8 pm, this gave me only a few hours to process the information. It was a sizable league - by hand, it was just too much work. Text editor to the rescue - I created some simple text editor programming to ask for the scores, create a new weekly sheet, keep the cumulative records for individuals and teams, note exceptional performances, format and print everything out. It made a difficult, time-consuming task easy.

The other example is this column. I type it in using a text editor and send it to our editor. If that's all I did, Notepad would be sufficient, but I also publish all my Brain Candy articles on our personal web page. The process of going from text to HTML, the language of the web page, isn't very involved. For a while, I did it by hand. As that got tedious, I began to write little programs that handled parts of the conversion. Lately, I've really upgraded them - to go from this article in text form to a publishing it on the web is now a two to five minute task. I have complete control of the output, too.

In both the cases above, I've mentioned programming. Powerful text editors can be programmed, but many functions, sometimes hundreds, are built in. Text manipulation, searching, sorting, formatting, time-stamping, multi-file editing, multi-window editing, enhanced cut and paste, powerful text substitution capabilities, and built-in file transfer capabilities are generally available. Some text editors offer intelligent editing modes - such an editor knows the difference between an HTML file, a Fortran file, a zip file, a regular text file and dozens of other types. It offers you special assistance for handling these special types of files - Fortran code, which must be formatted in a rigid fashion, will be spaced properly, for instance. You can't accidentally make a mistake, but you can override the behavior, if you have some reason to. It can proofread your HTML page to see if it is well-formed. It can be used to browse directories, send commands to the operating system, and receive output from it, which can then be saved as a text file. Programming is what you need when all of these conveniences don't do what you want, but often what you want to do is built into the editor.

My current text editor, which you can download for free, is called XEmacs. You can find it at www.xemacs.org. XEmacs belongs to the family of "Emacs" text editors. This family has a long pedigree; my Commodore Amiga, a computer from the mid-1980's, came with an Emacs editor. The other prominent version of Emacs currently extant is called GNU Emacs. XEmacs was actually derived from GNU Emacs. The differences between Emacs versions seem to be mostly philosophical at the moment. If you want to visit the GNU Emacs page, it's at www.gnu.org/software/emacs .

One issue: installation will be a bit more involved than you might be used to. It will want to install all sorts of feature sets that you probably won't need, like editing Ada or TeX files. If you have plenty of space, just take them all (about 26 megabytes). If you don't, stick to the basics. By the way, if you install the recommended cygwin package, which provides Unix features for Windows users, it requires 742 megabytes, so be warned.

Learning XEmacs is an adventure, too. The online help is vast, but it can be slow going at first. A few Emacs books are available - they can help, but at least one of them is just some of the online help printed out. No need to buy that one, unless you can't stand online help (which is why it exists).

Ed. note Here's a paragraph taken from the next month's Brain Candy on an alternate Emacs.

I have an addendum to last month's article on Emacsen (the official plural of Emacs). I forgot to mention that there is actually a "lite" version of Emacs for Windows systems called NotGNU that you can find at www.notgnu.org. I used it for a while in the period when the bigger Emacs systems didn't work so well in Windowsland. I would miss features if I went back to it, but if you're just starting out, it's a gentler path to a better text editor. It's free, too.

More Brain Candy | Back to Brain Candy Central | Return to the CATBAR Main Page.

CATBAR - Brain Candy #54 - A Powerful Freebie / Brian Rock / Feb 4 2002