Mew Manual
**********

                                                         Kazu YAMAMOTO
                                                    Created 1996/02/18
                                                   Modified 1998/05/23

This Info documents Mew version 1.93.

Read me first
*************

Mew is an interface to integrate

   - Email
   - NetNews
   - MIME(Multipurpose Internet Mail Extensions)
   - PGP(Pretty Good Privacy)

and to make it easy to view and compose them. With Mew you can send a
picture of a birthday cake with the song "Happy Birthday to you" to
your friend, which is encrypted by strong cryptograph. NetNews is
supposed to be integrated in version 2.xx or later.

Mew is an acronym of "Messaging in the Emacs World". You should spell
it with the first letter capitalized and pronounce it as it
is(i.e. meow of cats). When the author started programming it, he
chose a cute word from his English dictionary. So, Mew.

The features of Mew version 1.xx are as follows:

   - You can easily display a very complicated structured
     message. What you should do to view messages is just type `SPC'.

   - If you know file operations such as copy, you can compose a very
     complicated message without any troubles.

   - You can start to read messages before the termination of listing
     of messages.

   - Since Mew preserves lists of messages in Summary mode, you can
     list up the gap between the last and current incrementally when
     you move into

   - Mew neatly guesses a default folder for refiling(Those who
     receives many messages can't live without this feature).

   - In Draft mode, you can complete field names, Email addresses,
     domain names, and folder names.

   - You can easily pick up messages which you want by specifying
     conditions such as Subject: and Date:.

   - Useful marks are provided. You can handle "encoded with uuencode
     then split" messages with one operation.

   - Mew automatically decodes a message encrypted with PGP. It also
     automatically verifies a signed message.

   - You can easily encrypt or sign a message with PGP.

   - It takes a time to analyze MIME syntax or to decode PGP. So, Mew
     caches the result for a while so that it can make faster to
     display it for the next time.

   - You can give a single view for multiple folders.

   - If you use Mew on XEmacs, you can enjoy icon-based interface
     which is equivalent to key-based interface.

Mew is officially supposed to run on Emacs 19.28 or later(including
Emacs 20.xx), Mule 2.3 or later, and XEmacs 20.3 or later(compiled
with the --with-mule option). Mew has not been tested on XEmacs 19,
however, Mew probably runs on it without or with small
modifications. Emacs other than described, such as Emacs 18, Nemacs,
Mule 1, and XEmacs 20.2 are not and will not be supported in the
future. Mew may support beta versions of Emacs but Mew conforms the
spec of official release when available.

Throughout this manual, "Emacs" means all supported platforms. "Mule"
indicates multi-lingual platforms such as Mule 2, Emacs 20, and XEmacs
20.3 complied with the --with-mule option while "Bilingual Emacs"
means English-and-Latin1 platforms including Emacs 19 and XEmacs 20.3
complied without the --with-mule option. "XEmacs" indicates graphical
platforms such as XEmacs 20.3 whereas text-only platforms are called
"Text Emacs".

Let's get started
*****************

Mew has the following four modes:

   - Summary mode :: A mode to list up messages and to select one.

   - Virtual mode :: A mode to list up messages selected with a
     specific condition from folders. It's similar to Summary mode.

   - Message mode :: A mode to display a content of text.

   - Draft mode :: A mode to prepare a message to be sent, answered,
     and forwarded.

To start Mew, you can choose one from the followings:

  1. `M-x mew' :: Execute Mew. If `mew-auto-get' is `t', messages
     stored in your spool are fetched to the +inbox folder and
     messages in the +inbox folder are listed up in Summary mode. If
     `mew-auto-get' is `nil', simply list up messages in the inbox
     folder.

  2. `C-uM-x mew' :: Perform `M-x mew' thinking that `mew-auto-get' is
     reversed.

  3. `M-x mew-send' :: Enter Draft mode for message composing.

When Mew is executed on Text Emacs, a shape of "/\\ - \\/", which
stands for Mew, spins. Two cute cats appear on the cover page on
XEmacs.

During this demo, Mew is collecting folders, aliases, etc. If you feel
that startup process is very slow, please read faster.

Viewing messages
****************

If you input `M-x mew', Mew moves messages from your spool to the
+inbox folder and displays as follows:

         1  07/17 Itojun         v6: items to be no in6_pcbnotify() doesn't
         2  07/18 Utashiro       Re: behavior after I'm afraid that mark-ring
         3  07/19 Nom-sun        refile info.       Sorry for my late respon

We call this Summary mode. This section mainly explains how to read
messages in Summary mode.

Reading Basis
=============

To read messages in arrival order, type `SPC' to display them. That's
it. It's easy, isn't it?

Yet this might not be comprehensive, so we list up basic commands for
page process as follows:

`SPC'
     Read through messages. That is, display a message, scroll it, and
     move-then-display another message. See
     `mew-summary-show-direction' to set `up', `down', `next'(current
     direction) or `stop'. Default is `down'.
`DEL'
     Back-scroll this message. Unnecessary header fields are hidden
     over the window. Type `DEL' to see them when a message is
     displayed.
`.'
     Force to display this message. If without MIME analysis, force to
     analyze this message.
`RET'
     Make this message scroll up with one line.
`M-RET'
`-'
     Make this message scroll down with one line.

`C-n'
     Go to the next line.
`C-p'
     Go to the previous line.
`n'
     Move to below then display. Targets includes parts, messages
     marked with `*', and non-marked messages. When called with `C-u',
     parts are skipped.
