			   (How to use mew)

			  Kazuhiko Yamamoto
			    March 4, 1995
		       kazu@is.aist-nara.ac.jp

(1. Overview)

Mew has three modes.

Summary mode -- To display the result of inc & scan. You can select
		a message or part.
Message mode -- To display a message or part.
Draft mode   -- To write, reply, and forward a message.


(2. Read messages)

To read message, type
	M-x mew
.

Mew incorporates +inbox and sets to summary mode. Then what you should
do is only type SPC to read messages. Thant's easy, huh?

Key bindings in summary mode are:


SPC	Read through messages. 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 message are displayed.
.	Display this message or part. 
	If without MIME analysis, force to analyze this message.

RET	1 line scroll up this message.
ESC RET 1 line scroll down this message.

C-n	Go to the next line.
C-p	Go to the previous line.
n	Display below message or part.
p	Display above message or part.
N	Jump to below * marked message or display below message
	around multipart. (See below)
P	Jump to above * marked message or display above message
	around multipart. (See below)
j	Jump to a message according to inputed number.

i	Incorporate +inbox asynchronously.
s	Scan this folder asynchronously. 
g	Go to inputed folder.

w	Prepare draft to send a message. (See below)
a	Reply this message or this part. (See below)
A	Reply this message and insert it in draft buffer.
f	Forward this message as MIME format.
F	Forward @ marked messages as MIME format. (See below)
E	Edit this message again to send. In a draft folder, it just edit
	the message. Otherwise, copy the message to draft folder, then
	edit.
r	Re-distribute this message with Resent-To: and Resent-Cc:.

v	Toggle summary window only and summary & message windows.
ESC a	Toggle with/out MIME analysis.
ESC l	Recenter this folder.

o	Mark o(refile) this message or this part's message. If already
	marked as o, it prints which folder this message is refiled.
	(See below)
!	Refile this message or part to the previous refile folder. 
	(See below)
d	Mark D(delete) on this message. (See below)
*	Mark * on this message. Use N or P to jump to * marked message.
	(See below)
@	Mark @ on this message for F, ESC s, and ESC t. (See below)
u	Cancel mark on this message. (See below)
U	Cancel all inputed mark. (See below)
x	Process marked messages. To cancel * mark, use u or U. (See below)

C-cC-s	Incremental search forward on the message buffer.
C-cC-r	Incremental search backward on the message buffer.

ESC s	Apply unshar on @ marked messages. (See below)
ESC t	Apply uudecode on @ marked messages. (See below)

/	Pick messages according to inputed condition, then scan.
	(See below)
?	Pick messages according to inputed condition, then mark *.
	(See below)

y	Copy this message or save this part as inputed file name.
#	Print this message or this part.
|	Pipe this message.

S	Sort messages in this folder.
O	Pack messages in this folder.

B	Burst messages encapsulated in MIME.

q	Switch to other buffer.
Q	Exit mew.
C-cC-q	Kill this buffer.

C-cC-l	Localize the transformed charset.
C-cd	Manual PGP decryption/vrfy.
C-ca	Add PGP public key in this message to pubring.pgp.
C-cC-d	Manual PEM decryption/vrfy.
C-cC-x	Display xface.

Range means as follows;
	<num1>-<num2>, <num>:+N, <num>:-N
	first:N, prev:N, next:N, last:N, updage

'update' means the range between the last message included summary
mode + 1 and the real last message on the folder.

Pick condition means as follews;
	<cond1> -and <cond2>, <cond1> -or <cond2>
	-from <pat>, -to <pat>, -search <pat> 
	-date <date>, -before <date>, -after <date>
	--xxx <pat>
	-lbrace or "(", -rbrace or ")"


<Multipart>

Suppose that summary mode displays as follows;

 577 M06/28 Hiroaki Kashima < Re: [Masaki Hirabaru: JC shakin] <<On Tue, 28 Jun
*578 M06/28 Kazuhiko Yamamoto The forth alpha release of mew version 0.44 <<---
 579  06/28 ietf-rsvp@CNRI.Re IETF MAILING 2b: IETF RSVP FORM: July 25-29, 1994

Press SPC on * line to get:

 577 M06/28 Hiroaki Kashima < Re: [Masaki Hirabaru: JC shakin] <<On Tue, 28 Jun
*578 M06/28 Kazuhiko Yamamoto The forth alpha release of mew version 0.44 <<---
        1       Text/plain	Cover Page
        2.1     Text/plain	Emacs Lisp code
 579  06/28 ietf-rsvp@CNRI.Re IETF MAILING 2b: IETF RSVP FORM: July 25-29, 1994

Multipart consists of 
	part number, content-type, and content-description
.

Next "SPC" or "n" moves cursor to part 1. Note that "n" and "p" are
operations for line including message and part.

Typing "N" around part moves cursor to below message and "P" around
part to above message. (In other case, they are operations for *
mark.)

Current Mew can handle recursive MIME. Following is a forwarded
multipart message.

  46 M12/06 Youki Kadobayashi voice mail for mew + AF <<----Next_Part(Tue_Dec__
	1	Text/plain	
	2	message/rfc822	
		2.1	Text/plain	
		2.2	text/plain	Patch for Mew
		2.3	audio/basic	


(3. Funny marks:)

You can set funny marks in summary mode.

Mark ("key")
    D  -- Delete("d"). If on a part, it operates its message.
	  Do you prefer mark "x" rather than "D"?
    o  -- Refile("o"). If on a part, it operates its message.
    @  -- Message that you pay attention to("@").
    *  -- Message that you get back to("*").

You can process messages marked o or D with "x".

To cancel a mark, press "u". "@" marks will disappear when press
"x"(no side effect is given). You can unmark * with "u".

"U" can remove every marks. For example, input * after press of "U" to
delete all * marks.

Commands that operates @ marked messages are:

F	Forward @ marked messages as MIME format.
ESC s	Apply unshar on @ marked messages.
ESC t	Apply uudecode on @ marked messages.
	uudecode [+ gunzip or compress [+ untar]]

Commands that operates * marked messages are:

N	Jump to below * marked message.
P	Jump to above * marked message.


(4. Happy picking)

Following two commands are prepared for happy picking.

/	Pick messages according to inputed condition, then scan.
?	Pick messages according to inputed condition, then mark *.
	(You'd better press "x" before "?")

Three examples are listed below.  Note that keywords began with - can
be completed with "TAB".

(a) -from kazu

(a.1)

Pattern (-from) : -RET
                   ***
Value for -from : kazuRET
                  *******

(a.2)

Pattern (-from) : -from kazuRET
                   *TAB********

(b) -to kazu -or -cc youki 

(b.1)

Pattern (-from) : -orRET
		   *TAB**

Pattern1 for -or (-from) : -to kazuRET
Pattern1 for -or (-from) : -to youkiRET

(b.2)

Pattern (-from) : -or kazu -and -cc youki


(c) -lbrace -to mew -or -cc mew -rbrace -and -from kazu

(c.1)

Pattern (-from) : -lbrace -to mew -or -cc mew -rbrace -and -from kazu

(c.2)

Pattern (-from) : ( -to mew -or -cc mew ) -and -from kazu

You should separates braces with a space.

(c.3)

Pattern (-from) : -and
Pattern1 for -and (-from) : ( -to mew -or -cc mew )
Pattern2 for -and (-from) : -RET
Value for -from : kazu

Now you can guess the way to input more complex pick condition.

Supported pick conditions are:
	<cond1> -and <cond2>, <cond1> -or <cond2>
	-from <pat>, -to <pat>, -search <pat> 
	-date <date>, -before <date>, -after <date>
	--xxx <pat>
	-lbrace or "(", -rbrace or ")"


(5. Excellent refile folder guess)

Mew has excellent refile guess algorithm. (Refile is "o".)

(a)
It's simple. Candidate folder can be decided with folders list.

For example,
	To: happy-networking@is.asit-nara.ac.jp 
matchs to
	~/Mail/work/happy-networking 
.

As far as you use Mew, it's thus nice idea to make folders
hierarchyly. MH command "folders" that makes folder list become more
than 10 times faster with a contained patch.

Clever reader may be afraid that we get trouble in following case.

	To: simozono
	Cc: happy-networking@is.asit-nara.ac.jp

Because kazu is a member of happy-networking, he receives this
message. Since he is familiar with simozono, +simozono is chosen as
a candidate.

For this reason, you can set folders to ignore. By default, Mew
ignores under +from. So, you are encouraged to refile personal
messages under +from(e.g. +from/simozono).

When candidate is decided, Mew asks you:

	Refile folder (+work/happy-networking): +

If you like this folder, just type "RET". Otherwise, input another
folder name.

(b) You can write VM like rules.

(setq  mew-auto-folder-alist
  '(("Newsgroups:"
    ("^nifty\\.\\([^ ]+\\)" . "+Nifty/\\1")
    (".*"         . "+rec/news"))
   ("To:"
    ("\\(inet\\|wide\\)@wnoc-fuk" . "+wide/\\1-wnoc-fuk"))
   ("From:" 
    ("uucp@"      . "+adm/uucp")
    ("ftpsync@"   . "+adm/ftpsync"))))


(c) Mew also guess the refile folder according to where the parent's
message is refiled checking In-Reply-To: and Message-Id.

Example:
	Since Mr. A, B, C have a chat to go on a ski, Mr. A 
	created a folder +tmp/ski and refile messages to it.
	If exchanged messages are replied mail since then, 
	+tmp/skip is selected as a candidate.

Relation between Message-Id and folder is stored to
~/Mail/.mew-id-alist. If this file become much big, set cron to kick
'bin/mew-refile'.

(d)
In addition, Mew can guess the refile folder according to where the
message which have the save From: field is refiled.

Example:
	Mr. B send Mr. A the information of ski pensions. Since 
	it is not reply mail, it is not matched to (c). But you 
	hope that +tmp/ski is choosen. If the previous message 
	from Mr. B is refiled to +tmp/ski, Mew hopefully select 
	+tmp/ski.

If you wanna refile all messages from *machine* to +adm/misc, you can
skip to write rule of (b).

<<<<Important>>>>

Relation between From: and folder is stored to ~/Mail/.mew-from-alist. 
Syntax is changed since mew-refile.el 0.14. If Mew don't start up
well, please delete ~/Mail/.mew-from-alist once.

You can change the order of these functions setting
"mew-refile-folder-guess-functions".

Default is:

(defvar mew-refile-folder-guess-functions '(
        mew-guess-by-alist
        mew-guess-by-folder
        mew-guess-by-message-id
        mew-guess-by-from
        mew-guess-by-default))


(6. Send a message)

To send a message, type
	M-x mew-send
to enter draft mode.

You can also go to draft mode typing "w" in summary mode. If you edit
a message in +drafts again or try to re-transmit a failed mail, use "E".

<alias completion and expansion>

You can complete and expand alias on mini-buffer or header in draft
mode.

Consider following alias;
	mine: m-sakura@ccs.mt.nec.co.jp

To: toshi,
	mi*

Pressing "TAB" at * completes to mine. It is expanded to 
m-sakura@ccs.mt.nec.co.jp with one more "TAB".

Alias completion and expansion works only on right place of To:, Cc:,
and Fcc: line in mini-buffer or header in draft mode. TAB is inserted
in other place. That is,

To: mine,*

if you types "TAB" at *, just TAB is inserted.

String ended with "@" is expanded.

C-cTAB completes domain name. Candidates are choosen from
mew-mail-domain-list. If you type C-cTAB once more after the
completion, the candidate is replaced by the next candidate of
mew-mail-domain-list.


<Citation>

You can cite strings displayed in message mode. Mew splits Emacs into
3 windows so that you can cite from multiple messages.


<Writing a message>

You can write only MIME message with Mew. (Mew doesn't support RFC822
message.)

(6.1 To send a simple MIME message -- text/plain.)

Press C-cC-m C-cC-c.

For example, suppose that you are writing following message.

	To: mine
	Subject: Let's use PEM
	Mime-Version: 1.0
        ----
	Why don't you use PEM?

	--Kazu

Typing C-cC-m makes following message.

	To: mine
	Subject: Let's use PEM
	Mime-Version: 1.0
	Content-Type: text/plain; charset=us-ascii
        ----
	Why don't you use PEM?

	--Kazu

Please pay attention that Mew have chosen text/plain as Content-Type:
and guessed charset.

Type C-cC-c here to send this message. Mew send a message in
background. If error occurs, *mew watch* buffer is shown. (Error mail
is stored in ~/deadletter. You can delete the remained *mew watch*
buffer due to the error by C-cC-q.)

If you type C-xC-c to exit Emacs while Mew are still sending a message,
you are asked,
	"Active processes exist; kill them and exit anyway? (yes or no)".
Please exit Emacs after *mew watch* buffer disappears.

<Note>

You can skip to press C-cC-m. In this case, Mew asks you after making
the message up above, 
	"Content-Type: was automatically added. Send this mail? (y or n)".
Type "y" if you want to send this message. Mew' motto is to send a
message AS IT IS. If Mew modified a message, it ask you such a question.

You can skip to press C-cC-m in any case. But I recommend you to make
it a rule to type C-cC-m before C-cC-c. Have you ever had a bad
experience that extra .signiture or unexpected Fcc: fields is
added? :p

<Note>

I don't implement a funtion that inserts .signiture. I want to
consider this issue when Mew integrates USENET news. On the day of
electric signiture, who cares .signiture file? (Never send a commnet
to me about .signiture.)

<Note>

The command to insert signature file is C-cTAB. You can set your own
signature file to mew-signature-file. Mew will support to handle
multiple signature files.


(6.2 To make a multipart message)

Now I explain how to make a multipart message.

When you are writing a mail on +drafts/1, typing 
	
	C-c M

inserts

	---- multipart --
	    0   1/               Multipart/Mixed
	    1     00CoverPage      text/plain
	---- multipart  ----

on the bottom of the draft. "drafts/mime/1/" is a temporary directory
to build MIME multipart message.  00CoverPage indicates *the* body in
draft itself.  That is, you can see following message in draft mode.

	To: mew-dist
	Cc:  
	Subject: *This is header*
	Fcc: Backup
	Reply-To: kazu@is.aist-nara.ac.jp
	Mime-Version: 1.0
	----

	*This is body*

	---- multipart --
	    0   1/               Multipart/Mixed
	    1     00CoverPage      text/plain
	---- multipart  ----


Let's define three terms.

	header :  region above "----"
	body   :  region between "----" and "---- multipart --"
	parts  :  region under "---- multipart --"

In draft mode, key assignment is different on each region.

For example, "TAB" acts:
	header : alias completion/expansion on To:, Cc:, and Fcc:
	body   : insert TAB
	parts  : none


Another example, c is assigned:
	header : insert c
	body   : insert c
	parts  : copy file


Key assignments on multipart region are:


c	Copy a file in +drafts/mime/<num>/.
d	Delete this file.	
l	Link inputed file from +drafts/mime/<num>/.
r	Rename this file.
m	Make sub-multipart.
f	Read this file into a buffer.
F	Read a new file into a buffer.
e	Input external-body.
a	Sampling voice and insert as audio file. (Just for SUN)
T	Change its Content-Type:.
D	Input its Content-Description:


Content-Type is decided from file's suffix. Following suffixes are
supported now.

	.rtf	Text/richtext
	.txt	Text/plain
	.rfc822	Message/rfc822
	[0-9]+	Message/rfc822
	.extb	Message/external-body
	.ps	Application/PostScript
	.tar	Application/octet-stream ;; dummy
	.gif	Image/gif
	.jpg	Image/jpeg
	.jpeg	Image/jpeg
	.xwd	Image/x-xwd
	.xbm	Image/x-xbm
	.bmp	Image/x-bmp
	.au	Audio/basic
	.mpg	Video/mpeg
	.mpeg	Video/mpeg
	.*	Text/plain

When you copied a file to +drafts/mime/1 with "c" or on command line, 
following strings are displayed.

	---- multipart --
	    0   1/               Multipart/Mixed
	    1     00CoverPage      text/plain
	    2     cat.gif          image/gif
	    3     mew.patch        text/plain
	---- multipart  ----

Note that you can choose any file name with appropriate suffix. 
Simbolic link is O.K. 

You can change content-type by "T". You are also able to insert
content-description by "D".


Directory corresponds to multipart and file indicates single part. 
Thus you can create multipart as you make file structure.

Here, type
	C-c C-m
. This command maps directiory structure to MIME multipart message. 
(Of cource, Mew can create any complex multipart.) Now you can sent
with C-cC-c.

If you don't know syntax of MIME, you'd better not modify the message
after C-cC-m. When you change a multipart nonetheless, keep in mind
that strings before the first boundary and after the last boundary are
ignored.


<<Note>>

To support mark based composing, composing procedure of RFC 1421 PEM
and PGP is changed. In short, C-cC-m became unnecessary.


(6.3 Usage of PGP) <<Please skip this section unless you use PGP.>>

If you use PGP with Mew, you should choose your e-mail address as
PGP yourid(e.g. "Kazuhiko Yamamoto <kazu@is.aist-nara.ac.jp>")

Consider following example.

	To: mine
	Cc: 
	Subject: Let's PGP
	Fcc: Backup
	Reply-To: kazu@is.aist-nara.ac.jp
	X-Mailer: Mew beta version 0.89 on Emacs 19.28.104, Mule 2.2
	Mime-Version: 1.0
	----
	PGP 2.6.i is now available.
	
	--Kazu


* Sign the draft(C-cs C-cC-c).

Type C-cs then input your pass phrase to get following message;

	To: mine
	Cc: 
	Subject: Let's PGP
	Fcc: Backup
	Reply-To: kazu@is.aist-nara.ac.jp
	X-Mailer: Mew beta version 0.89 on Emacs 19.28.104, Mule 2.2
	Mime-Version: 1.0
	Content-Type: application/pgp
	----
	-----BEGIN PGP SIGNED MESSAGE-----
	
	PGP 2.6.i is now available.
	
	- --Kazu
	
	-----BEGIN PGP SIGNATURE-----
	Version: 2.6.i
	
	iQCVAgUBL1hvuA9kihyeT3RNAQEaAgP/VYRgQa/zLQmq2J2OppIWu2YovdWEHz+w
	7pZ8iUNDFvr4LnBldIHVs8EgsPlDgnEcRXBVX8Cl3eafThuRds71s+0NHHA0FgGl
	6NRKu3GX8wzQ1hC/39JuUl5A4jgWuSOH2bRBzAzd/jSIWWXdpfwQODjc8jgIh13T
	nDILe1ervlU=
	=Ujkx
	-----END PGP SIGNATURE-----

Press C-cC-c to send this message.

* Encrypt the draft(C-ce C-cC-c).

Typing C-ce(without your pass phrase) makes following message;

	To: mine
	Cc: 
	Subject: Let's PGP
	Fcc: Backup
	Reply-To: kazu@is.aist-nara.ac.jp
	X-Mailer: Mew beta version 0.89 on Emacs 19.28.104, Mule 2.2
	Mime-Version: 1.0
	Content-Type: application/pgp
	----
	-----BEGIN PGP MESSAGE-----
	Version: 2.6.i
	
	hIwC4s+eOCzPc3UBA/9BwQ2iDtPecTFbwrZHO6Oug/e56zMZKGHVRglfrtcrkqPC
	+CRdA4TYBgz8lTL/ijOavUxL9g3UFTBH33mjlIS13uV5CvNZKc6+lSnnfii4a1zr
	cSH62zL60oMNohPEIdg3IW17Somedo6NG/X1cIoKqDV7ziB5jsGFNsCEBqJszoSM
	Ag9kihyeT3RNAQQAzueiNjZRBsYDk9bOBbpVXsR1J6ZdFGxWlnBfIwiJMIbC9EeZ
	xISlKhaOx8X5dMEmK4PncymdoitRvgdUwDPQgQvt8Tp3ZgOGoi6AYE7aJMGpIptw
	zBZz7xVHUdyGvtJbr3aM+dL9zyl9FGqSuGAMFw8AYFPHlInUIXXVjsG/gnqmAAAA
	RDYFexsVnFsCfekSyXw5nr708hySGBR5UIC7U1aCx1qNkbxtd6hwoRnKM4oePl3L
	z/p1LxXrcGTgma1STrnsx1JhBpK+
	=EOyu
	-----END PGP MESSAGE-----

Press C-cC-c to send this message. Note that this message is encrypted
with your public key as well as with receivers' public key. So, you
can easily decrypt the backuped message(e.g. "g" to +Backup).

* Sign then encrypt the draft(C-cb C-cC-c).

Type C-cb then input your pass phrase to get following draft;

	To: mine
	Cc: 
	Subject: Let's PGP
	Fcc: Backup
	Reply-To: kazu@is.aist-nara.ac.jp
	X-Mailer: Mew beta version 0.89 on Emacs 19.28.104, Mule 2.2
	Mime-Version: 1.0
	Content-Type: application/pgp
	----
	-----BEGIN PGP MESSAGE-----
	Version: 2.6.i
	
	hIwC4s+eOCzPc3UBA/9j3NGnf6T5fXBhTU7xjswIENPXLzt2OH3O3nlXsv3H4npD
	5fCwQA7GzmnYPP0EXzuLK/csMacMUGZi3brClfzASelhUUIia8FkVApGXdEKVEWv
	xECyUEGJx9ZneZFA8EEG4TBU3j/WVxYVeiZ//EskjWXkLj+2verdTjq2Jb3QBISM
	Ag9kihyeT3RNAQP9GKlI2Qv1Vcv29gVD0U5NisQYgYkpBV8C64sKrckMp0juEekz
	84aTCGnqQ08wG2Ow1XNRE9vgGi1CxYkwi51we15vkrUmsyaV9G+38M4ROcWBbsJT
	z4qKl/Tp2qjsejLa8AVUEOknjxAWhTsKS7janCMOQmVPhGN+lI6soxWLrxmmAAAA
	3ZVwSLjaUOU8xVByjpHoLlEH5Id8LaX8QlFuIlTM+y8TTgEmSCbvqZF1io17HFx6
	msXDJDA+V1tvehRbi022HLGbfj9gChp7mQ+6aSxKr3fdfT7xjcPy/klGrRSPY7nf
	dHUyXwgEShEHqVyHh81KeIEzA+/F9RFV6iA4+MJ4EVRESfU2PW5GWk7daQz3kqRO
	YPCb4l+bG9lw7ZzCRdrK2LpcgYGM+FDQnhL9s/qj9NyLrjtvu3tF7tTZadO2g14c
	l831eBMiA0OGyhfe0NLI5nJl0VFSJqFyB79cLtT4
	=lPmx
	-----END PGP MESSAGE-----

Press C-cC-c to send this message. Note that this message is encrypted
with your public key as well as with receivers' pablic key. So, you
can easily decrypt the backuped message(e.g. "g" to +Backup).

* Distribute your public key(C-cb C-cC-c).

Type C-cb to insert your public key. Then type C-cC-c your public key.
The receivers can add your public key to pubring by just typing C-ca
in summary mode. Note that you should sign your public key once by
"pgp -ks yourid" before you distribute it to prevent that someone
modify it. Note also that Emacs 19.28 has a little bug in terminal
mode. If you type any key after adding public key, a error occurs
like;
	Signalling: (wrong-type-argument number-or-marker-p nil)
	  te-set-more-count(nil)
	  te-pass-through()
	* call-interactively(te-pass-through)
Please ignore it. RMS said to me that this bug will be fixed in the
future release.


(6.4 Usage of PEM) <<Please skip this section unless you use FJPEM.>>

* Sign the draft(C-cC-s C-cC-c).

Remember the example up above. Typing C-cC-s make a signed message as
follows;

	To: mine
	Subject: Let's use PEM
	Mime-Version: 1.0
	Content-Type: application/pem-1421
        ----	
	-----BEGIN PRIVACY-ENHANCED MESSAGE-----
	Proc-Type:4,MIC-CLEAR

				[deleted] ...

Press C-cC-c to send this message.


* Sign then encrypt the draft(C-cC-e C-cC-c).

PEM 1421 can't creat encrypt only message. So, type C-cC-e to creat
sign then encrypt the draft. Then press C-cC-c to send this message.


<<Note>>

Although Mew can link with super cite, it re-asign C-cC-m. Please
modify this key binding by your self. Super cite may be unnecessary if
you use the tip in mew.dot.emacs.


That's it.							Kazu@Japan
