old-www/LDP/LG/issue01to08/vm-emacs.html

142 lines
6.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML> <HEAD>
<TITLE>Two Useful Emacs Extensions</TITLE>
</HEAD>
<BODY BGCOLOR="#ffefd5" TEXT="#483d8b">
<CENTER><H1>VM and Html-Helper-Mode for Emacs</H1></CENTER>
<CENTER> by <B>Larry Ayers</B></CENTER><BR>
<CENTER><A HREF="mailto:
layers@vax2.rain.gen.mo.us">&lt;layers@vax2.rain.gen.mo.us&gt;</A></CENTER><BR>
<CENTER>Copyright (c) 1996</CENTER><BR>
<CENTER> <H5>Published in Issue 8 of the Linux Gazette</H5></CENTER>
<HR>
<CENTER><H3>Introduction</H3></CENTER>
Aside from the tremendous versatility and configurability of the editor
itself, a major reason for the enduring popularity of Emacs is the wide
variety of add-on lisp modules which are available.<P>
Lately I've been excited about two of these in particular:<P>
<UL>
<LI><A HREF="#vm">The VM Mail Interface, with the Win-VM Extension</A>
<LI><A HREF="#html">Html-Helper-Mode</A>
</UL>
<CENTER><IMG SRC="./gx/ayers/featherline.gif" ></CENTER><P>
<A NAME="vm"></A>
<CENTER><H3>The VM Mail System</H3></CENTER>
If you use Emacs at all for editing, it can be convenient to use it as an
e-mail client as well, thus retaining familiar keystrokes and Emacs' powerful
editing capabilities. I have found the Emacs mail composing facility to be
efficient as well as easy to configure and use. (I'm using Gnu Emacs 19.31.)
Emacs seems to work well with either sendmail or smail.<P>
The built-in mail-reader, Rmail, I found less useful. Rmail uses a proprietary
format which is not readable by other mail-programs; when you read mail with
Rmail, you have effectively decided to use nothing but Rmail.<P>
<A HREF="mailto:kyle@uunet.uu.net">Kyle E. Jones</A> wrote a replacement for
Rmail called VM (View Mail) which seems to have gathered quite a following,
judging by usenet postings regarding it. This lisp package makes Emacs a
full-featured mail-reader, with support for multiple folders and a useful
header-index window. When used in conjunction with
<A HREF="mailto:psmith@wellfleet.com">Paul D. Smith's</A> win-vm.el, your
mail-reading session will be opened in another frame and give mouse support in
the header window, as well as new menubar items for VM.<P>
Rather than configuring VM with lisp code in the ~/.emacs file, a separate
file called ~/.vm can be created, containing entries customizing any of the
plentiful VM variables.<P>
As an example, the following entries will cause VM to open with a header-index
view, with the cursor kept to the center of the display:<PRE>
(setq vm-startup-with-summary t)
(setq vm-follow-summary-at-cursor t)
(setq vm-auto-center-summary t)</PRE>
<P>
VM offers many other features, such as virtual folders, which I haven't
explored yet, but a new user can benefit from the basic default setup.<P>
I usually use Pine to quickly scan new mail and delete obvious junk, as well
as for typing a quick reply or two. Later when I've started emacs I'll load VM,
which moves new mail into its own Inbox file, then displays the first unread
message. (If configured as in the example above, the header index is shown
first.) <P>
It's really a quite useful and pleasant-to-use system; if you're an Emacs user
I recommend that you give it a try! Both packages can be obtained via ftp
from <A HREF="ftp://ftp.uu.net/networking/mail/vm">ftp.uu.net</A>, as well as
its mirror sites.<P>
<CENTER><IMG SRC="./gx/ayers/featherline.gif" ></CENTER><P>
<A NAME="html"></A>
<CENTER><H3>Nelson Minar's Html-Helper-Mode</H3></CENTER>
<A HREF=MAILTO:NELSON@SANTAFE.EDU>Nelson Minar</A> , at the Santa Fe Institute
in New Mexico, has over the past couple of years created a feature-rich and
easy-to-learn HTML-editing mode for Emacs.<P>
It's called html-helper-mode.el, and it was originally inspired by an early
HTML mode for Emacs written by Marc Andreessen of Netscape fame.<P>
Html-helper-mode started out as simply a set of key-bindings for basic HTML
tags, but as other Emacs users began to use the mode various useful add-ons
for it began to appear. These now include an excellent font-lock mode, a mode
for passing a file to a browser, and support for Netscape extensions.<P>
The current beta version of html-helper (which is very stable, and only called
a beta because the docs haven't been updated yet), is available from
<A HREF="http://www.santafe.edu/~nelson/tools/">Nelson's website</A>.
Get this version if you can, because this one adds an HTML menu to the
menu-bar. This is very helpful for learning the keybindings; as with many
emacs add-ons, the key-bindings are rather long and not completely intuitive.
The menu serves as a quick reference and a way to use the more obscure tags
which don't really need to be memorized.<P>
The above web-site also has links to all of the extensions which others have
contributed, plus the documentation which can be browsed online.<P>
Html-helper also has a linux-questions-only@ssc.completion feature; typing <EM>esc-tab</EM> will
complete a partially typed tag. I had a little trouble surrounding selected
text with a tag, but eventually found that typing <EM>cntrl-u</EM> will cause
the subsequent linux-questions-only@ssc.command to do this properly.<P>
When a new *.html file is created a basic template is inserted in the file,
complete with an automatic timestamp at the end. Here is a screenshot showing
the default layout with font-lock enabled:<P>
<CENTER><A HREF="./gx/ayers/helper.gif">Html-Helper Sample</A></CENTER><P>
The mode is enabled by adding lisp code to your ~/.emacs file. As is true
with other emacs modes, the mode is only loaded into memory when a file with
the *.html extension is loaded or created. VM mode (discussed in the first
section) works the same way. This is a great advantage to the emacs user,
giving access to a variety of specialized editing modes without burdening your
system with multiple user interfaces.
<CENTER><IMG SRC="./gx/ayers/featherline.gif" ></CENTER><P>
<CENTER><ADDRESS><A HREF="mailto:layers@vax2.rain.gen.mo.us">Larry
Ayers&lt;http://vax2.rain.gen.mo.us/~layers/&gt;</A></ADDRESS></CENTER><P>
<CENTER><A HREF="./gazette_toc.html">Back up to Linux Gazette
T.O.C</A></CENTER>
<P>
<!-- HHMTS START -->
Last modified: Sun Jun 2 16:10:51 CDT 1996
<!-- HHMTS END -->
</BODY>
</HTML>