`p'
     Move to above then display. Targets includes parts, messages
     marked with `*', and non-marked messages. When called with `C-u',
     parts are skipped.
`j'
     Jump to a message according to the number which you input.

Displaying MIME
===============

It's not difficult to read a multipart message. As usual, just type
`SPC'.

A multipart message is marked with "M" on the left side of date as
follows:

         4  07/19 Shigeya-san    Re: imget very fir OK, how about this?
         5 M07/20 Toshi-chan     small patch to ims I modified imsetup.in a
         6  07/21 Motonori-san   Re: imget very fir Preserving messages on P

When you type `SPC' on "5", its header is displayed in Message mode
then its multipart structure is displayed in Summary mode as follows:

         4  07/19 Shigeya-san    Re: imget very fir OK, how about this?
         5 M07/20 Itojun         MagicPoint         I made the material of
     B    2  Image/Gif                    MagicPoint logo              mgp.gif
     Q    3  Application/Postscript       Presentation Material        ohp.ps
         6  07/21 Motonori-san   Re: imget very fir Preserving messages on P

If the first part is Text/Plain, the first part is not visualized in
Summary mode but the first part is displayed with its header in
Message mode.

Each line of multipart consists of
        marks, part number, data type, and description.
Marks, data type and description is a value of
Content-Transfer-Encoding:, Content-Type:, and Content-Description:,
respectively. Content-Description can be considered Subject: for each
part. This format is very similar to that of attachment region in Draft
mode. For more information of each column, please refer to
mime-comp.

If you type `SPC' or `n', the cursor moves onto part 1 and the content
is displayed according to its data type. For instance, Text/Plain is
showed in Message mode and PostScript is visualized with ghostview

Please note that `n' and `p' moves lines including multipart.  To
display the message below skipping multipart, type `C-u n'.  Likewise,
to display the message above (not this message), input `C-u p'.

Mew processes MIME recursively. The following example is a forwarded
multipart message.

       501 M02/22 Itojun         Fw: MagicPoint           Itojun send me this
          2  Message/Rfc822               MagicPoint
     B    2.2  Image/Gif                    MagicPoint logo            mgp.gif
     Q    2.3  Application/Postscript       Presentation Material      ohp.ps

(Memo) I strongly discourage you to embed an object other than text as
a top level single part to a message directly. Rather, I do recommend
to make multipart whose part 1 is description text for part 2 and part
2 is an object other than text.

Mew displays a message which directory contains a single part other
than text as a multipart.

Visualizing PGP/MIME
====================

Basic commands such as `SPC' visualize messages signed or encrypted
with PGP as well. Let's start with a simple example:

         8 S07/22 Sakai-san      Re: home was full  A bug of MsgStore.pm
         9 E07/23 Neat Sumikawa  Wine               From good morning to

Massage 8 and 9 is marked with "S" and "E", respectively. This means
that the *body* is signed and encrypted, respectively.

PGP/MIME also allows to sign and/or encrypt some parts of a
message. In this case, these marks don't appear. It is a message whose
*body* is singed or encrypted that the "S" mark or the "E" mark
appears on.

"Sign" and "encrypt" used above means the last procedure applied the
body is "sign" and "encrypted", respectively. Examples above may have
been produced with more complex process. As far as the firmer message,
for instance, the body may have been signed after encrypting the body.
It is likely that some part of the latter message was first signed
then the body was encrypted.

If some parts or the body is encrypted, Mew asks you to input your
pass-phrase to get plain text. The pass-phrase is used to decrypt your
secret key. The secret key is then used to decrypt cipher text. To
visualize PGP/MIME, you need to input your pass-phrase N times, where
N is the number of encrypted text in the message. This is because Mew
never ever caches pass-phrase anywhere for security reasons.

    ********************************************************************
DON'T INPUT YOUR PASS-PHRASE UNLESS EMACS IS RUNNING ON THE LOCAL
MACHINE. OTHERWISE YOUR PASS-PHRASE MAY BE WIRE-TAPED.
********************************************************************

Since decrypted messages are cached for a while, you perhaps need not
to input your pass-phrase at the next when the message will be
displayed.

To verify signatures, senders' public keys are used. So, you are never
asked to type your pass-phrase.

Since Mew automatically verifies signatures and/or decrypts cipher
text with inputed pass-phrase, it is likely that users don't notice
that the original message has signatures and/or which parts were
encrypted.

To tell users the results of verification of signatures or which parts
were decrypted, Mew inserts the X-Mew: field in the header as follows:

     X-Mew: <body> PGP decrypted.
             Good PGP sign "kazu@mew.org" COMPLETE

The number in "<>" indicates which part was protected with PGP. "body"
means the body was protected. This example tells us that the body was
singed by kazu then encrypted for the reader. Mew first decrypted it
then verified its signature of the decrypted message. The signature is
good. So, nobody has modified the content since it was signed by the
secret key whose ID is kazu@mew.org. The validity of the public key
used to verify the signature is "complete". Thus, the receiver
believes that the public key actually belongs to the user whom the ID
tells. That is, this message was verified by the trusted public key
AND its results was good, so no alternation was found.

In the following example, the signature of the body, which is
multipart, was first verified then part 2, which is a message, was
decrypted. That is, the composing process was that part 2 was first
encrypted then the entire body was signed.

     X-Mew: <body multi> Good PGP sign "kazu@mew.org" COMPLETE
     X-Mew: <2 message> PGP decrypted.

Smart users may wonder what if a bad guy or gal sends you a message
with an illegal X-Mew: field. Take it easy. First Mew carefully
removes the X-Mew: field then inserted a valid X-Mew: field to the
header.

X-Mew: tells you many other types of result. For example, no public
key is available, the decryption failed, etc. The following example
indicates that the public key whose key ID is 0x1B8BF431 is missing.

     X-Mew: <body multi> No his/her public key. ID = 0x1B8BF431

In this case, if you type `C-cC-f', Mew tries fetching this public key
using URL specified in `mew-pgp-keyserver-url-template'. If the X-Mew:
field does not exist, `C-cC-f' takes the From: field as ID.  Also,
`C-uC-cC-f' extracts key IDs from fields specified in
`mew-x-pgp-key-list' in addition to the X-Mew: field then tries
fetching them.

Updating and visiting folder
============================

To fetch arrived messages, store them to the +inbox folder and list up
them, use `i'. The list is appended to the bottom of Summary mode for
the +inbox folder.

To list up messages in Summary mode or flush it, use `s'. This command
asks you to input range. Important ranges for Mew are as follows:

`update'
     From "the last message in the Summary mode + 1" to "the last
     message in the corresponding folder". That is, the gap between
     the Summary mode and the existing folder
`all'
     All messages in the folder. When Summary mode becomes
     inconsistent, use this range to flush the list.

The default range is usually `update'. So, just type `RET' after `s'
to get the up-to-date list of the current folder(If you use "g" to go
to a folder, Mew automatically tries to get the up-to-date list).

You can specify the following ranges though they are not important for
Mew.

`<num1>-<num2>'
     From <num1> to <num2>
`<num>:N'
     N messages from <num>
`<num>:-N'
     N messages to <num>
`first:N'
     N messages from the first
`prev:N'
     N messages to the current
`next:N'
     N messages from the current
`last:N'
     N messages to the last

To move a folder to another, type `g'. You can make use of folder
name completion with `TAB'. If Mew guesses that the list is old, it
asks you to input range. The default of range is `all' for the
+draft and +trash folder and `update' for the others.

Write, answer, and forward
==========================

The following commands are prepared for writing, replying, and
forwarding a message.

`w'
     Write a message. A new draft is prepared in Draft mode.
`a'
     Answer to this message. A new draft is prepared in Draft
     mode. Mew automatically decides To: and Cc:.
`A'
     Answer to this message. A new draft is prepared in Draft
     mode. Mew automatically decides To: and Cc: and cites the body.
`f'
     Forward this message to a third person. A new draft is prepared
     in Draft mode and this message is automatically attached.
`F'
     Forward messages marked with `@' to a third person. A new draft
     is prepared in Draft mode and this message is automatically
     attached. For more information, refer to multi mark.

If an error message returns, let's give one more try with the
following commands.

`E'
     Edit this message again to send. Or edit this rfc822 part
     typically included MIME-encapsulated error message. In the +draft
     folder, it just edits the message. Otherwise, copy the message to
     the +draft folder, then edit.
`M-e'
     Edit an old fashioned error message in which the original message
     is encapsulated after "----- Original message follows -----".

Sorting messages
================

To sort messages in the current folder, use `S'. Then you will be
asked to input the field name as follows:

     Sort by? (default date):

When you want to specify the mode of sorting, the mode is followed by
`:'.  For example, to sort with X-Mail-Count field as arithmetic value
(not text), input like this:

     x-mail-count:num

The case distinctions of field names and modes are ignored. And you
can complete field names and modes with `TAB'.

This is the summary of the sorting commands:

`S'
     Sort messages in the current folder. To sort messages in region,
     invoke it with prefix as `C-u S'.
`mS'
     Sort `*' marked messages.

Useful features
===============

Mew provides you with convenient commands in Summary mode as follows:

`v'
     Toggle "Summary mode only" and "Summary & Message mode". If you
     choose "Summary mode only", you can quickly put the `D' mark
     since the next message is not displayed.
`M-a'
     Toggle "MIME analysis mode" and "non MIME analysis mode". In "non
     MIME analysis mode", the message is quickly displayed in Message
     mode because MIME analysis is skipped.
`M-l'
     Make the current line to the center of Summary mode.
`C-cC-s'
     Incremental search forward in Message mode.
`C-cC-r'
     Incremental search backward in Message mode.
`y'
     Copy this message or save this part as the file name which you
     input.
`#'
     Print this message or this part.
`|'
     Send this message or this part via pipe.
`O'
     Pack messages and list them up again.
`B'
     De-capsulate embedded messages in MIME format.
`Z'
     Update the list of aliases. If you type `C-u Z' the list of
     folders are also updated in addition to that of aliases. If
     `mew-use-folders-file-p' is `t', the list of folders is stored in
     "~/Mail/.folders".

Scrambled message
=================

The following message is considered as US-ASCII because of lack of
charset.  So the body is scrambled in Mule.

     To: kazu
     Subject: Scrambled message
     From: Alice
     MIME-Version: 1.0
     Content-Type: Text/Plain

     Japanese comes here.

Type `C-cC-l' to convert it into appropriate character set in Mule.

Composing messages
******************

This section shows you how to compose a message. With Mew, you can
create only MIME messages(messages without MIME-Version: cannot be
composed).

There are two methods to enter Draft mode to write a new message.

  1. Type `M-x mew-send'.
  2. Press `w' in Summary mode.

Then a buffer like the following is prepared.

     To:
     Subject:
     X-Mailer:  Mew version 1.93 on XEmacs 20.4
     Mime-Version: 1.0
     ----

We call this "Draft mode". A draft is temporary stored under the
+draft folder. You can write multiple messages at the same time.

Now let's see how to use Draft mode.

Completions in a header
=======================

In Draft mode, we call a region above "----" header. In header,
completions each field are assigned to `TAB' as follows:

   - Field completion
   - Address completion and expansion (To:, Cc:, etc)
   - Folder completion (Fcc:)

<Field completion>

If the cursor is on the beginning of a line and the previous line does
not end with ",", you can complete field defined in the `mew-fields'
variable with `TAB'.

     To: kazu@mew.org
     R`TAB'

At the point above, if you type `TAB', you get:

     To: kazu@mew.org
     Reply-To:

<Address completion and expansion>

You can define a short and easy-to-remember alias for a long or
hard-to-remember address with IM. For example, consider the following
alias:

     mine: m-sakura@ccs.mt.nec.co.jp

This means to replace the string "mine" with
"m-sakura@ccs.mt.nec.co.jp".

In a header in Draft mode and on the field supposed to write addresses
and one or more characters precede, you can complete an alias for
address with `TAB'.

Let's look at the following example.

     To: toshi,
             mi`TAB'

If you input `TAB' up above, "mine" is completed(unless other
candidates exist).

     To: toshi,
             mine`TAB'

One more type of `TAB' expands it to "m-sakura@ccs.mt.nec.co.jp".

     To: toshi,
             m-sakura@ccs.mt.nec.co.jp

If you type `TAB' at improper point for address completion, `TAB' is
inserted. Consider the following example:

     To: mine,`TAB'

In this case, `TAB' is just inserted.

A string ended with "@" is explicitly expanded. Consider the following
case where similar aliases are defined.

     mine: m-sakura@ccs.mt.nec.co.jp
     mineo: mineo@sfc.wide.ad.jp

To expand "mine" to "m-sakura@ccs.mt.nec.co.jp", take this way.

     To: mine@`TAB'

<Folder completion>

At a point, such as Fcc:, supposed to complete a folder, you can
complete a folder with `TAB'. Let's look at an example.

     Fcc: `TAB'

Here, "+" is completed.

     Fcc: +`TAB'

One more type of `TAB' shows candidates. Please input appropriate
characters then type `TAB'.

     Fcc: +B`TAB'

If a candidate can be solely decided, you get a completion.

     Fcc: +Backup

<Hints of customization>

You can define which field allows address and folder completion in
`mew-field-completion-switch'. The following declaration is used by
default.

     (defvar mew-field-completion-switch
       '(("To:"       . mew-complete-address)
         ("Cc:"       . mew-complete-address)
         ("Dcc:"      . mew-complete-address)
         ("Bcc:"      . mew-complete-address)
         ("Reply-To:" . mew-complete-address)
         ("Fcc:"      . mew-complete-folder)
         ("Config:"   . mew-complete-config))
       "*Completion function alist concerned with the key."
       )

Please refer to config to know completion for Config:.

Circular completions in a header
================================

In a header, circular completions are assigned to `C-cTAB'.  Circular
completion means that a value of alist is replaced by the next value
of the list. The end of the list is considered continuous to the top
of the list. Circular completions in a header are different for each
field as follows:

   - Circular completion of domain name (To:, Cc:, etc)
   - Circular completion of From: (From:)

<Circular completion of domain name>

On a field where addresses are written, use `C-cTAB' for domain
completion. Candidates are selected from `mew-mail-domain-list'.

     To: kazu@`C-cTAB'

If you try to complete just after "@" as up above, the first domain of
`mew-mail-domain-list' is inserted.

     To: kazu@mew.org`C-cTAB'

After completion, one more type of `C-cTAB' inserts the next domain of
`mew-mail-domain-list'. This completion is looped.

     To: kazu@wide.ad.jp

If a candidate can be solely decided, it is inserted.

     To: kazu@w`C-cTAB'

The example up above gets:

     To: kazu@wide.ad.jp

<Circular completion of From:>

On the From: field, `C-cTAB' circularly completes its value from
`mew-from-list'. The first value of the list (aka `mew-from') may have
already inserted as follow:

     From: Kazu Yamamoto <Kazu@Mew.org>

Typing `C-cTAB' anywhere on the value replaces the value with the next
value of `mew-from-list'. For example,

     From: Kazu Yamamoto <Kazu@Mew.org>`C-cTAB'

becames as follows:

     From: Kazuhiko Yamamoto <kazu@wide.ad.jp>

You can define association of field key and circular completion
function in `mew-field-circular-completion-switch'. The following
declaration is used by default.

     (defvar mew-field-circular-completion-switch
       '(("To:"       . mew-circular-complete-domain)
         ("Cc:"       . mew-circular-complete-domain)
         ("Dcc:"      . mew-circular-complete-domain)
         ("Bcc:"      . mew-circular-complete-domain)
         ("Reply-To:" . mew-circular-complete-domain)
         ("From:"     . mew-circular-complete-from)
         ("Config:"   . mew-circular-complete-config))
       "*Circular completion function alist concerned with the key."
       )

Please refer to config to know circular completion for
Config:.

Sending a message
=================

When you are ready to send a draft, type `C-cC-m C-cC-c'.

For instance, let's consider the following message to be sent.

     To: mine
     Subject: Let's use PGP/MIME
     X-Mailer:  Mew version 1.93 on XEmacs 20.4
     Mime-Version: 1.0
     ----
     Mew starts walking with security multipart. Enjoy PGP/MIME!

     --Kazu

After typing `C-cC-m', you see:

     To: mine
     Subject: Let's use PGP/MIME
     X-Mailer:  Mew version 1.93 on XEmacs 20.4
     Mime-Version: 1.0
     Content-Type: Text/Plain; charset=us-ascii
     Content-Transfer-Encoding: 7bit

     Mew starts walking with security multipart. Enjoy PGP/MIME!

     --Kazu

You should note that Mew automatically selects Text/Plain for
Content-Type: and guesses the charset parameter.

Type `C-cC-c' to send this text message. It is sent background. As you
learned, `C-cC-m' is to create a MIME message and `C-cC-c' is to send
it. Mew has a policy that a message should be transfered exactly as
you look in the last time. So, you are supposed to create MIME
explicitly(How many people have embarrassed experiences due to
automatic insertion of an extra .signature and Fcc:? :p).

When an error occurs, Mew displays "*Mew watch*" buffer. You can erase
"*Mew watch*" buffer with `C-cC-q'. In most case, the draft retains in
the +draft folder. So, go to the +draft folder from any Summary mode
with `g' and type `E' in Summary mode for the +draft folder to edit it
again.

If you try to exit Emacs with `C-xC-c' before the sending process is
not completed, you are asked as follows:

     Active processes exist; kill them and exit anyway? (yes or no)

Please wait until the "*Mew watch*" buffer will disappear and give a
try again.

You can omit `C-cC-m'. If you do so, Mew automatically creates MIME
and asks you as follows:

     Content-Type: was automatically added. Send this message? (y or n)

Please type `y' here. Remember Mew has a policy to send a message as
you watch. So, when Mew modifies the message it asks you such a
question.

You can omit `C-cC-m' in all composing method described below. But I
do recommend to have a custom to type `C-cC-m C-cC-c'.

To insert "~/.signature" on the cursor point, type `C-cTAB'. You can
define your own signature file to `mew-signature-file'. Setting
`mew-signature-as-lastpart' and `mew-signature-insert-last', you can
customize the action of `C-cTAB'.

If you want to see how address aliases are expanded, type `C-cC-w'.

Here is a summary for commands up above.

`C-cC-m'
     Make a MIME message. Charset guess, mapping directory structure
     to multipart, and so on.
`C-cC-c'
     Send this message.
`C-uC-cC-c'
     Send this message without killing the draft.  This is convenient
     to send messages to multiple people modifying its content a
     little.
`C-cTAB'
     Insert "~/.signature" on the cursor point.
`C-cC-w'
     Display expanded address aliases in other window.

Citation
========

If you use `a' or `A' in Summary mode, a draft for reply is prepared
and Emacs is split into three windows. The top is Summary mode, the
middle is Message mode, and the bottom is Draft mode.

Here are commands to cite text from Message mode to Draft mode.

`C-cC-y'
     Copy and paste a part of message from Message mode WITH citation
     prefix and label.
       1. Roughly speaking, it copies the body in Message mode. For
          example, if Text/Plain is displayed, the entire Message mode
          is copied. If Message/Rfc822 is displayed, the body without
          the header is copied.
       2. If called with `C-u', the header is also copied if exists.
       3. If an Emacs mark exists, the target is the region between
          the mark and the cursor.
`C-cC-t'
     Copy and paste a part of message from Message mode WITHOUT
     citation prefix and label.

The default label and prefix is as follows:

     From: SUMIKAWA Munechika <sumikawa@ebina.hitachi.co.jp>
     Subject: Wine
     Date: Wed, 23 Jul 1997 11:40:50 +0900

     > Hi, it's Sumikawa, the neat from good morning to good night.
     >
     > Talking the party of wonderful wine, I would propose Cabernet
     > Sauvignon, Bordeaux, '89. It would be great if Pinot Noir
     > is blended a bit.

In Draft mode, you can cite any text displayed in Message mode("*mew
message*" buffer). So, you can cite text from multiple messages
easily. Select a message in Summary mode and display it in Message
mode, then cite it in Draft mode. Please repeat this procedure as you
like.  Triple windows are prepared for this purpose.

You can use "supercite" with Mew but it reserves `C-cC-m'. Please
modify it by yourself. If you use definitions you find in
mew.dot.emacs, you can enjoy the following citation style. So,
supercite may not be necessary. For more information, please refer to
level-three.

     From: SUMIKAWA Munechika <sumikawa@ebina.hitachi.co.jp>
     Subject: Wine
     Date: Wed, 23 Jul 1997 11:40:50 +0900

     sumikawa> Hi, it's Sumikawa, the neat from good morning to good night.
     sumikawa>
     sumikawa> Talking the party of wonderful wine, I would propose Cabernet
     sumikawa> Sauvignon, Bordeaux, '89. It would be great if Pinot Noir
     sumikawa> is blended a bit.

If you get the following citation style instead of up above,
`mail-citation-hook' might be defined.

     In article .....

To use Mew original citation style, put the following into your
".emacs".

     (setq mail-citation-hook nil)

Composing multipart
===================

OK. Let's see how to create multipart.

When you are writing a message in +draft/1 and type `C-cC-a', the
following lines are inserted at the bottom of the draft.

     ----------------------------- attachments -----------------------------
           Multipart/Mixed                                         1/
          1  Text/Plain(guess)                                       CoverPage*
          2                                                          .
     --------0-1-2-3-4-5-6-7-8-9--------------------------------------------

"1/" is a temporary directory to create multipart and locates
"~/Mail/draft/mine/1". The part 1, "Coverpage", refers to the
body. Now the entire draft looks like:

     To: mew-dist
     Subject: This is header
     X-Mailer:  Mew version 1.93 on XEmacs 20.4
     Mime-Version: 1.0
     ----
     This is body.

     ----------------------------- attachments -----------------------------
           Multipart/Mixed                                         1/
          1  Text/Plain(guess)                                       CoverPage*
          2                                                          .
     --------0-1-2-3-4-5-6-7-8-9--------------------------------------------

Here we call three regions as follows:

   * the region above "----" `header'
   * the region from "----" to "attachments" `body'
   * the region below "attachments" `attachments'

In Draft mode, key bindings are different on each region(Sounds myth?
But truth).

To `TAB', for instance, functions are assigned as follows:

header
     Completions.
body
     Insert TAB.
attachments
     Do nothing.

To `c', functions are assigned as follows:

header
     Insert c.
body
     Insert c.
attachments
     Copy a file.

The following is a summary of commands in attachments.

`C-p'
     Go to the previous file in the current directory.
`C-n'
     Go to the next file in the current directory.
`C-f'
     Go to the first subdirectory.
`C-b'
     Go to the parent directory.
`c'
     Copy a file (via networks) on ".".  To copy a remote file, use
     the "/[user@]hostname:/filepath" syntax.
`l'
     Link a file with a symbolic link on ".".
`d'
     Delete this file or this directory.
`m'
     Create a subdirectory(i.e. multipart) on ".".
`f'
     Open this file into a buffer.
`F'
     Open a new file into a buffer on ".".
`e'
     Input external-body on ".".
`a'
     Sampling voice and insert as audio file on ".".
`p'
     Extract the PGP key for the inputed user on ".".
`D'
     Input a description(Content-Description:).
`T'
     Change the data type(Content-Type:).
`C'
     Specify charset for a Text/* object.
`P'
     Specify a file name(Content-Disposition:) to save this part in
     the receiver side. If you type just `RET' without any string, its
     value is cleared. Then the file name in the sender side is
     displayed with `*'.

In attachments, data types are guessed by suffix. The current
supported suffixes are as follows:

     .txt       Text/Plain
     .html      Text/Html
     .rtf       Text/Richtext
     .rfc822    Message/Rfc822
     [0-9]+     Message/Rfc822
     .ext       Message/External-body
     .ps        Application/PostScript
     .tar       Application/Octet-stream ;; dummy
     .gif       Image/Gif
     .jpg       Image/Jpeg
     .jpeg      Image/Jpeg
     .png       Image/Png
     .xwd       Image/X-xwd
     .xbm       Image/X-xbm
     .bmp       Image/X-bmp
     .au        Audio/Basic
     .mpg       Video/Mpeg
     .mpeg      Video/Mpeg
     .pgp       Application/Octet-Stream
     .pka       Application/Pgp-keys
     .*         Text/Plain

For instance, if you copy files with `c', the part becomes as
follows:(Please choose an appropriate suffix for the file name so that
Mew can guesses its data type.)

     ----------------------------- attachments -----------------------------
           Multipart/Mixed                                         1/
          1  Text/Plain(guess)                                       CoverPage*
     B    2  Image/Gif                    MagicPoint logo            mgp.gif
     Q    3  Application/Postscript       Presentation Material      ohp.ps
          4                                                          .
     --------0-1-2-3-4-5-6-7-8-9--------------------------------------------

Each line of multipart consists of
        marks, part number, data type, description, and file name.
Marks, data type, description, and file name is a value of
Content-Transfer-Encoding:, Content-Type:, Content-Description:,
Content-Disposition:, respectively.

Please refer to mark-b-comp to know how to change mark
(Content-Transfer-Encoding:).  You can change data
types(Content-Type:) by `T' at any time. You can also insert
descriptions(Content-Description:) by `D'. This description column is
overwritten when encrypted as described in mark-b-comp.

Strictly speaking, the fifth column is the copied file name or the
value of Content-Disposition:, namely the file name to which the
receiver saves the part. If Content-Disposition: exists, Mew displays
it. Otherwise, Mew displays the copied file name with `*' appended.
When you copy a file, the file name is specified as
Content-Disposition:. But this is not true for both Message/* and
Multipart/*. To specify Content-Disposition:, use `P'.

Files mean singlepart while directories are regarding with multipart.
So, you can create very complex multipart MIME as if you created file
system. Very easy, isn't it?

The default data type for directories is Multipart/Mixed. Of course,
you can change it by `T'.

After creating multipart, type `C-cC-m'. Amazing! The created file
system is transformed to multipart MIME. Of course, multipart of
multipart is supported. Just type `C-cC-c' to send it.

If you don't know MIME syntax, please don't modify after `C-cC-m'.  If
you really want to modify it, please note that the region before the
first boundary and the region after the last boundary are ignored.

After transforming multipart, if you want it back, use `C-cC-u'.  This
undo feature is very useful especially when you mistyped your
pass-phrase for PGP/MIME described below.

Let's consider Message/External-body by `e'. If access-type is "ftp"
or "anon-ftp", you can enjoy completion for a remote file name thanks
to ange-ftp. If access-type is "local-file", of course, file
completion is available.

If you want to quit creating multipart and to get back to singlepart,
type `d' in the top level multipart.

Charset guess
=============

Mew has charset guess mechanisms for both singlepart and multipart.

<Singlepart>

When you type `C-cC-m' on Draft mode, Mew guesses a charset from its
body. On Bilingual Emacs, US-ASCII is chosen for 7bit charset while
ISO-8859-1 is selected for 8bit charset. On Mule, a charset is chosen
based on its internal representation.

<Multipart>

When you attach textfile on attachments region, the string "(guess)"
is displayed as follows:

     ----------------------------- attachments -----------------------------
           Multipart/Mixed                                         1/
          1  Text/Plain(guess)                                       CoverPage*
          2  Text/Plain(guess)                                       textfile
          3                                                          .
     --------0-1-2-3-4-5-6-7-8-9--------------------------------------------

The difference of charset guess for singlepart and multipart is where
the data locates. Singlepart is stored in buffer while each file of
multipart is stored in disk. To guess a charset, Mew thus reads a file
into buffer and uses the charset guess algorithm of singlepart.

On Bilingual Emacs, Mew reads a file as it is. So, if the file is
7bit, US-ASCII is chosen. Otherwise ISO-8859-1 is selected.

On Mule, Mew reads a file according to the local convention(i.e. auto
conversion). The convention is really site dependent. In Japan,
ISO-2022-JP, EUC-Japan, and Shift JIS is neatly guessed and stored in
buffer as internal representation for Japanese. Mew decides a charset
from the internal representation. That is, you can safely attach
ISO-2022-JP, EUC-Japan, and Shift JIS text files. Furcations to decide
local convention are called set[up]-<language>-environment. For more
information about local convention, read their descriptions.

If you want to explicitly specify charset for a file, use `C' on
attachments. A typical example is to attach ISO-8859-1 file in
Japanese environment. The attachments region becames as follows:

     ----------------------------- attachments -----------------------------
           Multipart/Mixed                                         1/
          1  Text/Plain(guess)                                       CoverPage*
          2  Text/Plain(iso-8859-1)                                  textfile
          3                                                          .
     --------0-1-2-3-4-5-6-7-8-9--------------------------------------------

Note that `C' is not available on Bilingual Emacs.

Using PGP
=========

This section describes to sign or encrypt "text only" message with
PGP.  The following commands are explained.

`C-cC-s'
     Sign the single part draft with PGP. Input your passphrase.
`C-cC-e'
     Encrypt the single part draft with PGP.
`C-cC-b'
     Sign then encrypt the single part draft with PGP. Input your
     passphrase.

They are shortcut methods of mark based composing described below.

If you use PGP with Mew, you have to select Email address for your PGP
userid(e.g. "Kazuhiko Yamamoto <kazu@mew.org>").

Let's use the following example for further explanations.

     To: mine
     Subject: Let's PGP/MIME
     X-Mailer:  Mew version 1.93 on XEmacs 20.4
     Mime-Version: 1.0
     ----
     Mew starts walking with security multipart. Enjoy PGP/MIME!

     --Kazu

To sign with PGP, type `C-cC-s' then input your pass-phrase.

    ********************************************************************
DON'T INPUT YOUR PASS-PHRASE UNLESS EMACS IS RUNNING ON THE LOCAL
MACHINE. OTHERWISE YOUR PASS-PHRASE MAY BE WIRE-TAPED.
********************************************************************

Inputing pass-phrase results in the following.

     To: mine
     Subject: Let's PGP/MIME
     X-Mailer:  Mew version 1.93 on XEmacs 20.4
     Mime-Version: 1.0
     Content-Type: Multipart/Signed;
             protocol="application/pgp-signature";
             micalg="pgp-md5";
             boundary="--Security_Multipart(Sat_Nov_16_03:55:00_1996)--"
     Content-Transfer-Encoding: 7bit

     ----Security_Multipart(Sat_Nov_16_03:55:00_1996)--
     Content-Type: Text/Plain; charset=us-ascii
     Content-Transfer-Encoding: 7bit

     Mew starts walking with security multipart. Enjoy PGP/MIME!

     --Kazu

     ----Security_Multipart(Sat_Nov_16_03:55:00_1996)--
     Content-Type: Application/Pgp-Signature
     Content-Transfer-Encoding: 7bit

     -----BEGIN PGP MESSAGE-----
     Version: 2.6.3i

     iQCVAwUAMoy8ig9kihyeT3RNAQHt7AQAySDg4n8pOp/YuLaAp68Un/YDtWS0FnOC
     7EqHJd6fyViPBnZq8d+uGikA7kOBTz+8Kcv+hN6I7BrQVJGEzd0Y9yHHhXvZj++1
     0D09vgWL5G/Zfk/JMnLBt/BZ1ppOhJPT/L5qi2abk+mBVMKxQe071lfFEfvjF1C2
     8trTXm/bBz4=
     =TvAG
     -----END PGP MESSAGE-----

     ----Security_Multipart(Sat_Nov_16_03:55:00_1996)----

Type `C-cC-c' to send it.

To encrypt with PGP, type `C-cC-e'(your pass-phrase is not
necessary). You get the following message.

     To: mine
     Subject: Let's PGP/MIME
     X-Mailer:  Mew version 1.93 on XEmacs 20.4
     Mime-Version: 1.0
     Content-Type: Multipart/Encrypted;
             protocol="application/pgp-encrypted";
             boundary="--Security_Multipart(Sat_Nov_16_03:57:47_1996)--"
     Content-Transfer-Encoding: 7bit

     ----Security_Multipart(Sat_Nov_16_03:57:47_1996)--
     Content-Type: Application/Pgp-Encrypted
     Content-Transfer-Encoding: 7bit

     Version: 1

     ----Security_Multipart(Sat_Nov_16_03:57:47_1996)--
     Content-Type: Application/Octet-Stream
     Content-Transfer-Encoding: 7bit

     -----BEGIN PGP MESSAGE-----
     Version: 2.6.3i

     hIwDD2SKHJ5PdE0BA/9gUkcQYVfT+3LrUmcgLkNepuOnDfjADHrWiNo10t4ijyf8
     ODBpUBXoBdTg08eNLAWmRFhiJPmI+mxpF6cYFZXhr7gVpa0Qzp3Gr9nYvngRPKNK
     qUiQjA/ORR3c1TBawufB19jJ9RdU2f0BidhzOSbzsJh1LTgUZu/7Qyd02LxyEqYA
     AACbrV867PeoFyFc9MVfqTUR6Zw6kGBAlnVYjqQgBhuuyG79vbAbDJMhFiRpoRPf
     0MqEewxRonwKOik/PoKnLrwFg77Cb5pxRqMiWPyECJnqtX7r7Wg1c8kqPD0VRjI9
     GhHPiG/RmNbpbj/5g6zZri1YBCe8qxIS0QKa3YO7HRDcdBFARr22RaFGFtgdBQ6X
     cZB+qNeEaKXt3AneTWc=
     =djCr
     -----END PGP MESSAGE-----

     ----Security_Multipart(Sat_Nov_16_03:57:47_1996)----

Type `C-cC-c' to send it. This message is encrypted with your public
key in addition to the receivers. So you can decrypt backup
messages(e.g. Visiting to +Backup with `g').

To sign then encrypt with PGP, type `C-cC-b' then input your
pass-phrase. Type `C-cC-c' to send it. This message is encrypted with
your public key in addition to the receivers. So you can decrypt
backup messages(e.g. Visiting to +Backup with `g').

If you fail to input pass-phrase three times, Draft mode becomes a
mess.  But typing `C-cC-u' gets the original draft back.

Mark based composer
===================

To support PGP/MIME, mark based composing is provided. Remember the
previous example.

     ----------------------------- attachments -----------------------------
           Multipart/Mixed                                         1/
          1  Text/Plain(guess)                                       CoverPage*
     B    2  Image/Gif                    MagicPoint logo            mgp.gif
     Q    3  Application/Postscript       Presentation Material      ohp.ps
          4                                                          .
     --------0-1-2-3-4-5-6-7-8-9--------------------------------------------

You can find the `B' mark and the `Q' mark at the beginning of
line. Mew provides you with a new concept of "encoding". Encoding
includes Base64, Quoted-Printable, Gzip64(Gzip + Base64), sign with
PGP, encrypt with PGP.

Currently 6 marks are prepared.

`" "'
     No encoding. But 8bit text is encoded with Quoted-Printable.
`B'
     Base64
`Q'
     Quoted-Printable
`G'
     Gzip64(compressed with gzip then encoded with Base64. This is
     experimental. Don't use this if receivers don't use Mew.)
`PS'
     Sign with PGP
`PE'
     Encrypt with PGP

Additional key binding for marks in attachments is as follows:

`B'
     Put the `B' mark to encode with Base64.
`Q'
     Put the `Q' mark to encode with Quoted-Printable.
`G'
     Put the `G' mark to encode with Gzip64. This is applicable only
     to Text/Plain and Application/Postscript since compression is not
     effective other objects. For example, JPEG is already compressed.
`S'
     Put the `PS' mark to sign with PGP.
`E'
     Put the `PE' mark to encrypt with PGP. Input decryptors'
     addresses.
`U'
     Unmark. The original mark appears.

Consider the following example. The second part will be signed with
PGP then encrypted with PGP for "kazu". Take it easy! It's description
is overwritten but saved. The third part will be encoded with Gzip64.

     ----------------------------- attachments -----------------------------
           Multipart/Mixed                                         1/
          1  Text/Plain(guess)                                       CoverPage*
     PSPE 2  Image/Gif                    kazu@mew.org               mgp.gif
     G    3  Application/Postscript       Presentation Material      ohp.ps
          4                                                          .
     --------0-1-2-3-4-5-6-7-8-9--------------------------------------------

After putting marks, type `C-cC-m' to create PGP/MIME and then press
`C-cC-c' to send it.

PGP key distribution
====================

To distribute a PGP public key, please use `p' on attachments in Draft
mode. It asks whose public key you want to distribute. Just type `RET'
if it is yours. If you want to distribute another person's, input his
Email address with completion. The PGP public key will distributed as
Content-Type: Application/Pgp-keys.

If Mew finds that the part is Application/Pgp-keys, it tries to add
the PGP public key onto your PGP public keyring. Remember that Mew is
careless about both TRUST and VALIDITY. It is YOU who set these
values. Please use "pgp -ke" and "pgp -ks" to change them. If you
don't know what TRUST and VALIDITY is, you should learn the web of
trust system provided by PGP BEFORE using PGP to protect your privacy.