Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Complete Idiot's Guide to Linux
(Publisher: Macmillan Computer Publishing)
Author(s): Manuel Ricart
ISBN: 078971826x
Publication Date: 12/22/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


XEmacs

XEmacs is the variant of Emacs, the GNU super editor, included with Caldera OpenLinux. XEmacs provides additional enhancements when used under a graphical environment, such as X (KDE)—hence its “X” denomination. Under a terminal, it is almost exactly the same as regular Emacs. Any reference to Emacs applies in terms of usage to XEmacs.

Emacs is the most powerful of editors. It is available for UNIX, Windows, and a slew of other operating systems. It provides features too numerous to cover in 500 pages just dedicated to Emacs alone!

Emacs is an extensible editor. Using a programming language called Lisp, Emacs can be easily extended to do just about anything thinkable.

Many hardcore UNIX people use only one program: Emacs. They start it when they start their work session, and they close it when they exit their system. All their work, with very rare exceptions, is handled through Emacs, including access to the shell.


XEmacs on a console looks like this.

From Emacs you can read, write, and organize your email and calendar, manipulate and organize your files, browse the Web, read news, develop software, transfer FTP files across the network, and much more. No matter what you do under UNIX, it is likely that you can do it through Emacs. Of course, Emacs also edits files. If you get the sense that Emacs is really an environment, you are correct. That is what separates Emacs from other editors.


Here’s XEmacs through X—notice all the buttons and menus!

Emacs does everything through modes. A mode is just a specialized interface for interacting with a specific program or for working with a specific file format such as text or programming source code. Modes are tailored to the needs of a particular task. If it sounds complicated, it really isn’t. The modes are automatically handled by Emacs depending on what you are doing and the file you are editing.

Starting XEmacs and the XEmacs Tutorial

To enter Emacs (XEmacs), just type xemacs at the command prompt. Emacs will greet you with a welcome message and a list of options. Most keystrokes under Emacs work as follows:

     Ctrl+letter letter

When you see a command listed as C-t h, it means that first you must press Ctrl+t and then h by itself. Yes, Emacs has a lot of command keys, and it requires a little time to get used to it; however, that is time well spent.

To exit Emacs, type Ctrl+c Ctrl+x; this will return you to your shell. Teaching Emacs is beyond the scope of this book, but suffice it to say that it is worth exploring if you are going to do a lot of text editing.

One impressive feature of Emacs is that you can edit files through FTP as if they were local on your disk. For users working on Web-related services, this feature rocks. If your files can be reached through FTP, they can be edited and manipulated just as if they were local files. However, that is an advanced topic for another book.

If you are a programmer, Emacs does source formatting on the fly, so your source code is always formatted in a way that you can read. When reading other people’s code, the ability to reformat the code in a way readable to you is invaluable. Emacs also provides an IDE (Integrated Development Environment): You can build your program and debug it right from Emacs.

Emacs also has an online tutorial. To access the tutorial, start Emacs, and in the welcome window type C-h t.

Checking Your Spelling: Ispell

Spell-checking in Linux can be done from the command line with a program called Ispell. Ispell stands for interactive spell checking. Ispell enables you to write your document using your editor (which might integrate with ispell directly) and then check it from the shell, like this:

     ispell filenames

Ispell can check multiple files at the same time if you provide them. You can add words to your own private dictionary. If no misspellings are found, the program exits without any messages.

Ispell is very friendly and easy to use. The following figure shows a terminal running ispell.


Ispell, and interactive spell checker, is easy to use from the shell.

Ispell highlights the word in question and shows you the context in which it was found. If it finds possible corrections, it will display a list of them. To accept one of the proposed replacements, just type its number. Other actions are as listed at the bottom of the window or screen.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.