| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This chapter introduces some of the terms you'll need to know and then takes you on a tour of MH-E. (2) When you're done, you'll be able to send, read, and file mail, which is all that a lot of people ever do. But if you're the curious or adventurous type, you'll read 2. Using MH-E to be able to use all the features of MH-E. I suggest you read this chapter first to get the big picture, and then you can read the manual as you wish.
1.1 GNU Emacs Terms and Conventions 1.2 Getting Started 1.3 Sending Mail 1.4 Receiving Mail 1.5 Processing Mail 1.6 Leaving MH-E 1.7 More About MH-E
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If you're an experienced Emacs user, you can skip the following conventions and definition of terms and go directly to 1.2 Getting Started below.
In general, functions in this text refer to Emacs Lisp functions
that one would call from within Emacs Lisp programs (for example,
(mh-inc-folder)). On the other hand, commands are those
things that are run by the user, such as i or M-x
mh-inc-folder. Programs outside of Emacs are specifically called MH
commands, shell commands, or Unix commands.
The conventions for key names are as follows:
Since some keyboards don't have a META key, you can generate M-x, for example, by pressing ESC (Escape), releasing it, (3) and then pressing the x key.
A prefix argument allows you to pass an argument to any Emacs function. To pass an argument, type C-u before the Emacs command or keystroke. Numeric arguments can be passed as well. For example, to insert five f's, use C-u 5 f. There is a default of four when using C-u, and you can use multiple prefix arguments to provide arguments of powers of four. To continue our example, you could insert four f's with C-u f, 16 f's with C-u C-u f, 64 f's with C-u C-u C-u f, and so on. Numeric and valueless negative arguments can also be inserted with the META key. Examples include M-5 to specify an argument of 5, or M-- which specifies a negative argument with no particular value.
The prefix C-u or M- is not necessary in MH-E's MH-Folder mode (see section 1.4 Receiving Mail). In this mode, simply enter the numerical argument before entering the command.
Variables in MH-E that can normally be modified by the user are called options and are modified through the customize functions (such as M-x customize-option or M-x customize-group).
There are, however, a few variables that you may wish to change
which are modified via the setq function rather than through
the customize interface.
There are several other terms that are used in Emacs that you should know. The point is where the cursor currently is. You can save your current place in the file by setting a mark. This operation is useful in several ways. The mark can be later used when defining a region, which is the text between the point and mark. Many commands operate on regions, such as those for deleting text or filling paragraphs. A mark can be set with C-@ (or C-SPC).
The minibuffer is the bottom line of the Emacs window, where all
prompting and multiple-character input is directed. If you are
prompted for information in the minibuffer, such as a filename, Emacs
can help you complete your answer if you type SPC or TAB.
A second SPC or TAB will list all possibilities at that
point. The minibuffer is also where you enter Emacs function names
after typing M-x. For example, in the preface, I
mentioned that you could obtain help with C-h t
(help-with-tutorial). What this means is that you can get a
tutorial by typing either C-h t or M-x help-with-tutorial.
In the latter case, you are prompted for `help-with-tutorial' in
the minibuffer after typing M-x.
In case of trouble: Emacs can be interrupted at any time with C-g. For example, if you've started a command that requests that you enter something in the minibuffer, but then you change your mind, type C-g and you'll be back where you started. If you want to exit Emacs entirely, use C-x C-c.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Because there are many old versions of MH-E out there, it is important to know which version you have. I'll be talking about Version 6 which differs from Version 4 and Version 5 and is vastly different from Version 3.
First, enter M-x load-library RET MH-E RET. (5) The message, `Loading mh-e...done', should be displayed in the minibuffer. If you get `Cannot open load file: mh-e', then your Emacs is very badly configured, or MH-E is missing. You may wish to have your system administrator install a new Emacs or at least the latest MH-E files.
Having loaded MH-E successfully, enter M-x mh-version RET. The version of MH-E should be displayed. Hopefully it says that you're running Version 6.0 which is the latest version as of this printing. If instead Emacs beeps and says `[No match]', then you're running a old version of MH-E.
If these tests reveal a non-existent or old version of MH-E, please consider obtaining a new version. You can have your system administrator upgrade the system-wide version, or you can install your own personal version. It's really quite easy; instructions for getting and installing MH-E are in A.4 Getting MH-E.
Also, older versions of MH-E assumed that you had already set up your
MH environment. (6)
Newer versions set up a new MH environment for you by running
install-mh and notifying you of this fact with the message
in a temporary buffer:
I'm going to create the standard MH path for you. |
Therefore, if you've never run MH before and you're using an old
version of MH-E, you need to run install-mh from the shell
before you continue the tour. If you don't, you'll be greeted with the
error message: `Can't find MH profile'.
If, during the tour described in this chapter, you see a message like:
`Searching for program: no such file or directory,
/usr/local/bin/mhpath', it means that the MH programs and files are
kept in a nonstandard directory. In this case, manually set the
variable mh-progs (7) per its description in 2.1 Reading Your Mail in `~/.emacs' and restart emacs. For example:
(setq mh-progs "/usr/bin/mh/") |
Please report this as a bug and indicate the directory that contains your MH programs.
The `~' notation used by `~/.emacs' above represents your
home directory. This is used by the bash and csh shells.
If your shell does not support this feature, you could use the
environment variable `$HOME' (such as `$HOME/.emacs') or the
absolute path (as in `/home/wohler/.emacs') instead.
At this point, you should see something like the screen in the figure in 1.4 Receiving Mail. We're now ready to move on.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Let's start our tour by sending ourselves a message which we can later read and process. Enter M-x mh-smail to invoke the MH-E program to send messages. You will be prompted in the minibuffer by `To:'. Enter your login name. The next prompt is `cc:'. Hit RET to indicate that no carbon copies are to be sent. At the `Subject:' prompt, enter Test or anything else that comes to mind.
Once you've specified the recipients and subject, your message appears in an Emacs buffer whose mode (8) is MH-Letter. Enter some text in the body of the message, using normal Emacs commands. You should now have something like this: (9)
--:-- *scratch* (Lisp Interaction)--L1--All-------------------------
To: wohler
cc:
Subject: Test
--------
This is a test message to get the wheels churning...#
--:** {draft} (MH-Letter)--L5--All-----------------------------------
MH-E message composition window
|
Note the line of dashes that separates the header and the body of the message. It is essential that these dashes (or a blank line) are present or the body of your message will be considered to be part of the header.
There are several commands specific to MH-Letter mode, but at this time we'll only use C-c C-c to send your message. Type C-c C-c now. That's all there is to it!
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
To read the mail you've just sent yourself, enter M-x mh-rmail.
This incorporates the new mail and put the output from inc
(10) (called scan
lines after the MH program scan (11) which prints a one-line
summary of each message) into a buffer called `+inbox' whose
major mode is MH-Folder.
The M-x mh-rmail command will show you only new mail, not old mail. If you were to run this tour again, you would use F r to pull all your messages into MH-E.
You should see the scan line for your message, and perhaps others. Use n or p to move the cursor to your test message and type RET to read your message. You should see something like:
3 t08/24 root received fax files on Wed Aug 24 11:00:13 PDT 1
# 4+t08/24 To:wohler Test<<This is a test message to get the wheels
--:%% {+inbox} 4 msgs (1-4) (MH-Folder Show)--L4--Bot--------------
To: wohler
Subject: Test
Date: Wed, 24 Aug 1994 13:01:13 -0700
From: Bill Wohler <wohler@newt.com>
This is a test message to get the wheels churning...
--:-- {show-+inbox} 4 (MH-Show)--L1--All---------------------------
After incorporating new messages
|
If you typed a long message, you can view subsequent pages with SPC and previous pages with DEL.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The first thing we want to do is reply to the message that we sent ourselves. Ensure that the cursor is still on the same line as your test message and type r. You are prompted in the minibuffer with `Reply to whom:'. Here MH-E is asking whether you'd like to reply to the original sender only, to the sender and primary recipients, or to the sender and all recipients. If you simply hit RET, you'll reply only to the sender. Hit RET now.
You'll find yourself in an Emacs buffer similar to that when you were sending the original message, like this:
To: wohler
Subject: Re: Test
In-reply-to: Bill Wohler's message of Wed, 24 Aug 1994 13:01:13 -0700
<199408242001.NAA00505@newt.com>
--------
#
--:-- {draft} (MH-Letter)--L11--Bot---------------------------------
To: wohler
Subject: Test
Date: Wed, 24 Aug 1994 13:01:13 -0700
From: Bill Wohler <wohler@newt.com>
This is a test message to get the wheels churning...
--:-- {show-+inbox} 4 (MH-Show)--L1--All----------------------------
Composing a reply...done
Composition window during reply
|
By default, MH will not add you to the address list of your replies,
so if you find that the `To:' header field is missing, don't
worry. In this case, type C-c C-f C-t to create and go to the
`To:' field, where you can type your login name again. You can
move around with the arrow keys or with C-p
(previous-line), C-n (next-line), C-b
(backward-char), and C-f (forward-char) and can
delete the previous character with BS. When you're finished
editing your message, send it with C-c C-c as before.
You'll often want to save messages that were sent to you in an
organized fashion. This is done with folders. You can use
folders to keep messages from your friends, or messages related to a
particular topic. With your cursor in the MH-Folder buffer and
positioned on the message you sent to yourself, type o to output
(refile in MH parlance) that message to a folder. Enter
test at the `Destination:' prompt and type y (or
SPC) when MH-E asks to create the folder `+test'. Note that
a `^' (caret) appears next to the message number, which means
that the message has been marked for refiling but has not yet been
refiled. We'll talk about how the refile is actually carried out in a
moment.
Your previous reply is now waiting in the system mailbox. You incorporate this mail into your MH-Folder buffer named `+inbox' with the i command. Do this now. After the mail is incorporated, use n or p to move the cursor to the new message, and read it with RET. Let's delete this message by typing d. Note that a `D' appears next to the message number. This means that the message is marked for deletion but is not yet deleted. To perform the deletion (and the refile we did previously), use the x command.
If you want to send another message you can use m instead of M-x mh-smail. So go ahead, send some mail to your friends!
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You may now wish to exit emacs entirely. Use C-x C-c to
exit emacs. If you exited without running x in the
`+inbox' buffer, Emacs will offer to save it for you. Type
y or SPC to save `+inbox' changes, which means to
perform any refiles and deletes that you did there.
If you don't want to leave Emacs, you can type q to bury (hide) the MH-E folder or delete it entirely with C-x k. You can then later recall it with C-x b or M-x mh-rmail.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These are the basic commands to get you going, but there are plenty more. If you think that MH-E is for you, read 2. Using MH-E to find out how you can:
shar or uuencode.
(2.4.5 Files and Pipes.)
Remember that you can also use MH commands when you're not running MH-E (and when you are!).
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |