EMACS IS the kitchen sink! | - by Murray Todd Williams |
The second article gave instructions for installing the basic components of GNU, as well as a powerful C/C++ compiler. It also gave a sneak-preview of the XFree86 for OS/2 project. (In a few words, XFree86 for OS/2 is a freeware version of X-windows client and server.)
This article will introduce EMACS for OS/2. This is no small feat! As you will soon see, EMACS is more like a small, encapsulated operating system than a text editor. It is impossible for me to show you everything EMACS can do, but I can at least point you in the right direction!
Even more spectacular, I learned today that the newest EMACS Version 19.31 for OS/2 has been completed, and it is enabled for X-windows. This represents the most powerful program ported to XFree86 for OS/2 to date! Now you can run EMACS as a PM program or an X-windows program.
EDLIN
in the DOS world: small, ubiquitous, but a royal pain to use. The second is EMACS.
Yes, EMACS is a text-editor. It's important to note that EMACS is not a WYSIWYG word processor. If you need a word processor, use DeScribe or Word Pro. If your need for a text editor is limited to occasionally editing a line in CONFIG.SYS
, then perhaps EMACS is not for you. (Next month I'll introduce a very nice "word processor" called TeX which can be integrated into EMACS.) If your needs fall in between, EMACS may be the answer.
Similarly, if I load a TeX (that text formatting application I mentioned earlier) document it will automatically enter TeX Mode and with a single keystroke all of my work gets color-coded. Another two keystrokes and I'm running the file through the TeX processor. Two more keystrokes and I'm launching a graphical viewing program to inspect the document. Another two keys start a print job. (If I install the GNU program Ispell, I can even run the document through a spell-checker.)
You're not impressed yet? What if you could check your e-mail with the same text editor? EMACS can even browse USENET news groups and run a text-based WWW browser!
Here's the trick: most of EMACS internal operations are done in LISP! If you haven't heard of LISP before, it was one of the first languages associated with Artificial Intelligence. LISP is guaranteed to twist your brain into Manicotti. I have infinite respect for anyone who can write a program in LISP. (I also tend to fear these people. Are they human?)
In terms of EMACS, this implementation has worked quite well. Almost all features are simply byte-compiled LISP programs, the source code for which is provided in the GNU distribution. If you wish to tweak, change or correct anything, just find the corresponding LISP file and have at it!
The beauty in this setup can also be seen in the portability of EMACS. If you go searching on the Web, you can find an HTML mode for writing HTML pages. This is effectively a "third-party" program written for EMACS. You won't find it in the OS/2 distribution, but with a small amount of effort (this usually involves stuffing a file in the \emacs\19.31\LISP
directory and adding a couple lines to the site-start.el file) you can get it installed and running.
I am the psychotherapist. Please, describe your problems. Each time you are finished talking, type RET twice. Doctor, I would like to introduce you to my readers. How does it feel to want? That's an odd question. It feels normal. Is it because of your life that you say it feels normal? Doctor, that's a pretty existential question. You mentioned that you would like to introduce? Oh yes. My audience. They are here to learn about the magic of EMACS. Emacs? Hah! I would appreciate it if you would continue. Well, did you know you are simply a utility written in LISP? Are you sure of that? Oh, I hope I didn't hurt your feelings. Is it because of your sex life that you say you hope you didn't hurt my feelings?Well, this is probably a good time to stop.
Finally, there is a built-in tutorial which is sufficient to get you going. When you start EMACS each time, it displays a couple of options, including a tutorial (Ctrl-h t).
.emacs
in your home directory (remember adding "SET HOME=CONFIG.SYS
when you set up GNU in last month's article?). Here is a simple example of a .emacs
file:
(global-set-key [f7] 'font-lock-mode) (global-set-key [f8] 'auto-fill-mode) (require 'tex-site)The first two lines set the function keys to the "font-lock-mode" (which color-codes your text) and "auto-fill-mode" (which activates word-wrap) commands. The third line tells EMACS to load the tex-site.el LISP file upon startup (this is basically loading a "third party" EMACS utility that I got from the web).
e30.readme
file for more specific instructions. Despite its power and complexity, EMACS is not difficult to install (compared with GNU C++ or EmTeX).
Follow the instructions carefully and when you run EMACS for the first time, type "Alt-h t" to run the tutorial. Take maybe two or three hours (you might want to take notes) and work through the tutorial. By the time you are finished, you should be comfortable enough to forge ahead on your own.
I wish I could give a more complete description of EMACS, but it is simply too big for me to do justice. This is one of the most amazing programs available as Freeware for OS/2. Until you get up to speed on your own, you'll have to take my word for it.
Here are a few web links which might prove helpful:
Until then...
Copyright © 1996 - Falcon Networking-
-
Our Sponsors: [J3 Comp. Tech.] [Mt. Baker] [Post Road Mailer] [ScheduPerformance]
This page is maintained by Falcon Networking. We welcome your suggestions.