Info file: mew.info,    -*-Text-*-
produced by `texinfo-format-buffer'
from file `mew.texi'
using `texinfmt.el' version 2.42 of  7 Jul 2006.

INFO-DIR-SECTION Message User Agent
START-INFO-DIR-ENTRY
* Mew: (mew.info).           Messaging in the Emacs World.
END-INFO-DIR-ENTRY






File: mew.info, Node: target mark, Next: escape mark, Prev: refile mark, Up: Marks

Target `*'
==========

Please put the `*' mark onto messages that you want to review
later. `?' also put the `*' mark onto matched messages (for more
information, refer to *Note search::). Use `N' and `P' to walk around
messages marked with `*'.

Here is a summary for `*' commands.

`*'
     Put the `*' mark.
`N'
     Jump to the message marked with `*' below and display it.
`P'
     Jump to the message marked with `*' above and display it.
`ma'
     Put the `*' mark to all unmarked messages.
`mr'
     Put the `*' mark to all matching messages with specified regular
     expression.

The `*' mark is used to handle multiple messages. The following is a
list of commands which handle multiple messages.

`F'
     Prepare a draft to forward multiple messages marked with `*' in
     MIME format.
`J'
     A large message is occasionally fragmented into multiple messages
     whose Content-Type: is Message/Partial. Mew puts the `P' mark to
     these messages. Now a user marks these messages with `*' and
     executing this commands results in producing the original
     message.
`mI'
     Retrieve the rest of truncated(`T') messages marked with
     `*'.
`C-umI'
     Perform `mI'.
`M-b'
     De-capsulate messages embedded in the messages marked with `*'.
`M-\'
     Executing an external command specifying messages marked with `*'
     as arguments.
`M-t'
     Apply "uudecode" on messages marked with `*'.

For `M-t', messages marked with `*' are supposed to be in the right
order. If out of order, sorting with `S' would help.



File: mew.info, Node: escape mark, Next: unmark, Prev: target mark, Up: Marks

Escape `$'
==========

Suppose that you want to put the `*' marks to messages matched to a
pattern specified to the `/' command. If there are messages marked
with `*' already, these messages are merged to the results of
`/'. Thus, you would want to escape the current messages marked with
`*'.

For this sake, the escape mark `$' is provided. A typical usage is as
follows:

  1. Change the `*' marks to the `$' marks with `m$'.
  2. Put the `*' marks to messages, for instance, with `/' and process
     the messages marked with `*'.
  3. Cancel the `*' marks with `U*'.
  4. Get the old `*' marks back with `m*'.

Here is summary of the commands related to the `$' mark.

`m$'
     Change the `*' marks to the `$' marks.
`m*'
     Change the `$' marks to the `*' marks.



File: mew.info, Node: unmark, Next: mark change, Prev: escape mark, Up: Marks

Deleting marks
==============

Refiling and deleting is not processed unless you type `x'. So, if you
press `u' to unmark before you type `x', messages do not disappear
accidentally.

Here is a summary for unmark commands.

`u'
     Cancel the mark on this message.
`U'
     Cancel all marks according to what you input.

The method with the `$' mark, that is, preserve the `*' marks and
operate something then get them back, is friendly to users since it is
visible. But since messages are marked, they would not be the targets
of the operation.

To solve this problem, a method to recover `*' marks is provided.  The
command is bound to `M*'. This method would not be friendly to users
since the `*' marks to recover are invisible. But because the marks
are canceled, these message are surely the target of any operations.

`M*'
     Recover the `*' marks which are canceled by the last `U*'.




File: mew.info, Node: mark change, Next: off-line, Prev: unmark, Up: Marks

Overwriting marks
=================

Marks have levels of strength. You can override a mark by another
same-level mark weak mark. Also stronger marks can override weaker
marks.

The followings shows the marks in the strong order:

`o', `D', and `X'
     After marking a message newly, the next message is shown. After
     overriding another mark, the cursor stays on the message.
`*' and `$'
     After marking a message, the cursor stays on the message.
`U'
     After marking a message, the cursor stays on the message.

Refer to *Note summary-mode:: to know which direction the cursor moves
after putting a strong mark.

You can exchange marks as follows:

`m$'
     `*' -> `$' :: Preserve the `*' marks temporarily.
`m*'
     `$' -> `*' :: Get the `*' marks back.
`ms'
     `$' <-> `*'
`mM-u'
     `*' -> `U' :: It is useful when you put `U' marks to messages
     picked by `?'.
`md'
     `*' -> `D' :: It is useful when you put `D' marks to messages
     picked by `?'.
`mM-d'
     `*' -> `X' :: It is useful when you put `X' marks to messages
     picked by `?'.
`mo'
     `*' -> `o' :: It is useful when you put `o' marks to messages to
     be moved picked by `?'.  `*' -> `o' :: It is useful when you put
     `o' marks to messages to be copied picked by `?'.
`e'
     Exchange the first input mark to the second one. The `o' mark is
     not exchangeable.



File: mew.info, Node: off-line, Next: mew-mark, Prev: mark change, Up: Marks

Processing marks off-line
*************************

An IMAP user may want to cache messages in folder A and go out. Then
he may want to put the `o' and/or `D' marks, and process the marks
off-line. In this story, these jobs should be done in his IMAP server
after connecting the Internet.

If a message in folder A is moved to folder B with IMAP, the cached
message in folder A usually must be deleted and a corresponding
message in folder B must be retrieved from his IMAP server again. This
is because information embedded in a cached message in folder A is
valid only in folder A.

Suppose you refile a message in folder A to folder B off-line. It is
very inconvenient for you to retrieve a corresponding message in
folder B from your IMAP server , in order to read it, after refile
jobs are done online. You may want to read the messages refiled to
folder B by just going to the folder B, without retrieval form the
IMAP server.

Mew implements delayed jobs processing and viewing refiled messages
without retrieval. If you want to process marks off-line, type `lx'.
`lx' carries out the following jobs.

  1. Deleting messages marked with `o' and/or `D' from folder A.
  2. Queuing these jobs in %queue.
  3. Moving messages marked with `o' to folder B and marking them
     invalid.

'invalid' means that you can read it but you cannot put the `o'/`D'
mark on it. Invalid messages are marked with `#'. When you go to
folder B by typing `g', a list of invalid messages is displayed
automatically.

If you want to let your IMAP server process jobs in %queue after you
get back online, type `C-cC-c' in %queue.

Typing `s' in folder B after jobs in %queue are done in your IMAP
server results in deletion of invalid messages and caching valid
messages.



File: mew.info, Node: mew-mark, Next: Refile, Prev: off-line, Up: Marks

Marks displayed by Mew
**********************

Here is a summary of marks displayed by Mew.

`M'
     This message is a multipart. Please refer to *Note multipart::.
`T'
     This message was truncated by Mew. Please refer to *Note
     retrieving::.
`S'
     This message is signed. Please refer to *Note cipher-viewing::.
`E'
     This is a cipher message. Please refer to *Note cipher-viewing::.
`P'
     This message is fragmented. Please refer to *Note target mark::.
`#'
     This message is invalid. Please refer to *Note off-line::.




File: mew.info, Node: Refile, Next: by-folder, Prev: mew-mark, Up: Top

Happy refiling
**************

When you come to receive hundreds of messages in a day (do not you
believe it?), refiling messages becomes a very tough job. Mew neatly
guesses default folders where the message is supposed to be refiled
when you type `o'. You can see an example below.

     Folder name (+work/mew-dist): +

If the default value in () is proper, just type `RET'. The messages
will be marked with `o' if its refiling folders are decided.

You can refile a message to folders of the same world to which the
message belong. As described above, a world is identified by a
combination of "case" and proto. When you input a folder to which the
message is refiled, you must not specify "case" and you must input a
folder whose proto is the same. The reason why you must not specify
"case" is that the "case" is already known. With other commands, you
have to specify the "case", if necessary, when you input folder name
in minibuffer. This command is only the exception.

Mew also provides `c' which is very similar to `o'. To know the
difference, please refer to *Note refile mark::.

As you know, the more excellent refiling guess algorithms become, the
less user's job troublesome. Mew provides you with the following
rules.

* Menu:

* by-folder::                   Guess by mailing-list folders
* by-alist::                    Guess by user defined rules
* by-thread::                   Guess by thread
* by-from-folder::              Guess by private folders
* by-from::                     Guess by From:
* by-newsgroups::               Guess by Newsgroups:
* by-default::                  Guess by default rule
* guess-rule::                  Controlling rules
* auto-refile::                 Auto refile
* copy-msg::                    Copying messages across worlds



File: mew.info, Node: by-folder, Next: by-alist, Prev: Refile, Up: Refile

Guess by mailing-list folders
=============================

Many users tend to refile messages destined to a mailing-list to a
folder whose name is the same as the mailing-list. Mew provides a
mechanism to guess a mailing-list folder for messages destined to
mailing-lists.

Suppose that you have a folder named +misc/pooh-lovers. The following
message is probably to be refiled to this folder.

     To: pooh-lovers@example.org

Likewise, Mew searches a matching folder forward with addresses on To:
and Cc:. There are many people who do not use recursive folders. With
Mew, however, you would not be smart if you do not use it.

Smart users may wonder that they get a trouble in the following
situation where private addresses are on To: or Cc:.

     To: piglet@example.org
     Cc: pooh-lovers@example.org

Since Pooh is a member of pooh-lovers, he receives this message. But
he has a folder for his friend, Piglet. So, +from/piglet may be
chosen.

To avoid this, Mew allows you to specify which folders are to be
ignored. The default is +from. So, please take a convention to refile
personal messages under +from.

When Mew guesses a candidate by the folders, it asks you:

     Folder name (+misc/pooh-lovers): +

Just type `RET' if the default is exactly what you want.

If you specify a new folder with `o', the folder is created and added
to the folder list to be used for guess. Convenient, isn't it?

The function name to provide this feature is
`mew-refile-guess-by-folder'.

If you don't use capital letters for folder names, configure as
follows to make this function faster:

     (setq mew-use-fast-refile t)

By default, candidate includes node folders as well as leaf folders.
If you want to not select node folders but leave folders only,
configure as follows:

     (setq mew-use-node-folder nil)



File: mew.info, Node: by-alist, Next: by-thread, Prev: by-folder, Up: Refile

Guess by user defined rules
===========================

There are some cases where the refile guess mechanism by folders does
not work as you wish. For example, for both a message whose To: is
staff@example.jp and another message whose To: is staff@example.net,
the same folder would be selected with guess by folders
(e.g. "+net/staff"). So, Mew allows you to define your own rules
explicitly. (You must use the new format for
`mew-refile-guess-alist'.  For more information, see

Let's look at an example.

     (setq mew-refile-guess-alist
       '(("To:"
           ("staff@example.jp"  "+jp/staff")
           ("staff@example.net" "+net/staff"))))

This means that if To: contains staff@example.jp +net/mew/staff is
selected and if To: has staff@example.net +net/staff is chosen.

The format of this rule is as follow:

     rule ::= '<rule>
     <rule> ::= ((<key> <alist>) (<key> <alist>) ... [<special>])

The whole is a list of (<key> <alist>). A field name is specified for
<key>. The format for <alist> is as follows:

     <alist> ::= (<value> <folder>|<rule>) (<value> <folder>|<rule>) ...

<value> is a field value for <key>. <folder> means a folder to be
chosen if matched. You can write <rule> recursively instead of
<folder>.
*Note config2::.)

There are two special <key>s: `nil' and `t'. `nil' is used to specify
<folder> to be returned when nothing is guessed. `t' can specify
<folder> to be returned in addition to guessed values.

     <special> ::= (t <folder>) | (nil <folder>)

If you know regular expression, a more advanced rule can be defined
like this.

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

The function name to provide this feature is
`mew-refile-guess-by-alist'.



File: mew.info, Node: by-thread, Next: by-from-folder, Prev: by-alist, Up: Refile

Guess by thread
===============

Mew provides a mechanism to guess a folder where the parent message of
a current message was refiled before.

For example, Pooh, Piglet, and Roo had a chat to go and get honey. So,
Pooh made +project/honey then refiled the message to it. The further
messages, if they are properly replied, they are supposed to be
refiled to +project/honey.

Information that which folder was chosen for messages is stored to
"~/Mail/.mew-refile-msgid-alist". `mew-lisp-max-length'
controls the amount of this information. The default value is 2000
messages. If you want limits it to 3000 messages, put the following to
"~/.mew.el".

     (setq mew-lisp-max-length 3000)

The function name to provide this feature is
`mew-refile-guess-by-message-id'.



File: mew.info, Node: by-from-folder, Next: by-from, Prev: by-thread, Up: Refile

Guess by private folders
========================

In addition to the mechanism to select a mailing-list folder described
in *Note by-folder::, Mew provides a mechanism to choose a private
folder. Since private folders locate under +from, we can say that this
mechanism select a folder from the folders under +from. Let's see the
following example:

     To: pooh@example.net
     From: piglet@example.org

Pooh received a message from Piglet. If Pooh uses this mechanism,
+from/piglet will be chosen according to From:. (Folders under +from
can be recurse. And you can select the entire address for a folder
name instead of the user part.)

The function to provide this feature is
`mew-refile-guess-by-from-folder'.

Next, let's consider a care where Pooh replied to Piglet. Since Pooh
Cc:ed the message to himself, the message was also delivered to him.

     To: piglet@example.org
     Cc: pooh@example.net
     From: pooh@example.net

How do you feel if you are Pooh? You may want to refile this to
+from/pooh. Also, you may want to move this to +from/piglet. So, it
can be customized.

If `mew-refile-guess-from-me-is-special' is `t' and if an address in
From: is yourself, `mew-refile-guess-by-from-folder' select a folder
under +from according to To: and/or Cc:.



File: mew.info, Node: by-from, Next: by-newsgroups, Prev: by-from-folder, Up: Refile

Guess by From:
==============

Mew also provides a mechanism to guess a folder by the place where a
message that has the same From: field is refiled.

Suppose that Piglet has two addresses, piglet@example.org and
p-p-p@example.org. Pooh wants to refile messages from Piglet to
+from/piglet no matter what his From: is. This policy can, of course,
be implemented if Pooh specifies rules explicitly as follows:

     (setq mew-refile-guess-alist
       '(("From:"
           ("piglet@example.org" "+from/piglet")
           ("p-p-p@example.org"  "+from/piglet"))))

But such a work may bother you. So, first refile a message whose From:
is piglet@example.org to +from/piglet. At this time, +from/piglet is
created. Next, refile a message whose From: is p-p-p@example.org to
+from/piglet. Here Mews learns that p-p-p@example.org was refiled to
+from/piglet. After this, when messages whose From: is
p-p-p@example.org are refiled, +from/piglet is chosen.

For another example, you can refile messages from machinery to
+adm/misc without defining an explicit rule.

Information for relationship between From: and folder is stored to
"~/Mail/.mew-refile-from-alist". `mew-lisp-max-length'
controls the amount of this information as the same as
*Note by-thread::.

The function name to provide this feature is
`mew-refile-guess-by-from'.

If the value of `mew-refile-guess-from-me-is-special' is `t',
`mew-refile-guess-by-from' acts as
`mew-refile-guess-by-from-folder' (*Note by-from-folder::).



File: mew.info, Node: by-newsgroups, Next: by-default, Prev: by-from, Up: Refile

Guess by Newsgroups:
====================

For those who read articles of NetNews received by e-mail with Mew,
Mew provides a mechanism to guess a folder by Newsgroups:. The
function name to provide this feature is
`mew-refile-guess-by-newsgroups'.



File: mew.info, Node: by-default, Next: guess-rule, Prev: by-newsgroups, Up: Refile

Guess by default rule
=====================

The default rule is to extract a user name from From: and to choose
`+from/user'. But if `mew-refile-guess-strip-domainpart' is
`nil', it extracts the entire address. So,
`+from/user@domain' is chosen. The default value of
`mew-refile-guess-strip-domainpart' is `t'.

The function name is `mew-refile-guess-by-default'.



File: mew.info, Node: guess-rule, Next: auto-refile, Prev: by-default, Up: Refile

Controlling rules
=================

Mew controls guess rules by two variables,
`mew-refile-guess-control' and `mew-refile-ctrl-multi'. If you
want multiple candidates, set `mew-refile-ctrl-multi'
`t'. Otherwise, set it `nil'.

By default, `mew-refile-guess-control' is declared as follows (since
it is a declaration, `defvar' is used):

     (defvar mew-refile-guess-control
       '(mew-refile-guess-by-alist
         mew-refile-ctrl-throw
         mew-refile-guess-by-newsgroups
         mew-refile-guess-by-folder
         mew-refile-ctrl-throw
         mew-refile-ctrl-auto-boundary
         mew-refile-guess-by-thread
         mew-refile-ctrl-throw
         mew-refile-guess-by-from-folder
         mew-refile-ctrl-throw
         mew-refile-guess-by-from
         mew-refile-ctrl-throw
         mew-refile-guess-by-default))

Mew executes every function defined in `mew-refile-guess-control' in
order. Each function may guess multiple candidates.

Let's see the following example of `mew-refile-guess-control' action.

`mew-refile-guess-by-alist'
         guessed +aaa and +bbb.
`mew-refile-guess-by-folder'
         guessed +ccc and +ddd.
`mew-refile-guess-by-default'
         guessed +eee.

If you want to provide all candidates, +aaa - +eee, set
`mew-refile-ctrl-multi' `t'. If you want to provide +aaa only, set it
`nil'.

If you want +aaa - +ddd but do not want left candidates, in other
words, you want +eee only when no candidate is guessed by functions
executed before, set `mew-refile-ctrl-multi' `t' and insert
`mew-refile-ctrl-throw' between `mew-refile-guess-by-folder' and
`mew-refile-guess-by-default'.

`C-uo' displays the flow of guess rules in Message buffer.



File: mew.info, Node: auto-refile, Next: copy-msg, Prev: guess-rule, Up: Refile

Auto refile
===========

Those who receives many messages everyday is prone to store thousands of
messages in the +inbox (or %inbox) folder. In such a case, they may want
to speak out like this, "Hey messages, get out of the folder to
somewhere". Mew provides a feature to satisfy such laziness. :)
`M-o' is the spell.

When you execute this function, it marks specific messages with
`o'. The specific messages mean messages which are not marked
with `o' nor `D' if
`mew-refile-auto-refile-skip-any-mark' is `nil'. If
`mew-refile-auto-refile-skip-any-mark' is `t', they mean
non-marked messages (i.e. read). The default value of
`mew-refile-auto-refile-skip-any-mark' is `nil'.

`C-uM-o' targets messages marked with `*' regardless the value of
`mew-refile-auto-refile-skip-any-mark'.

Refile rule is the same described in the previous section. Please note
that what this function does is just mark messages with
`o'. Messages are not refiled until you will press `x'.

Mew's refile mechanism is so smart that it would be harmful for this
function. That is, most users would not understand where messages have
been refiled if Mew made most use of its guess mechanism. :) For this
reason, break is provided to limit usage of guess functions. Recall
the declaration up above.

     (defvar mew-refile-guess-control
       '(mew-refile-guess-by-alist
         mew-refile-ctrl-throw
         mew-refile-guess-by-newsgroups
         mew-refile-guess-by-folder
         mew-refile-ctrl-throw
         mew-refile-ctrl-auto-boundary
         mew-refile-guess-by-thread
         mew-refile-ctrl-throw
         mew-refile-guess-by-from-folder
         mew-refile-ctrl-throw
         mew-refile-guess-by-from
         mew-refile-ctrl-throw
         mew-refile-guess-by-default))

You can find the `mew-refile-ctrl-auto-boundary' function in
`mew-refile-guess-control'. Only when auto refile is used, Mew
ignores guess functions below this function. If guess functions above
`mew-refile-ctrl-auto-boundary' didn't guess any folder for a
message, the message is not marked with `o'. Insert
`mew-refile-ctrl-auto-boundary' before you ruin.




File: mew.info, Node: copy-msg, Next: Virtual, Prev: auto-refile, Up: Refile

Copying messages across worlds
==============================

"Refile" described above is moving messages in the same world. By
contrast, you may want to move messages from a world to another
world. You can accomplish this by copying messages from a world to
another and deleting the original messages. Here we describe how to
copy messages to another world.

You may want to copy a message to a local folder. For this, type
`lc'. If you execute `lc' in a remote folder, Mew removes information
related to the remote folder from the cached message and copy it to a
local folder. (You can use `lc' in a local folder, too. In this case,
a message is moved in the same world.)

To opy a message in a folder to an IMAP folder (the server side), type
`li'.

To copy messages marked with `*' to a local folder, use `mlc'.  To
copy messages marked with `*' to an IMAP folder, use `mli'.

Here is a summary of commands which copy messages from a world to
another.

`lc'
     Copy a message to a local folder.
`mlc'
     Copy messages marked with `*' to a local folder.
`li'
     Copy a message to the server side of IMAP.
`mli'
     Copy messages marked with `*' to the server side of IMAP.




File: mew.info, Node: Virtual, Next: condition, Prev: copy-msg, Up: Top

Virtual folder
**************

Virtual mode is a virtual folder and it consists of "selection" and
"thread".

`Selection'
     A virtual folder collecting necessary messages from several
     folders.  Its folder name has "*" on the left side.
`Thread'
     A virtual folder to visualize message flow with indentation,
     created from a folder or a virtual folder. Its folder name has
     *" on the both sides.

In Virtual mode, you can use most commands that you can find in
Summary mode.

If you put a mark on a message in Virtual mode and if corresponding
Summary mode exists, the mark is also put onto the corresponding
message there.  But if you put a mark on a message in Summary mode,
the mark is not put any corresponding messages in Virtual mode.

You cannot process marks in Virtual mode. Even if you type `x' to
process marks in Virtual mode, the cursor moves to corresponding
Summary mode, if exsists, and you are asked to type `x' again.

You should take note that Virtual folder is really virtual and it does
not exist in file system. If you exit Mew, it then disappears.  To
know how to delete Virtual mode, please refer to *Note Quit::.

* Menu:

* selection::                   Selection
* sorting::                     Sorting
* dialog::                      Dialog
* search::                      Searching
* condition::                   How to input search conditions
* dbsearch::                    Search Engine
* keyword::                     Highlighting a keyword
* thread::                      Thread
* thread-op::                   Thread operations



File: mew.info, Node: selection, Next: sorting, Prev: Virtual, Up: Virtual

Selection
=========

Selection is a virtual folder collecting necessary messages from
several folders. There are five ways to create selection:

`m/'
     Listing messages marked with `*' on a folder. See *Note
     sorting::.
`S'
     Sorting messages on a folder and display them. (No effect to the
     original folder.) See *Note dialog::.
`V'
     Listing messages which have relationship with the current message. See
     *Note dialog::.
`/'
     Listing messaged matched to a search condition on a folder. See
     *Note search::.
`k/'
     Listing messaged matched to a search condition from all folders. See
     *Note search::.




File: mew.info, Node: sorting, Next: dialog, Prev: selection, Up: Virtual

Sorting
=======

To make selection by sorting messages, use `S'. Then you will be asked
to input the field name as follows:

     Sort by? (default date):

There are some cases where strings stored in the specified field
should not be compared as text. For example, while Subject: can be
considered as text, Date: and X-Mail-Count: should be treated as date
and number, respectively. In this way, we call the distinctions in
methods of string sorting "modes". Default modes for typical field
names are configured in `mew-sort-key-alist'.

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

     x-mail-count:num

You can complete field names and modes with `TAB'.

Mew provides four modes for sorting:

`text'
     String with preceding "Re: " and or "Fw: " removed.
`ml'
     The same as text but preceding mailing-list-string removed.
`num'
     Number.
`date'
     Date.

The default field name, your response to the prompt "Sort by?", can be
specified in `mew-sort-default-key'. The following example changes the
default value from "date" to "x-ml-count".

     (setq mew-sort-default-key "x-ml-count")

You can also set a default field name for each folder by
`mew-sort-default-key-alist'. For folders not explicitly specified
here, `mew-sort-default-key' is used for their default field name.
The following is an example that specifies "subject" for the +inbox
folder and "x-mail-count" for the +mew-dist folder.

     (setq mew-sort-default-key-alist
           '(("+inbox" "subject")
             ("+mew-dist" "x-mail-count")))

To really sort messages in a local folder, use `M-s'. This command is
not available in remote folders.



File: mew.info, Node: dialog, Next: search, Prev: sorting, Up: Virtual

Dialog
======

Mew can list messages which have relationship with the current
message. Let's call this "dialog". This is different from thread
described later in the following points:

   - Thread can be made from one folder or one virtual
     folder. Messages relating to dialog can ubiquitously exists in
     several folders.

   - Thread visualizes tree structres with indentation. while dialog
     lists up messages in order of time.

To use the feature of dialog, execute `kI' to create database. New
messages are not automatically registered in to the database, you
should periodically execute `kI'. `kI' updates the database
incrementally by default. This method is fast but garbages are
left. So, sometime you should type `C-ukI' to update the database
fully.

To make dialog, type `V' on the current message. This command displays
him, his ancestors, and his children only. His brothers and so on are
not shown. If you display the entire of the family, type `V' again on
the first message of the dialog, which is the origin of the family.



File: mew.info, Node: search, Next: condition, Prev: dialog, Up: Virtual

Searching
=========

Mew provides the following method to search messages:

`?'
     Put the `*' mark onto messages in this follder, which are matched
     to a specified pattern. Either `mewl' or `grep' is called
     according to the specified pattern.
`C-u?'
     `?' with a region specified.
`/'
     Make selection with messages in this follder, which are matched
     to a specified pattern. Either `mewl' or `grep' is called
     according to the specified pattern.
`C-u/'
     `/' with a region specified.

We can also search messages with a search engine, including Spotlight,
Windows Desktop Search, etc. This feature is supported by the
following commands.

`k?'
     Put the `*' mark onto messages in this follder, which are matched
     to a specified pattern.
`k/'
     Make selection with messages in all folders, which are matched to
     a specified pattern.
`C-uk/'
     Make selection with messages in specified folders, which are
     matched to a specified pattern. If you want to specify multiple
     folders, separate them with ",". You can also use a wildcar "*".



File: mew.info, Node: condition, Next: dbsearch, Prev: search, Up: Virtual

How to input search conditions
==============================

If you type `?' or `/', Mew asks you to input search pattern as
follows:

     mewl/grep pick pattern:

If you specify just a keyword, Mew executes `grep'.  On the contrast
if you type an expression, Mew calls `mewl'.

Here is a list of expression elements. (In the strong order)

`field=string'
     Match if the "field" field contains the "string" string
     (case-insensitive). If you specify "head", it means the entire
     header.
`field==string'
     Match if the "field" field contains the "string" string
     (case-sensitive). If you specify "head", it means the entire
     header.
`field!=string'
     Match if the "field" field does not the "string" string
     (case-insensitive). If you specify "head", it means the entire
     header.
`field!==string'
     Match if the "field" field does not the "string" string
     (case-sensitive). If you specify "head", it means the entire
     header.
`( <pattern> )'
     Evaluate <pattern> first.
`! <pattern>'
     Match if not <pattern>.
`<pattern1> & <pattern2>'
     Match if <pattern1> AND <pattern2>. You can omit this.
`<pattern1> | <pattern2>'
     Match if <pattern1> OR <pattern2>.

Some examples are shown below.

(a) Messages whose From: contains "kazu".

     from=kazu

(b) Messages whose To: contains "mew" OR Cc: contains "mew".

     to=mew | cc=mew irtual (c) Messages whose To: contains "mew" OR
Cc: contains "mew" AND From: contains "kazu".

     (to=mew | cc=mew) & from=kazu

When you execute `?' or `/' and if you just type `RET' to a pattern,
you can specify a command to be executed.

     Cmd opts pattern: grep -l -e

When you use an search engine with `k?' or `k/', the pattern
(including just a keyword and an expression) will be converted to the
syntax of the search engine.

For example, you can write an expression, that From: is "kazu" and
body contains "wine" but does not contain "bordeaux", as follows:

     from=kazu wine ! bordeaux

If you set `mew-pick-pattern-list' to a list of pattern, you can enjoy
circular completion with `C-cTAB'. In this case, the first member is
displayed as a default value.




File: mew.info, Node: dbsearch, Next: keyword, Prev: condition, Up: Virtual

Search Engine
=============

To operate search engines, the following commands are provided:

`km'
     Make index for the current folder.
`kM'
     Make index for all folders.
`kc'
     Switch one search engine to another.

The followings are expiation of each search engines.

`Hyper Estraier'
     Type `kM' periodically. It's OK to execute "mewest" on the
     command line instead. If you want to update the index for the
     current folder quickly, you can use `km'. Both `k?' and `k/' are
     available. When you specify folders with `C-uk/', sub-folders, if
     any, are included in the target.
`Spotlight'
     Type `kM' just once. `km' is not necessary. Both `k?'  and `k/'
     are available.
`Windows Desktop Search'
     Type `kM' just once. `km' is not necessary.
`Google Desktop'
     Type `kM' just once. `km' is not necessary. Only `k/' is
     available.

The default search engine is automatically set to the one found first.
If you explicitly specify it, set `mew-search-method' to one out of
'est, 'spotlight, 'wds, and 'google. The following is an example to
choose Hyper Estraier.

     (setq mew-search-method 'est)



File: mew.info, Node: keyword, Next: thread, Prev: dbsearch, Up: Virtual

Highlighting a keyword
======================

The keyword which you specified on search is shorted in a buffer. You
can display messages with the keyword highlighted. The commands to
enable this functionality are as follows:

`M-n'
     Display a message in the forward direction and find a keyword and
     highlight it. In Summary mode, the target is messages marked with
     `*'. In Virtual mode, it is all messages. If you repeat this
     command, text around the keyword is displayed from one to
     another. If no key word is set to the variable, this command
     first asks you a keyword.
`C-uM-n'
     The same as `M-n' except that you can change the stored keyword
     explicitly.
`M-p'
     A reverse version of `M-n'.
`C-uM-p'
     A reverse version of `C-uM-n'.



File: mew.info, Node: thread, Next: thread-op, Prev: keyword, Up: Virtual

Thread
======

When in the process of exchanging messages, the relationship of the
messages is presented in a tree structure. Visualization of the
structure with indentation is called thread. Here is an example:

       03/12 Hidenori Ohta  This weekend              |Let's go to StoneMagic
       03/13 Kazu-kun        +Re: This weekend        |Since it'll be rainy,
       03/15 Hidenori Ohta   | +Re: This weekend      |OK. Get together at 12
       03/14 Oda-chan        +Re: This weekend        |Sounds lovely. I'd lik

The thread feature is implemented as virtual folder. For instance, if
you make threads for +inbox, a buffer *+inbox* is prepared.

To make thread, the following commands exist.

`tt'
     Make threads from Summary mode or selection and move the cursor
     to the current message. If corresponding threads already exist,
     switch to the Virtual mode. When this command is executed on
     threads, switch to the original folder and move the cursor to the
     current message.
`C-utt'
     Make threads for messages in the region.
`mt'
     Make threads for messages marked with `*'.
`tr'
     Make threads for messages matched to a regular expression.



File: mew.info, Node: thread-op, Next: Quit, Prev: thread, Up: Virtual

Thread operations
=================

Here are the commands used for moving to thread presentation.

`tp'
     Move to the top of the current thread. If the current message is
     a top node, move to the top of the next thread.
`tn'
     Move to the top of the next thread.
`^'
     Move to the parent message of the current message. (Available in
     both Summary and Virtual)
`&'
     Move to the child message of the current message. (Available in
     both Summary and Virtual)
`('
     Search backward by one sibling message of the current message.
`)'
     Search forward by one sibling message of the current message.


Here are commands to mark messages in a thread.

`t*'
     Put the `*' mark all messages of the current sub-thread. Please
     refer to *Note target mark:: for more information.
`t$'
     Put the `$' mark all messages of the current sub-thread. Please
     refer to *Note escape mark:: for more information.
`td'
     Put the `D' mark all messages of the current sub-thread. Please
     refer to *Note delete mark:: for more information.
`tM-d'
     Put the `X' mark all messages of the current sub-thread. Please
     refer to *Note delete mark:: for more information.
`to'
     Put the `o' mark all messages of the current sub-thread. Please
     refer to *Note refile mark:: for more information.

A command to unmark all messages of the current sub-thread is `tu'.


Here are commands to manipulate a thread:

`tSPC'
     Hide children and leave the parent only. If its children are
     hidden, "+" is displayed on the parent. Also, if this command is
     executed on a message whose children are hidden, they appear.
`ta'
     Toggle appearance of children for all threads.
`tg'
     Graft a thread to a message. To specify which thread is grafted,
     type `C-SPC' on the root of the thread. Then move onto your
     target message, and typing `tg' grafts the thread to the target
     message as children.


If `mew-use-thread-separator' is `t', threads are
distinguished by a separator defined by `mew-thread-separator'
(its default value is "--").




File: mew.info, Node: Quit, Next: Customize, Prev: thread-op, Up: Top

Give me a break
***************

Here are how to quit and suspend Mew and how to erase a mode (buffer).

<Summary mode and Virtual mode>

`q'
     Suspend Mew then switch to another buffer. All buffers of Mew
     remain, so you can resume with buffer operations.
`Q'
     Quit Mew. All buffers of Mew are erased.
`C-cC-q'
     Erase the current mode (buffer).

<Draft mode and Header mode>

`C-cC-q'
     Erase the draft.

<Addrbook mode>

`C-cC-q'
     Erase the buffer.




File: mew.info, Node: Customize, Next: summary-mode, Prev: Quit, Up: Top

Customizing Mew
***************

Here are explained how to change default setting of Mew and make Mew
your favorite. Edit "~/.mew.el" to do it!

* Menu:

* summary-mode::                Summary mode
* message-mode::                Message mode
* draft-mode::                  Draft mode
* charset::                     Character set
* highlight::                   Highlighting
* hooks::                       Hooks
* pop::                         POP
* imap::                        IMAP
* nntp::                        NNTP
* smtp::                        SMTP
* config::                      Changing receiving/sending behavior
* config2::                     The format of configuration
* custom-misc::                 Miscellaneous



File: mew.info, Node: summary-mode, Next: message-mode, Prev: Customize, Up: Customize

Summary mode
============

You can specify the format of Summary mode by `mew-summary-form'.  The
default value is as follows:

     (setq mew-summary-form '(type (5 date) " " (14 from) " " t (30 subj) "|" (0 body)))

Like this, `mew-summary-form' is a list of list, symbol, and string.

  1. A string is printed as it is.
  2. A list consists of an integer and a symbol. The symbol specifies
     a function to be called. The name of the function is produced by
     concatenating "mew-summary-form-" and the symbol name.
     (e.g. `mew-summary-form-date' for the symbol 'date'). Pre-defined
     symbols are 'type, 'time, 'date, 'year, 'size, 'from, 'subj and
     'body. For more details, see the explanation of the functions
     called `mew-summary-form-<symbol>'. The integer specifies the
     width of field which will be filled with a return string of the
     function. A positive value means padding SPCs on the right if
     necessary. A negative value means padding SPCs on the left if
     necessary. If a negative value is specified, the corresponding
     function must return an ASCII string. 0 means the remaining width
     of the line and is treated as a positive value.
  3. A symbol is equivalent to (1 symbol).
  4. '(mark) is appended to `mew-summary-form' when used.
  5. `t' means the position of thread indentation.

An example is as follows:

     (setq mew-summary-form
           '(type (5 date) " " (-4 size) " " (14 from) " " t (30 subj) "|" (0 body)))

`mew-summary-form-from-me-prefix' is the prefix to be prepend to an
destination address if the message is originated by me. The default is
"To:".


`mew-summary-form-extract-rule' is a list to specify what part to
extract from the From: field. Each element must be 'name, 'comment,
'address, 'nickname, or appropriate "regex". The default value is
'(nickname).

Consider the following examples:

     A: Kazu Yamamoto <kazu@example.org>
     B: kazu@example.org (Kazu Yamamoto)
     C: Kazuhiko Yamamoto (Kazu) <kazu@example.org>

Each element returns the following value:

  1. 'name:: Name part, if any
          A. Kazu Yamamoto
          B. (No match)
          C. Kazuhiko Yamamoto (Kazu)
  2. 'comment:: Comment part, if any
          A: (No match)
          B: Kazu Yamamoto
          C: (Kazu)
  3. 'address:: Address part
          A: kazu@example.org
          B: kazu@example.org
          C: kazu@example.org
  4. 'nickname:: one element of personal information in Addrbook
     according to `mew-addrbook-for-summary'. The default value of
     `mew-addrbook-for-summary' is `'nickname'. So, From: is converted
     a nickname by default. To know what kind of value can be used,
     refer to *Note draft-mode::.
  5. (regex):: The substring first matched.

If a element does not match, the next element is applied. If no
element matches to the From: field, or this value is `nil', the whole
of the From: field is used.


If `mew-summary-form-mark-delete' is `t', the `D' mark
automatically is put onto duplicated messages. The default is
`nil'.


If `mew-summary-form-mark-spam' is `t', the `D' mark automatically is
put onto SPAM messages. A message is considered a SPAM message if the
MD5 checksum of its body is duplicated in a scan. The default is
`nil'.

If `mew-summary-form-mark-review' is `t', the `*' mark
automatically is put onto messages destined to me. The default is
`nil'.


If you want to use Mew with full Emacs frame, set like this.

     (setq mew-use-full-window t)


`SPC' in Summary mode decide the next action to view a message
according to `mew-summary-show-direction'. Likewise, you can specify
the cursor direction after putting a strong mark by
`mew-summary-mark-direction'. You can select one from the following
candidates.

`up'
     Display the message above.
`down'
     Display the message below.
`next'
     Display the next message in the direction.
`stop'
     Do not display the next message.

The default value for both is `next'. If you read messages from the
bottom, set as follows:

     (setq mew-summary-show-direction 'up)



File: mew.info, Node: message-mode, Next: draft-mode, Prev: summary-mode, Up: Customize

Message mode
============

It is impossible to display a file to the Message buffer if its data
type is not supported by Emacs. Install an external program which
converts the data to text and you can display the file to the Message
buffer.

If you install "w3m" and "emacs-w3m", Text/Html can be displayed in
Message mode. (Please note that multilingualized "w3m", not pure
"w3m", is necessary for "wvHtml", "xlhtml", and "ppthtml"
described below.)  When you install both of them, add the following to
"~/.mew.el'.

     (condition-case nil
         (require 'mew-w3m)
       (file-error nil))

With this, Text/Html can be displayed in Message mode as if it were
Text/Plain. Even in this situation, `C-cC-e' described below is a
valid operation.

If you install "wvHtml", "xlhtml", and "ppthtml", you can display text
parts of WORD, Excel, and PowerPoint file in Message,
respectively. Since these commands uses HTML, the configuration of
Text/Html above is required. Also, you need to install Mule-UCS for
Emacs 21.4 or earlier because UTF-8 (Unicode) is required. With this,
a WORD file, for example, can be displayed in Message mode as if it
were text.

You can display the file with an external application itself instead
of displaying it in the Message buffer. For this, type `C-cC-e'.

You can visualize an image file into the Message buffer. Also, you can
display it with an external application by typing `C-cC-e', of course.

You can display an HTML file to a browser with `C-cC-e'. A default
browser is used on Windows and Mac. On Unix, "mozilla" is set to a
default browser as follows:

     (defvar mew-prog-text/html-ext '("mozilla" ("-remote" "openFile(%s)") t))

If you want to set it to "firefox", for example, configure like this:

     (setq mew-prog-text/html-ext
           '("firefox" ("-a" "firefox" "-remote" "openFile(%s)") t))

You can visualize an Office-family file to each application by typing
`C-cC-e'. On Windows and Mac, an Office-family application is
executed. On Unix, "ooffice" is set to the default application as
follows:

     (defvar mew-prog-msword-ext "ooffice")
     (defvar mew-prog-msexcel-ext "ooffice")
     (defvar mew-prog-mspowerpoint-ext "ooffice")

If you want to set it to "soffice", for instace, do like this:

     (setq mew-prog-msword-ext "soffice")
     (setq mew-prog-msexcel-ext "soffice")
     (setq mew-prog-mspowerpoint-ext "soffice")

If you want to not visualize an Office-family file into the Message
buffer, but want to display it with "wvHtml", configure as follows:

     (setq mew-prog-msword  '(nil mew-mime-application/msword))
     (setq mew-prog-msexcel '(nil mew-mime-application/msexcel))
     (setq mew-prog-mspowerpoint '(nil mew-mime-application/mspowerpoint))

If you want to specify an application instead of the pre-defined
application, type `C-uC-cC-e'.

Recently there are many message whose have Multipart/Alternative,
which consists of Text/Plain and Text/Html. By default, Mew selects
Text/Plain. When you install "emacs-w3m", you may want to choose
Text/Html. In this case, add the following to "~/.mew.el". (Now, it's
good idea to get back to *Note multipart:: to review how to use
`:'.)

     (setq mew-mime-multipart-alternative-list
           '("Text/Html" "Text/Plain" ".*"))



File: mew.info, Node: draft-mode, Next: charset, Prev: message-mode, Up: Customize

Draft mode
==========

Define `mew-cc' to use Cc:. When replying, another Cc: field may be
prepared from the target message. If there are multiple Cc: fields,
they are combined to one field on sending.

If you want to receive your originating messages for backup without
specifying your address, use Dcc:. Set your address to `mew-dcc'.

Set header fields that you want to insert every time when you write
messages to `mew-header-alist' as an associate list. The following is
an example.

     (setq mew-header-alist
           '(("X-fingerprint:" "6B 63 38 88 67 5E 96 8E  CE A4 62 73 3F 11 64 94")
             ("X-URL:" "http://www.example.org/~kazu/")))

To customize citation label, define field to cite in `mew-cite-fields'
and format in `mew-cite-format'. Define citation prefix to
`mew-cite-prefix'. The default declaration is as follows:

     (defvar mew-cite-fields '("From:" "Subject:" "Date:"))
     (defvar mew-cite-format "From: %s\nSubject: %s\nDate: %s\n\n")
     (defvar mew-cite-prefix "> ")

To add Message-ID: to citation label, take this way.

     (setq mew-cite-fields '("From:" "Subject:" "Date:" "Message-ID:"))
     (setq mew-cite-format "From: %s\nSubject: %s\nDate: %s\nMessage-ID: %s\n\n")

To add a user part of an address to the citation prefix, configure as
follows:

     (setq mew-cite-prefix-function (function mew-cite-prefix-username))

With this, the citation prefix becomes like this:

     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 guy who's neat from good morning
     sumikawa> to good night.
     sumikawa>
     sumikawa> Talking about the wonderful wine party, I would propose
     sumikawa> Cabernet Sauvignon, Bordeaux, '90.

Both an address in the citation label and the citation prefix can be
converted to an element of a personal information in Addrbook. They
can be configured by `mew-addrbook-for-cite-label' and
`mew-addrbook-for-cite-prefix', respectively. The default values are
`nil' and `'username', respectively. You can set out of the following
values.


'shortname
     Short name
'address
     Address
'username
     User part of address
'nickname
     Nickname
'name
     Full name

Let's consider the following example.

     (setq mew-addrbook-for-cite-label 'nickname)
     (setq mew-addrbook-for-cite-prefix 'nickname)

With the first line, an address in the citation label is replaced with
its nickname. The second line indicates that the cite prefix is
replaced with its nickname.

     From: sumitch
     Subject: Wine
     Date: Wed, 23 Jul 1997 11:40:50 +0900

     sumitch> Hi, it's Sumikawa, the guy who's neat from good morning
     sumitch> to good night.
     sumitch>
     sumitch> Talking about the wonderful wine party, I would propose
     sumitch> Cabernet Sauvignon, Bordeaux, '90.



File: mew.info, Node: charset, Next: highlight, Prev: draft-mode, Up: Customize

Character set
=============

As described in *Note charset-guess::, Mew automatically chooses an
appropriate charset for the message when composing.

If characters of multiple languages exist, and if it is necessary to use
an international charset, `mew-charset-m17n' is used. Its default
value is "utf-8" (equivalent to Unicode). If you want to set it to
"iso-2022-jp-2", configure like this:

     (setq mew-charset-m17n "iso-2022-jp-2")

If you want to check a chosen charset when composing, configure
`mew-ask-charset'.

`nil'
     Not ask.
`A list of charset'
     Ask if the charset is not a member of the list.
`t'
     Ask if `mew-charset-m17n' is used.

For instance, if you want to check when charset other than US-ASCII,
ISO-8859-1, and ISO-8859-15, configure like this:

     (setq mew-ask-charset '("us-ascii" "iso-8859-1" "iso-8859-15"))


For example, when "utf-8" is chosen for a message with this
configuration, you are asked like this:

     utf-8 is used. OK? (y or n)

Typing `y' makes the composed message sent (or queued). If you type
`n', you will go back to the original draft.

In Europe Latin 9 (ISO-8859-15 or Latin 0), which includes the euro
sign, is getting more and more popular instead of Latin 1
(ISO-8859-1). If characters of both Latin 1 and Lain 9 exist in a
draft, Mew takes the following step to decide a charset.

  1. If `unify-8859-on-decoding-mode' is used:
       1. Use "iso-8859-1" if no loss.
       2. Otherwise, use "utf-8".
  2. If `unify-8859-on-decoding-mode' is not used:
       1. If both ISO-8859-1 and ISO-8859-15 can be used with no loss,
          `mew-charset-latin' is used.
       2. Use "iso-8859-1" if no loss.
       3. Use "iso-8859-15" if no loss.
       4. Otherwise, use "utf-8".

The default value of `mew-charset-latin' is "iso-8859-15". If you want
to set it to "iso-8859-1", configure like this:

     (setq mew-charset-latin "iso-8859-1")

If you want to always use UTF-8 for any characters other than
US-ASCII, configure as follows:

     (setq mew-cs-database-for-encoding
           `(((ascii) nil "7bit" "7bit")
             (nil utf-8 "base64" "B")))



