\input texinfo @c -*-texinfo -*- coding: us-ascii -*-
@c %**start of header
@setfilename wl.info
@settitle Wanderlust -- Yet Another Message Interface On Emacsen --
@c %**end of header
@documentlanguage en
@include version.texi
@synindex pg cp
@finalout

@dircategory GNU Emacs Lisp
@direntry
* Wanderlust: (wl).         Yet Another Message Interface On Emacsen
@end direntry

@c permissions text appears in an Info file before the first node.
@ifinfo
This file documents Wanderlust, Yet another message interface on
Emacsen.

Copyright @copyright{} 1998, 1999, 2000, 2001, 2002 @w{Yuuichi Teranishi},
@w{Fujikazu Okunishi}, @w{Masahiro Murata}, @w{Kenichi Okada},
@w{Kaoru Takahashi}, @w{Bun Mizuhara} and @w{Masayuki Osada},
@w{Katsumi Yamaoka}, @w{Hiroya Murata} and @w{Yoichi Nakayama}.

This edition is for Wanderlust version @value{VERSION}.

Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

@ignore
Permission is granted to process this file through TeX and print the
results, provided the printed document carries copying permission notice
identical to this one except for the removal of this paragraph (this
paragraph not being relevant to the printed manual).

@end ignore
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions.

@end ifinfo

@titlepage
@sp 10
@title Wanderlust User's Manual
@subtitle Yet another message interface on Emacsen
@subtitle for Wanderlust version @value{VERSION}
@author Yuuichi Teranishi
@author Fujikazu Okunishi
@author Masahiro Murata
@author Kenichi Okada
@author Kaoru Takahashi
@author Bun Mizuhara
@author Masayuki Osada
@author Katsumi Yamaoka
@author Hiroya Murata
@author Yoichi Nakayama
@page

@vskip 0pt plus 1filll
Copyright @copyright{} 1998, 1999, 2000, 2001, 2002 @w{Yuuichi Teranishi},
@w{Fujikazu Okunishi}, @w{Masahiro Murata}, @w{Kenichi Okada},
@w{Kaoru Takahashi}, @w{Bun Mizuhara}, @w{Masayuki Osada},
@w{Katsumi Yamaoka}, @w{Hiroya Murata} and @w{Yoichi Nakayama}.

This manual is for Wanderlust version @value{VERSION}.

Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions.

@end titlepage


@ifinfo
@node Top, Introduction, (dir), (dir)
@top Wanderlust User's Manual

@flushright
Yuuichi Teranishi
Fujikazu Okunishi
Masahiro Murata
Kenichi Okada
Kaoru Takahashi
Bun Mizuhara
Masayuki Osada
Katsumi Yamaoka
Hiroya Murata
Yoichi Nakayama
@end flushright

This manual is for Wanderlust @value{VERSION}.

@end ifinfo

@menu
* Introduction::             Read this first
* Start Me Up::              Invoking Wanderlust
* Folders::                  How to specify folders
* Folder::                   Selecting and editing folders
* Summary::                  Reading and refiling messages
* Message::                  Saving and playing MIME multipart entities
* Draft::                    Draft buffer, sending mail and news
* Disconnected Operations::  Off-Line management
* Expire and Archive::       Automatic expiration and archiving of messages
* Scoring::                  Score of the messages
* Address Book::             Management of Address Book
* Quick Search::             Quickly search your mail archive
* Spam Filter::              Spam filtering
* Advanced Issues::          Advanced Issues
* Migration::                Switch from older version of Wanderlust
* Terminology::              Terminologies
* Mailing List::             Wanderlust mailing list
* Addition::                 Additional Information
* Index::                    Key index
@end menu


@node Introduction, Start Me Up, Top, Top
@chapter Introduction of Wanderlust
@cindex Introduction

Wanderlust is an mail/news management system on Emacsen.
It supports IMAP4rev1(RFC2060), NNTP, POP and local message files.

The main features of Wanderlust:

@itemize @minus
@item Pure elisp implementation.
@item Supports IMAP4rev1, NNTP, POP(POP3/APOP), MH and Maildir format.
@item Unified access method to messages based on Mew-like Folder Specification.
@item Mew-like Key-bind and mark handling.
@item Manages unread messages.
@item Interactive thread display.
@item Folder Mode shows the list of subscribed folders.
@item Message Cache, Disconnected Operation.
@item MH-like FCC. (Fcc: %Backup and Fcc: $Backup is allowed).
@item MIME compliant (by SEMI).
@item Transmission of news and mail are unified by Message transmitting draft.
@item Graphical list of folders.
@item View a part of message without retrieving the whole message (IMAP4).
@item Server-side message look up (IMAP4). Multi-byte characters are allowed.
@item Virtual Folders.
@item Supports compressed folder using common archiving utilities.
@item Old articles in folders are automatically removed/archived (Expiration).
@item Automatic re-file.
@item Template function makes it convenient to send fixed form messages.
@end itemize


@section Environment

It expected that Wanderlust works on Emacs 24.5 and later.
Furthermore, Wide int feature is required on 32-bit machines.

IMAP4 connectivity with following imapd are confirmed to work with
Wanderlust:

@itemize @bullet
@item UW imapd 4.1--4.7, 4.7a, 4.7b, 4.7c, 2000 or later
@item Cyrus imapd 1.4, 1.5.19, 1.6.22--1.6.24, 2.0.5 or later
@item Courier-IMAP 1.3.2 or later
@item AIR MAIL (AIRC imapd release 2.00)
@item Express Mail
@item Microsoft Exchange Server 5.5
@item Sun Internet Mail Server 3.5, 3.5.alpha, 4.0
@end itemize

LDAP connectivity with following LDAPd are confirmed to work with
Wanderlust:

@itemize @bullet
@item OpenLDAP 2.0.6 or later
@end itemize


@node Start Me Up, Folders, Introduction, Top
@chapter Start up Wanderlust
@cindex Start up

The necessary procedure for starting Wanderlust is explained in steps
here.

(Of course, you need a mail/news readable environment in advance)

@menu
* MIME Modules::      Installing the MIME modules
* Download::          Download and extract the packages
* Install::           Byte-compile and install
* Minimal Settings::  @file{.emacs} setup
* Folder Definition:: Folder definition
* Start Wanderlust::  Starting Wanderlust
* Overview::          Basic components of Wanderlust
@end menu


@node MIME Modules, Download, Start Me Up, Start Me Up
@section Installing MIME modules
@cindex MIME modules
@pindex APEL
@pindex FLIM
@pindex SEMI

You must install packages named APEL-LB, FLIM-LB and SEMI-EPG, which are
variants of APEL, FLIM and SEMI, beforehand to use Wanderlust.

@example
@group
APEL-LB:  @uref{https://github.com/wanderlust/apel}
FLIM-LB:  @uref{https://github.com/wanderlust/flim}
SEMI-EPG: @uref{https://github.com/wanderlust/semi}
@end group
@end example

You can download original APEL, FLIM and SEMI from following URLs:

@example
@group
APEL:   @uref{http://git.chise.org/elisp/dist/semi/}
FLIM:   @uref{http://git.chise.org/elisp/dist/apel/}
SEMI:   @uref{http://git.chise.org/elisp/dist/semi/}
@end group
@end example

You have to install APEL-LB, FLIM-LB and SEMI-EPG in this order.
Generally, @samp{make install} will do the job.

Refer to the documents of each package for detailed installation
procedure.

You have to re-install Wanderlust if you upgraded APEL-LB, FLIM-LB or
SEMI-EPG.


@node Download, Install, MIME Modules, Start Me Up
@section Download and Extract the Package
@cindex Download

You can download Wanderlust package from following sites:

Original site:
@example
@uref{https://github.com/wanderlust/wanderlust}
@end example

Mirrored ftp/http sites:

@example
@group
@uref{http://www.jpl.org/ftp/pub/github-snapshots/}
@end group
@end example

Extract the obtained package to your working directory:

@example
@group
% cd ~/work
% tar zxvf wl-@var{version}.tar.gz
% cd wl-@var{version}
@end group
@end example

@subsection To use SSL (Secure Socket Layer)
@cindex SSL
@pindex OpenSSL
@pindex starttls

SSL (Secure Socket Layer) can be used for
SMTP, IMAP, NNTP and POP connections in Wanderlust.
Emacs 24 and later uses built-in GnuTLS if available.

There are two ways to use SSL. One is to start SSL negotiation just
after the connection establishment (generic way). The other one is to
start SSL negotiation by invoking STARTTLS command in the each session.

If built-in GnuTLS is not available, Emacs try to use @file{tls.el} for
the formal SSL (generic SSL). In this case, GnuTLS's
@command{gnutls-cli} is needed. if neither avialable, @file{ssl.el} of
@file{utils} directory and OpenSSL's @command{openssl}.

For the latter SSL (STARTTLS), you need @file{starttls.el} if built-in
GnuTLS is not available. Moreover, GnuTLS or starttls package is needed
according to @code{starttls-use-gnutls} variable's value. If your Emacs
doesn't have @file{starttls.el} or @file{starttls.el} doesn't have the
defninition of @code{starttls-use-gnutls}, you need starttls package.

You can download starttls package from the following site.

@example
@uref{ftp://opaopa.org/pub/elisp/}
@end example

@node Install, Minimal Settings, Download, Start Me Up
@section Byte-compile and install
@cindex Byte-compile
@cindex Compile
@cindex Install
@cindex Makefile
@cindex Make

@subsection Installation

Edit @code{LISPDIR} and @code{EMACS} in @file{Makefile}.
Set the Emacs's command name to @code{EMACS}.
Set package installation directory to @code{LISPDIR}.
Then, please execute following commands.

@example
@group
% make
% make install
@end group
@end example

Destination directory is auto-probed if you leave @code{LISPDIR}
in @file{Makefile} as is. (That is, leave it as @samp{NONE})

If you want to handle shimbun folders, add directory where emacs-w3m is
installed to @code{load-path}. Then necessary modules will be
byte-compiled and installed.
@xref{Shimbun Folder}.

@subsection @file{WL-CFG}

Contents of the file @file{WL-CFG} is loaded under installation if a file
with that name exists in extracted directory. You can use @file{WL-CFG} to
configure @code{load-path} to extra packages such as SEMI if needed.

If you want to specify the install directory of Wanderlust related
files, then set following variables in @file{WL-CFG}

@table @code
@item WL_PREFIX
A directory to install WL modules.
This directory is relative directory from @code{LISPDIR}.
WL modules include @file{wl*.el}, @file{wl*.elc} files.
@c  Modules under the directory @file{util/} are also installed if
@c it detected as necessary.

@item ELMO_PREFIX
A directory to install ELMO modules.
This directory is relative directory from @code{LISPDIR}.
ELMO modules include @file{elmo*.el}, @file{elmo*.elc} files.
@c  @file{utf7.el}, @file{utf7.elc} are also included in the ELMO.
@end table

@noindent
Default value of @code{WL_PREFIX} and @code{ELMO_PREFIX} are @file{wl}.

If you want to install ELMO related files under a sub-directory
such as "elmo" then add following to @file{WL-CFG}:

@lisp
(setq ELMO_PREFIX "elmo")
@end lisp

@subsection Run in place

If wl and elmo directories are defined in @code{load-path}, then
byte-compilation and installation are not necessary to start Wanderlust.
For example, if package is extracted in @file{~/work}, Wanderlust can be
invoked with following setting in @file{~/.emacs}.

@lisp
@group
(add-to-list 'load-path "~/work/wl-@var{version}/wl")
(add-to-list 'load-path "~/work/wl-@var{version}/elmo")
@end group
@end lisp

@subsection Manual

Manual is described in Info format. Please do following.

@example
@group
% make info
% make install-info
@end group
@end example

Manual directory is automatically detected. Of course, it can be
configured by @code{INFODIR} in @file{Makefile}.

You can read manual at the following URL:

@example
@uref{http://wanderlust.github.io/wl-docs/wl.html}
@end example

@node Minimal Settings, Folder Definition, Install, Start Me Up
@section Set up .emacs
@cindex Minimal Settings
@cindex Settings
@cindex Configuration
@cindex .emacs
@cindex .wl

The Wanderlust package contains two module groups.

@table @samp
@item ELMO (elmo-*.el)
These modules show everything as folders. This is the back-end for WL.
@item WL (wl-*.el)
These modules controls the behavior of main body of Wanderlust.
They are also the front-end for ELMO.
@end table

You can customize the  behavior of Wanderlust by changing the value
of environmental variables which begins with @code{elmo-} and @code{wl-}.

The minimal requirement for settings is as the following.

@lisp
@group
;; @r{autoload configuration}
(autoload 'wl "wl" "Wanderlust" t)
(autoload 'wl-other-frame "wl" "Wanderlust on new frame." t)
(autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)

;; @r{Directory where icons are placed.}
;; @r{Default: the peculiar value to the running version of Emacs.}
;; @r{(Not required if the default value points properly)}
(setq wl-icon-directory "~/work/wl/etc")

;; @r{SMTP server for mail posting. Default: @code{nil}}
(setq wl-smtp-posting-server "your.smtp.example.com")
;; @r{NNTP server for news posting. Default: @code{nil}}
(setq wl-nntp-posting-server "your.nntp.example.com")
@end group
@end lisp

@file{~/.wl} is automatically loaded when Wanderlust starts up (if such a
file exists). So it is convenient to gather Wanderlust specific settings
in @file{~/.wl}. Settings for "face" must be written in @file{~/.wl},
because you can't write them in @file{.emacs}
(if you write it to @file{.emacs}, you'll get an error).
@xref{Highlights}.

All above described settings except autoload configuration can be written
in @file{~/.wl}).

@subsection @code{mail-user-agent}
@cindex Default Mailer
@cindex Mailer, Default
@vindex mail-user-agent
@findex compose-mail

If you write following setting in your @file{~/.emacs}, you can
start Wanderlust draft mode by typing @kbd{C-x m} (@code{compose-mail}).
This means it enables you to run Wanderlust as a default mail composer
 of Emacsen.

It is effective only when your Emacs can define @code{mail-user-agent}.
@xref{Mail Methods, , Mail-Composition Methods, emacs, GNU Emacs Manual}.

@lisp
@group
(autoload 'wl-user-agent-compose "wl-draft" nil t)
(if (boundp 'mail-user-agent)
    (setq mail-user-agent 'wl-user-agent))
(if (fboundp 'define-mail-user-agent)
    (define-mail-user-agent
      'wl-user-agent
      'wl-user-agent-compose
      'wl-draft-send
      'wl-draft-kill
      'mail-send-hook))
@end group
@end lisp



@node Folder Definition, Start Wanderlust, Minimal Settings, Start Me Up
@section Folder Definition
@cindex Folder Definition
@cindex .folders

You can skip this section because it is possible to add/edit the
subscribe folders from the buffer for list of folders.
@xref{Folder Manager}.

Define the folders you want to subscribe in file @file{~/.folders}.  The
contents written in @file{~/.folders} become the folders which you
subscribe to as it is.

Format for @file{~/.folders} is very simple. Here is an example:

@example
@group
#
# @r{Lines begin with @samp{#} are comment.}
# @r{Empty lines are ignored}
#
# @var{folder name}  "@var{folder nickname}"
# @r{(nicknames are not necessary)}
#
%inbox  "Inbox"
+trash  "Trash"
+draft  "Drafts"
%#mh/Backup@@my.imap.example.com "Sent"
# Folder Group
Emacsen@{
    %#mh/spool/wl            "Wanderlust ML"
    %#mh/spool/elips         "ELIPS ML"
    %#mh/spool/apel-ja       "APEL Japanese ML"
    %#mh/spool/xemacs-beta   "XEmacs beta"
    -fj.news.reader.gnus@@other.nntp.example.com "Gnus Net news"
    *-fj.editor.xemacs,-fj.editor.mule,-fj.editor.emacs "fj's Emacsen"
@}
#
# @r{If folder name ends with @samp{/}, that means an `access group',}
# @r{all subfolders automatically included in one folder group.}
#
%#mh/expire@@localhost /
# @r{All MH folders are included in one folder group.}
+ /
@end group
@end example

Each line contains one folder you want to read. The definition of
folders will be explained in detail in the next section.

The part surrounded by @samp{@var{group name}@{} and @samp{@}} will
become one folder group.  One folder group is treated as a directory
which can be opened and closed in folder mode. It is convenient for
collecting some folders and putting them in order.

Please note that @samp{@var{group name}@{} and @samp{@}} occupies one
line and you have to write it that way (It is because the parser sucks).

There are two types of groups. One is like @samp{Emacsen} from above
example which the user chooses his favorite folders as a group.

The other one is @dfn{access group} like @samp{+ /} from above example.
It collects all sub-folders in the folder to make a group.  (Its
behavior differs by the type of the folder. For example, @samp{+}
followed by @samp{/} makes entire MH sub-directories to one group)

This behavior is better understood if you try it and confirmed the
function first. You can write and try a small folder definition, so you
will know the idea of the folder function before writing the real one.

@node Start Wanderlust, Overview, Folder Definition, Start Me Up
@section Start Wanderlust
@cindex Start Wanderlust

If installation and configuration worked well, you can invoke Wanderlust by
typing following command in Emacs.

@example
M-x wl
@end example

@noindent
After initialization, Folder Mode which shows the list of folders will
appear. That means the folders you defined in the @file{~/.folders} are
listed.

If you start Wanderlust with prefix argument like @kbd{C-u M-x wl}, you
can skip folder checking.


@node Overview,  , Start Wanderlust, Start Me Up
@section Overview
@cindex Overview

Basically, you will handle messages in wanderlust while you come and go
from/to each of the following buffers.  Details of each ones are
explained in following chapters.

@table @samp
@item Folder Buffer
You can see the list of folders. You can select some folder and go into the summary
of it. You can subscribe new folder or edit subscription list.
@item Summary Buffer
You can see the list of messages in the folder. You can select message
and view its contents, and reply to some message. You can delete ones or
move ones to another folder.
@item Message Buffer
You can see the contents of the message. You can save part to disk or
open in external programs.
@item Draft Buffer
You can edit message.
@end table


@node Folders, Folder, Start Me Up, Top
@chapter Wanderlust's folders
@cindex Folder Type

This chapter describes the folder types which Wanderlust is able to handle.

Wanderlust uses ELMO as it's interface, so you can use every folder types
supported by ELMO.

As of version @value{VERSION}, 15 types of folders are predefined. These
are IMAP, NNTP, LocalDir(MH), Maildir, News Spool, Archive, POP,
Shimbun, Search, Multi, Filter, Pipe, File, Access and Internal folder
types.

@menu
* IMAP Folder::                 @samp{%} -- IMAP folder
* NNTP Folder::                 @samp{-} -- NNTP folder
* MH Folder::                   @samp{+} -- MH folder
* Maildir Folder::              @samp{.} -- Maildir folder
* News Spool Folder::           @samp{=} -- News spool folder
* Archive Folder::              @samp{$} -- Archive folder
* POP Folder::                  @samp{&} -- POP folder
* Shimbun Folder::              @samp{@@} -- Shimbun Folder
* RSS Folder::                  @samp{rss} -- RSS folder
* Search Folder::               @samp{[} -- Search Folder
* Multi Folder::                @samp{*} -- Multi folder
* Filter Folder::               @samp{/} -- Filter folder
* Pipe Folder::                 @samp{|} -- Pipe folder
* Internal Folder::             @samp{'} -- Internal folder
* File Folder::                          -- File folder
* Access Folder::                        -- Access folder
@end menu


@node IMAP Folder, NNTP Folder, Folders, Folders
@section IMAP Folder
@cindex @samp{%}
@cindex IMAP Folder
@cindex Folder, IMAP
@cindex RFC 2060
@cindex IMAP4rev1

A folder to access e-mails via IMAP4rev1 protocol (RFC 2060).

Format:

@example
@group
@samp{%} @var{mailbox} [@samp{:} @var{username} [@samp{/} @var{authenticate-type}]][@samp{@@} @var{hostname}][@samp{:} @var{port}][@samp{!}]
@end group
@end example

You can specify @code{login} (encoded password transmission),
@code{cram-md5} (CRAM-MD5 authentication), @code{digest-md5} (DIGEST-MD5
authentication) or @code{clear} (or @code{nil}, plain password
transmission) as @var{authenticate-type}.

default:

@example
@var{username}  -> The value of @code{elmo-imap4-default-user}.
             Initial setting is @env{USER} environment variable or
             @env{LOGNAME} environment variable or return value of
             @code{(user-login-name)}.
@var{authenticate-type} -> The value of @code{elmo-imap4-default-authenticate-type}.
             Initial setting is "auth".
@var{hostname}  -> The value of @code{elmo-imap4-default-server}.
             Initial setting is "localhost".
@var{port} -> The value of @code{elmo-imap4-default-port}.
             Initial setting is 143.
@end example

You can omit the @var{hostname} from folder names if you set
@code{elmo-imap4-default-server} as your main IMAP server.
For example, you can specify a folder as @samp{foo%imap@@gateway} even
if you have to go through a firewall.

@lisp
@group
;; @r{Example: imap4.exaple.org as main IMAP server}
(setq elmo-imap4-default-server "imap4.example.org")
@end group
@end lisp

SSL (Secure Socket Layer) connection will be used if a folder name ends
with @samp{!}.  If a folder name ends with @samp{!!}, STARTTLS
connection will be established.

If the value of @code{elmo-imap4-default-stream-type} is @code{ssl},
SSL will be the default connection, i.e. you can omit @samp{!}.  If it
is is @code{starttls}, STARTTLS will be the default connection.  To use
normal connection in these cases, add @samp{!direct} at the end of
folder name.

@lisp
@group
;; @r{Example: Use SSL connection}
(setq elmo-imap4-default-stream-type 'ssl)
@end group
@end lisp

If you specify @code{login}, @code{cram-md5} or @code{digest-md5} as
authentication method, the password is sent in encoded form. But, if
your server is unable to receive an encoded password, authentication
will fall back to @code{clear} (that is, sending password in raw format)
after confirmation to user. If @code{elmo-imap4-force-login} is non-nil,
authentication will fall back to @code{clear} without confirmation
(default value is @code{nil}).

@lisp
@group
;; @r{Example: password in raw format}
(setq elmo-imap4-default-authenticate-type 'clear)
@end group
@end lisp

Example:

@example
@group
%inbox     -> IMAP mailbox "inbox"
%#mh/inbox -> IMAP mailbox "#mh/inbox"

%inbox:hoge -> IMAP mailbox "inbox" of user "hoge".
%inbox:hoge/clear@@server1
            -> server1's IMAP mailbox "inbox"
               of user "hoge", with plain password authentication
               ('clear).
@end group
@end example

@subsection International mailbox names (Modified UTF7)
@cindex Modified UTF7
@cindex UTF7
@cindex UTF8
@cindex Unicode

You can use international mailbox names in @var{mailbox} part, if
@code{elmo-imap4-use-modified-utf7} is set to non-nil value (default
value is @code{t}).


@node NNTP Folder, MH Folder, IMAP Folder, Folders
@section NNTP Folder
@cindex @samp{-}
@cindex NNTP Folder
@cindex Folder, NNTP
@cindex Folder, News
@cindex NetNews
@cindex News
@cindex Newsgroup
@cindex RFC 977

A folder to access USENET news via NNTP protocol (RFC 977).
One newsgroup is treated as a folder.

Format:

@example
@group
@samp{-} @var{newsgroup} [@samp{:} @var{username}][@samp{@@} @var{hostname}][@samp{:} @var{port}][@samp{!}]
@end group
@end example

default:
@example
@var{hostname}  -> The value of @code{elmo-nntp-default-server}.
             Initial setting is @samp{localhost}.
@var{username}  -> The value of @code{elmo-nntp-default-user}.
             Initial setting is @code{nil}.
@var{port}      -> The value of @code{elmo-nntp-default-port}.
             Initial setting is 119.
@end example

AUTHINFO is used as authentication method if the @var{username} is
non-nil.  SSL connection will be used if a folder name ends with @samp{!}.
If a folder name ends with @samp{!!}, STARTTLS connection will be
established.

If the value of @code{elmo-nntp-default-stream-type} is @code{ssl},
SSL will be the default connection, i.e. you can omit @samp{!}.  If it
is is @code{starttls}, STARTTLS will be the default connection.  To use
normal connection in these cases, add @samp{!direct} at the end of
folder name.

Example:

@example
@group
-fj.rec.tv            -> Newsgroup @samp{fj.rec.tv}.
-fj.rec.tv@@newsserver -> Newsgroup @samp{fj.rec.tv} on @samp{newsserver}.
@end group
@end example


@node MH Folder, Maildir Folder, NNTP Folder, Folders
@section MH Folder
@cindex @samp{+}
@cindex MH Folder
@cindex Folder, MH
@pindex MH

A folder to access MH format mail (1 file is 1 mail).

Format:

@example
@samp{+} @var{directory-name}
@end example

Normally, @var{directory-name} is an relative path to the variable
@code{elmo-localdir-folder-path} (default is @file{~/Mail}), but if it
starts with @samp{/} or @samp{~}, then it is treated as an absolute path
(this is also true for drive-letters).

Message number is used for the name of the message file.

Example:

@example
@group
+inbox         -> @file{~/Mail/inbox}
+from/teranisi -> @file{~/Mail/from/teranisi}
+~/test        -> @file{~/test}
@end group
@end example


@node Localdir Vars,  , MH Folder, MH Folder
@subsection Variables About MH Folder
@cindex Localdir variables

@table @code
@item elmo-localdir-folder-path
@vindex elmo-localdir-folder-path
Specify root directory of MH folder.
Default is @file{~/Mail}.

@item elmo-localdir-warnings
@vindex elmo-localdir-warnings
When non-nil, show warning about filenames with leading 0 such as @file{001}.
They are ignored whatever value the variable is.
@end table


@node Maildir Folder, News Spool Folder, MH Folder, Folders
@section Maildir Folder
@cindex @samp{.}
@cindex Maildir Folder
@pindex Maildir
@pindex qmail

A folder to access Maildir format (1 file is 1 mail).

Format:

@example
@samp{.} [@var{directory-name}]
@end example

Normally, @var{directory-name} is a relative path to the variable
@code{elmo-maildir-folder-path} (default is @file{~/Maildir}), but if it
starts with @samp{/} or @samp{~}, then it is treated as an absolute path
(this is also true for drive-letters).

Maildir contains @file{cur}, @file{new} and @file{tmp} subdirectories.
Messages are contained in the @file{cur} directory.  All message files
in the @file{new} directory are moved to @file{cur} directory when you
access the folder. All message files contained in the @file{tmp}
directory and not accessed for 36 hours are deleted.

This behavior conforms to the @uref{http://cr.yp.to/proto/maildir.html}.

Example:

@example
@group
.              -> @file{~/Maildir}
.inbox         -> @file{~/Maildir/inbox}
.from/teranisi -> @file{~/Maildir/from/teranisi}
.~/test        -> @file{~/test}
@end group
@end example


@node News Spool Folder, Archive Folder, Maildir Folder, Folders
@section News Spool Folder
@cindex @samp{=}
@cindex News spool Folder
@pindex gnspool

This folder handles locally saved news articles which are proposed by
Mew/IM.  You can also read articles directly from a spool-file which is
retrieved by an utility like @command{gnspool}.

Format:

@example
@samp{=} @var{directory-name}
@end example

@var{directory-name} is a sub-directory to the directory defined by
variable @code{elmo-localnews-folder-path} (default is @file{~/News})
You can use @samp{.} as directory delimiter as well as @samp{/}.

Example:

@example
@group
=fj/os/os2         -> @file{~/News/fj/os/os2}
=fj.os.bsd.freebsd -> @file{~/News/fj/os/bsd/freebsd}
@end group
@end example


@node Archive Folder, POP Folder, News Spool Folder, Folders
@section Archive Folder
@cindex @samp{$}
@cindex Archive Folder
@c @pindex ange-ftp

This method can handle archive files, which are compressed by utilities
such as Info-ZIP or LHA, as one folder.

Format:

@example
@group
@samp{$} @var{path-name} [@samp{;} @var{archiver-type} @samp{;} @var{prefix}]
@end group
@end example

@var{path-name} is the relative path from
@code{elmo-archive-folder-path} (initial setting is @file{~/Mail}).  If
@var{path-name} begins with @samp{/} or @samp{~} or `drive-letter of
DOS', @var{path-name} is treated as absolute path.  ange-ftp format is
also permitted under the environment of ange-ftp, efs.

The actual file name of the archive folder is
@code{elmo-archive-basename} (Initial setting is @file{elmo-archive})
under the @var{path-name}. If a file named @var{path-name} exists, it is
treated as folder. The suffix is automatically decided for
@var{archiver-type}.

If @var{archiver-type} is omitted, @code{elmo-archive-default-type}
(Initial setting is @code{zip}) is referred.

@var{prefix} specifies the internal directory structure of the archive.
For example, if the ML server is fml, @file{msend.tar.gz} has a
structure like @file{spool/1}, so you have to specify @samp{spool} as
@var{prefix}.

Example:

@example
@group
$teranisi         -> @file{~/Mail/teranisi/elmo-archive.zip}
$bsd/freebsd;lha  -> @file{~/Mail/bsd/freebsd/elmo-archive.lzh}
$/foo@@server:~/bar;zoo     -> @file{~/bar/elmo-archive.zoo} on ftp server
$d:/msend.tar.gz;tgz;spool -> @file{d:/msend.tar.gz}
$ml;zip/        -> Access group consists of archive folders
                   under @file{~/Mail/ml}
@end group
@end example

@menu
* Archiver::     Supported Archivers
* Archive Tips:: TIPS
* Archive Vars:: Customization
@end menu


@node Archiver, Archive Tips, Archive Folder, Archive Folder
@subsection Supported Archives
@cindex Archiver
@pindex LHA
@pindex Info-ZIP
@pindex UNZIP
@pindex ZOO
@pindex RAR
@pindex TAR
@pindex GNU TAR

By default, following archives are supported.

@example
@group
        LHA, Info-ZIP/UNZIP, ZOO, RAR  ;; full-access
        GNU TAR('tgz, 'tar)            ;; read-only
@end group
@end example

If your archiver can include multiple files in one archive, you have a
possibility use it as an archiver of Wanderlust (ARJ/UNARJ, ARC is one
of the candidate. TAR is supported read-only because it cannot delete
file in the archive (@code{mv})).

@command{gzip}, @command{bzip}, @command{bzip2} cannot be used as an
archiver of Wanderlust because they cannot include multiple
files. Archivers that cannot extract files to standard output are also
not supported.

@subsection OS specific information about archiver

Behaviors of the following archivers are confirmed by further experiences.
(@samp{*} mark means recommended archiver).

@example
[OS/2]  Warp4.0J(w/o VoiceType)+Fx00505/emx0.9c(fix04)/PMMule,EmacsPM
         LHA  OS/2 version Rel.2.06b    Feb 18, 1998
        *UnZip 5.32 of 3 November 1997, by Info-ZIP.
        *Zip 2.2 (November 3rd 1997).
         Zoo archiver, zoo 2.1 $@asis{}Date: 91/07/09 02:10:34 $
         GNU tar version 1.10 - AK 2.58 (DBCS/SJIS) 981216(homy) version
         gzip 1.2.4 (18 Aug 93) + bzip2 patch(by Iida-san)

[UN|X]  FreeBSD 2.2.7-RELEASE, Linux 2.0.30, Solaris2.6, HP-UX 9.07
         LHa for UNIX  V 1.14c
         UnZip 5.32 of 3 November 1997
         Zip 2.2 (November 3rd 1997)
         GNU tar 1.12 (1.11.x is no good)
         gzip 1.2.4 (18 Aug 93)

[Win32] Win.98/Meadow
         Lha32 version 1.28
         Zip 2.2
         UnZip 5.40
         GNU tar 1.11.8 + 1.5(WIN32)
         GZIP 1.2.4
         RAR 2.06
@end example

* Caution about LHA

If you are an OS/2 user, Peter Fitzsimmons's LH/2 is not supported.
Hiramatsu version of LHA is only supported.
In Win32, LHa32 is only supported (DOS version is no good).

* Caution about GNU tar

You have to take care about GNU tar's version because many version has
problem on deleting file from archive.

Please test @option{--delete} @option{-f} options work. Otherwise, your
archive will be destroyed. No problem is reported on above versions of
GNU tar.


@node Archive Tips, Archive Vars, Archiver, Archive Folder
@subsection TIPS
@cindex Archive Tips

For comfortable migration, usage of @code{wl-summary-archive}
(@pxref{Archive}) or Expire (@pxref{Expire}) is recommended.  To treat
archive folders created by expiration, you must set non-nil value to
@code{elmo-archive-treat-file}.

If many files are included in one archive,
it takes long time to access the archive folder because
archiver starting overhead is increased (especially LHA).
150-200 messages in one archive is recommended.

Of course, following is possible @t{:-)}
(meanings of these variables are described later.)

@lisp
@group
(setq wl-fcc "$backup")
(setq wl-trash-folder "$trash;lha")
@end group
@end lisp

@node Archive Vars,  , Archive Tips, Archive Folder
@subsection Variables About Archive Folder
@cindex Archive variables

@table @code
@item elmo-archive-default-type
@vindex elmo-archive-default-type
The initial setting is @code{zip}.
Set archiver type by symbol.

@item elmo-archive-@var{type}-method-alist
@vindex elmo-archive-TYPE-method-alist
Define archiver @var{type}'s methods.
(@var{type} is @samp{lha}, @samp{zip}, @samp{zoo}, @samp{tgz} etc)
Each element of the alist is following.

@example
@group
(@var{action} . (@var{exec-name} @var{options}))   ;; external program and its option.
(@var{action} . @var{function})              ;; function
@end group
@end example

Currently available actions are following.

@example
@group
'ls, 'cat ('cat-headers)        ;; Minimal setting(read-only)
'mv ('mv-pipe), 'rm ('rm-pipe)  ;; full-access (with above)
'cp ('cp-pipe)                  ;;
@end group
@end example

@noindent
In above actions,
actions enclosed with braces are optional (They are used for better
performance).

@item elmo-archive-suffix-alist
@vindex elmo-archive-suffix-alist
An alist of archiver-type (symbol) and suffix.

@item elmo-archive-file-regexp-alist
@vindex elmo-archive-file-regexp-alist
An alist of a regexp to get file number from list output of archiver
and archiver-type (symbol).

@item elmo-archive-method-list
@vindex elmo-archive-method-list
A list of elmo-archive-@var{type}-method-alist
(@var{type} is a symbol of archiver-type).

@item elmo-archive-lha-dos-compatible
@vindex elmo-archive-lha-dos-compatible
The initial setting is @code{t} on OS/2 and Win32.  If non-nil, LHA is
DOS (Mr. Yoshizaki original) compatible.

@item elmo-archive-cmdstr-max-length
@vindex elmo-archive-cmdstr-max-length
The initial setting is 8000.

Max length of command line argument for external archiver program.
Emacs does not have a limit of command line byte length, but some OS
(e.x OS/2) have. It depends on the OS. Archive folder is affected by
this limit because it calls external archiver program directly (not
called via shell).  For example, you cannot delete messages if archiver
program must receive larger bytes of arguments to delete.  OS/2 have a
command line argument limit of 8190 bytes, so we defined default as 8000
with some margin.

However, you don't have an influence of command line argument limit
if the archiver has `actions' to receive target file information from
standard input (@code{rm-pipe}, @code{mv-pipe}, @code{cat-headers} action).
@end table


@node POP Folder, Shimbun Folder, Archive Folder, Folders
@section POP Folder
@cindex @samp{&}
@cindex POP Folder
@cindex RFC 1939
@cindex POP3
@cindex APOP

A folder to access e-mails via POP3 protocol (RFC 1939).

Format:

@example
@group
@samp{&} [@var{username}][@samp{/} @var{authenticate-type}][@samp{:} @var{numbering-method}][@samp{@@} @var{hostname}][@samp{:} @var{port}][@samp{!}]
@end group
@end example

You can specify
@samp{user}  (plain password transmission) or @samp{apop}  (APOP authentication)
as @var{authenticate-type}.

You can specify @samp{uidl} (use UIDL command for message numbering) or
@samp{list} (use LIST command for message numbering) as @samp{numbering-method}.

default:
@example
@var{username}   -> The value of @code{elmo-pop3-default-user}.
              Initial setting is @env{USER} environment variable or
             @env{LOGNAME} environment variable or return value of
             @code{(user-login-name)}.
@var{authenticate-type} -> The value of @code{elmo-pop3-default-authenticate-type}.
              Initial setting is @samp{user}.
@var{numbering-method} -> Follow the value of @code{elmo-pop3-default-use-uidl}.
              If t, use UIDL for numbering. Initial setting is t.
@var{hostname}   -> The value of @code{elmo-pop3-default-server}.
              Initial setting is @samp{localhost}.
@var{port}       -> The value of @code{elmo-pop3-default-port}.
              Initial setting is 110.
@end example

Example:

@example
@group
&hoge@@localhost     -> access localhost as user @samp{hoge}.
&hoge@@popserver:109 -> access the server "popserver" on port 109
                        as user @samp{hoge}.
@end group
@end example

If the last character of the folder name is @samp{!}, Wanderlust
connects to the POP server via SSL (Secure Socket Layer).  If a folder
name ends with @samp{!!}, STARTTLS connection will be established.

If the value of @code{elmo-pop3-default-stream-type} is @code{ssl},
SSL will be the default connection, i.e. you can omit @samp{!}.  If it
is is @code{starttls}, STARTTLS will be the default connection.  To use
normal connection in these cases, add @samp{!direct} at the end of
folder name.


@node Shimbun Folder, RSS Folder, POP Folder, Folders
@section Shimbun Folder
@cindex @samp{@@}
@cindex Shimbun Folder
@cindex Folder, Shimbun
@cindex Folder, Web
@pindex w3m
@pindex emacs-w3m

A folder for watching "shimbun" (means "newspaper" in Japanese),
news site and mailing list archives on WWW by using emacs-w3m
(@uref{http://emacs-w3m.namazu.org/}).

You should possess w3m and emacs-w3m to use this.

Format:

@example
@group
@samp{@@} @var{module-name} @samp{.} @var{folder-name}
@end group
@end example

Admissible values of @var{module-name} and @var{folder-name} are
described in @file{README.shimbun.ja} distributed with emacs-w3m.

Example:

@example
@group
@@airs.wl  -> archive of wanderlust ML (using module @file{sb-airs.el})
@@asahi/   -> access group of all folders in module @file{sb-asahi.el}
@end group
@end example

@subsection Variables About Shimbun Folder

@table @code
@item elmo-shimbun-update-overview-folder-list
@vindex elmo-shimbun-update-overview-folder-list
The initial setting is @code{all}. Specify a set of folders to update
overview when messages are fetched. Specify @code{all} to update
overview in all shimbun folders. You can specify a list of regular
expressions of shimbun folder names to restrict affected folders.

Example:

@example
(setq elmo-shimbun-update-overview-folder-list
      '("^@@airs\\." "^@@namazu\\."))
@end example

Update summary view automatically after fetching.
@end table

@node RSS Folder, Search Folder, Shimbun Folder, Folders
@section RSS Folder
@cindex RSS Folder
@cindex Atom Folder

An RSS folder presents the messages contained in an RSS or Atom feed:

Format:

@example
@samp{rss:} @var{URL for RSS or Atom}
@end example

Example:

@example
rss:https://github.com/wanderlust/wanderlust/commits/master.atom
@end example

This folder type attempts to automatically handle all known versions of
RSS and Atom.  Should you need more configurability, please use
a Shimbun folder (@pxref{Shimbun Folder}) instead.

Since this folder doesn't do any persistent caching, messages will
disappear as soon as they expire from the feed.  Should you want
persistent messages, combine this with a pipe folder (@pxref{Pipe Folder}):

@example
|rss:http://lwn.net/headlines/newrss|+lwn
@end example

You may also use an RSS, Atom or OPML feed as an access group, in which
case related feeds will appear as subfolders.

@node Search Folder, Multi Folder, RSS Folder, Folders
@section Search Folder
@cindex @samp{[}
@cindex Search Folder
@cindex Folder, Search
@cindex Folder, Text Search

A folder to access messages found by an external program with some
condition.

Format:

@example
@group
@samp{[} @var{search condition} @samp{]} [ @var{search target} [ @samp{!} @var{search engine} ] ]
@end group
@end example

The format of the @var{search condition} and @var{search target} depend
on the @var{search engine}.

@subsection Supported search engines

Supported search engines are following ones.  Default search engine can
be assigned by @code{elmo-search-default-engine}.

@menu
* namazu::      namazu
* grep::        grep
* rgrep::       rgrep
* mu::          mu
* notmuch::     notmuch
@end menu


@node namazu, grep, Search Folder, Search Folder
@subsection namazu
@pindex namazu

The messages registered in the namazu-index is found by using namazu
(@uref{http://www.namazu.org/}).

@var{search condition} is a query of namazu.  Please refer to the
document of the attached to namazu for details.

@var{search target} is a namazu-index used for search.  The directory
with the index or the alias that explain in the following can be
specified.  Default value of the path of namazu index can be assigned by
@code{elmo-search-namazu-default-index-path}.

Example:

@example
@group
[wanderlust]           -> search messages matched with
                       "wanderlust" from the default index
[semi flim]~/Mail/semi -> search "semi flim" from the index
                       in the directory "~/Mail/semi"
@end group
@end example

@c @subsection TIPS

@subsubsection Enter space to separate keywords

If you want to use space in folder entry, @kbd{C-q @key{SPC}} will help you.

@subsubsection Alias name for index

You can define an alias name for index.

Example:

@example
(setq elmo-search-namazu-index-alias-alist
      '(("cache" . "~/.elmo/cache")
        ("docs" . "~/documents")))
@end example

Above definition defines two index aliases.
You can specify

@example
[wanderlust]cache
@end example

to execute a namazu search with keyword @samp{wanderlust} using a index in the 
directory @file{~/.elmo/cache}.

@subsubsection Multiple indices

You can specify a list for @code{elmo-search-namazu-default-index-path} and
@code{elmo-search-namazu-index-alias-alist}.
When list is specified, all index contained in the list is used as the 
namazu indices.

Example:

@example
(setq elmo-search-namazu-index-alias-alist
      '(("all" . ("~/.elmo/cache" "~/documents"))
        ("cache" . "~/.elmo/cache")))
@end example

Using above alias setting, you can specify

@example
[wanderlust]all
@end example

to execute a namazu search with keyword @samp{wanderlust} using indices in the 
directory @file{~/.elmo/cache} and @file{~/documents}.

@node grep, rgrep, namazu, Search Folder
@subsection grep
@pindex grep
@pindex find

The files that exists in the directory specified with the @var{search
target} are found by using grep.

@var{search condition} is a regular expression of grep.  The directory
as @var{search target} cannot be omitted.

Example:

@example
@group
[wanderlust]~/Mail/inbox!grep
    -> search messages matched with "wanderlust"
       from the directory "~/Mail/inbox"

["[sr]emi"]~/Mail/semi!grep
    -> If @samp{]} is included in regular expression,
       @var{search condition} should be enclosed with @samp{"}.
@end group
@end example

Because this method passes all target filenames to grep process as
arguments, starting grep process may fail when there are too many files
in the target directory.  If your find proram accepts @samp{-maxdepth}
option, adding the below code in @file{~/.wl} may resolve the problem.

@example
(eval-after-load "elmo-search"
  '(elmo-search-register-engine
    'grep 'local-file
    :prog "find"
    :args '(elmo-search-rgrep-target
            "-maxdepth" "1" "-type" "f" "-exec" "grep" "-l" "-e"
            pattern "@{@}" "+")))
@end example

If your find program can't handle @samp{-exec command @{@} +} option
correctly, replacing the last @samp{+} with @samp{;} would do the trick,
but it is probably very slow.

@node rgrep, mu, grep, Search Folder
@subsection rgrep

Using grep with @samp{-r} option to search files in subdirectories of
the target directory.
Grep must accept @samp{-r} option.

There is no limitation about the number of files such as grep method (@pxref{grep}).
Syntax is similar to grep method.

Example:

@example
@group
[wanderlust]~/Mail/inbox!rgrep
    -> search messages matched with "wanderlust"
       from the directory "~/Mail/inbox" including subdirectories.
@end group
@end example

@node mu, notmuch, rgrep, Search Folder
@subsection mu
@pindex mu

Search mail using mu (@uref{http://www.djcbsoftware.nl/code/mu/}).

Examples (from the mu cheatsheet)

@example
@group
[Helsinki]
    -> messages about Helsinki (in message body, subject, sender, ...)

[to:Jack subject:jellyfish tumbleweed]
    -> messages to Jack with subject jellyfish containing the word tumbleweed

[size:2k..2m date:20091201..20093112 flag:attach from:bill]
    -> messages between 2 kilobytes and a 2Mb,
       written in December 2009 with an attachment from Bill

[subject:soc* flag:unread]
    -> unread messages about things starting with 'soc'
       (soccer, society, socrates, ...)

[mime:image/*]
    -> messages with images as attachment

['foo bar']
    -> search for messages with the phrase "foo bar"

@end group
@end example

@node notmuch,  , mu, Search Folder
@subsection notmuch
@pindex notmuch

Search mail using notmuch (@uref{http://notmuchmail.org/}).

Examples (from the notmuch manual)

@example
@group
[term1]
    -> messages that contain 'term1'

[-term1]
    -> messages that DO NOT contain 'term1'

[term1 term2]
    -> messages containing term1 and term2

['foo bar']
    -> search for messages with the phrase "foo bar"

@end group
@end example

@node Multi Folder, Filter Folder, Search Folder, Folders
@section Multi Folder
@cindex @samp{*}
@cindex Multi Folder
@cindex Folder, Multiple
@cindex Folder, Marge

A folder to access virtual folder which collects messages from
multiple folders.

Format:

@example
@group
@samp{*} @var{folder-1} [@samp{,} @var{folder-2}] @dots{} [@samp{,} @var{folder-N}]
@end group
@end example

After @samp{*} character, specify multiple folders you want to collect
separated by @samp{,} like
@samp{@var{folder-1},@var{folder-2},@dots{},@var{folder-N}}.

Example:

@example
@group
*-fj.editor.xemacs,-fj.editor.mule,-fj.editor.emacs
-> -fj.editor.xemacs, -fj.editor.mule and -fj.editor.emacs are
   treated as one folder.

*+inbox,-fj.rec.tv,%inbox
-> +inbox, -fj.rec.tv and %inbox are treated as one folder.
@end group
@end example


@node Filter Folder, Pipe Folder, Multi Folder, Folders
@section Filter Folder
@cindex @samp{/}
@cindex Filter Folder
@cindex Folder, Filtering
@cindex Folder, Virtual
@cindex Folder, Conditional
@cindex Flag

A folder to access virtual folder which collects all messages that
satisfy a condition.

Format:

@example
@samp{/} @var{condition} @samp{/} @var{target-folder}
@end example

In the @var{condition} part, you can specify following.

@enumerate
@item
Partial filter: @samp{first:@var{number}}, @samp{last:@var{number}}

first: @var{number} messages are picked from top of folder.
last:  @var{number} messages are picked from bottom of folder.

Example:

@example
@group
/last:10/-fj.os.linux -> Latest 10 messages from -fj.os.linux are picked.
/first:20/%inbox      -> First 20 messages from %inbox are picked.
@end group
@end example

@item
Date filter: @samp{since:@var{date}}, @samp{before:@var{date}}

since: only messages arrived since @var{date} are picked (@var{date} is included).
before: only messages arrived before @var{date} are picked (@var{date} is not included).

You can specify following as @var{date}.

@example
@group
yesterday ->  a day before today.
lastweek  ->  same day of last week.
lastmonth ->  same day of last month.
lastyear  ->  same day of last year.
@var{number}daysago -> @var{number} days ago. (e.x. '3daysago')
@var{day}-@var{month}-@var{year} -> specify date directly (ex. 1-Nov-1998)
@end group
@end example

Example:

@example
@group
/since:3daysago/+inbox -> messages arrived since 3 days ago in +inbox
                          are picked.
/before:yesterday/+inbox -> messages arrived before yesterday in +inbox
                          are picked.
@end group
@end example

@item
Field filter: @samp{@var{field}:@var{value}}

All messages that have @var{field} and its value is @var{value} are picked.
@var{field} and @var{value} are case insensitive.

Example:

@example
@group
/from:teranisi/+inbox -> In +inbox, messages which have From: field
                         and its value includes "teranisi" string are picked.
/body:foo/%inbox      -> In %inbox, messages which have "foo" text
                         are picked.
@end group
@end example

@item
Flag filter: @samp{flag:@var{flag-name}}

Pick up messages with flag specified by @var{flag-name}.

You can specify following flag names:

@example
@group
unread    -> unread
important -> important
answered  -> replied
forwarded -> forwarded
digest    -> unread or important
any       -> unread or replied or forwarded or global-flag.
@end group
@end example

You can also use flags which you have set as `global-flag'.  global-flag
is a flag which has arbitrary name. You can put global-flag on messages
by invoking @code{wl-summary-set-flags} (Key @key{F}). By default,
@samp{important} flag is prepared.  You can view messages with
global-flag by visiting the subfolder of @samp{'flag} folder.

@xref{Internal Folder}.

Example:

@example
@group
/flag:digest/%inbox     -> a folder consist of unread or important
                           message in %inbox.
/flag:wl/+ML/Wanderlust -> a folder consist of messages with global flag
                           wl in +ML/Wanderlust.
@end group
@end example

@item
Compound condition

A condition starting with @samp{!} indicates a negation.
If you combine conditions by character @samp{|}, it is considered as OR condition.
@samp{&} is considered as AND condition, likewise.
Condition can be grouped by parentheses (@samp{(}, and @samp{)}).

@samp{/tocc:xxxx/} is an abbreviation of @samp{/to:xxxx|cc:xxxx/}.
@samp{/!tocc:xxxx/} is an abbreviation of @samp{/!to:xxxx&!cc:xxxx/}.

Example:

@example
@group
/from:teranisi&!to:teranisi/+inbox
                      -> In +inbox, messages are picked if the message's
                         From: field includes "teranisi" and
                         To: field doesn't include "teranisi".

/tocc:"Yuuichi Teranishi"/+inbox
                      -> In +inbox, messages are picked if the
                         message's To: field or Cc: field includes
                         "Yuuichi Teranishi".

/(from:yt|from:teranisi)&subject:report/+inbox
                      -> In +inbox, messages are picked if the message's
                         From: field includes "yt" or "teranisi", and
                        Subject includes "report".
@end group
@end example
@end enumerate

@noindent
Tip for string description:

Space character, @samp{"}, @samp{/},@samp{)},@samp{|} and @samp{&}
should be enclosed with @samp{"} in @var{value} string.  (@samp{"}
should be escaped with @samp{\} in it).  You can enclose the string with
@samp{"} even it does not contain these characters.

@noindent
Advanced example:

@example
*%inbox,/from:teranisi/%inbox@@server
       -> Messages in %inbox or
          message is in the %inbox@@server folder and it's From field
          includes "teranisi" are collected.

/last:100//to:teranisi/*+inbox,%inbox
       -> Latest 100 messages which is in the +inbox or %inbox folder
          and To: field matches "teranisi".

/from:hogehoge//last:20//tocc:teranisi/%#mh/inbox@@localhost
       -> Pick messages which have From: field and it includes "hogehoge"
          from latest 20 messages in the %#mh/inbox@@localhost
          and To: or Cc: field includes "teranisi".
@end example

@node Pipe Folder, Internal Folder, Filter Folder, Folders
@section Pipe Folder
@cindex @samp{|}
@cindex Pipe Folder
@cindex Get Message
@cindex Download Message
@cindex Incorporate Message

In the pipe folder, messages are automatically transferred from the source
folder to destination folder.

Format:

@example
@samp{|} @var{source-folder} @samp{|} @var{destination-folder}
@end example

When you access the pipe folder, messages are automatically transferred
from @var{source-folder} to @var{destination-folder}.
It is convenient if you want to download messages to local disk via POP.
For example, if you specify following

@example
|&username@@popserver|+inbox
@end example

@noindent
and access it, Wanderlust downloads messages from
@samp{&username@@popserver} to @samp{+inbox} automatically.

On the other hand, if you put @samp{|:} instead of second @samp{|},
then messages are copied to the destination folder (not deleted from
source-folder). At the next time you access that folder, copies new
messages only.

@example
@samp{|} @var{source-folder} @samp{|:} @var{destination-folder}
@end example

If you want to copy messages from POP server and view them, specify the
folder as follows:

@example
|&username@@popserver|:+inbox
@end example

where messages will be kept on the server.

Example:

@example
@group
|%inbox|%myinbox   -> Download %inbox to %myinbox.
|*&user@@popserver1,&user@@popserver2|+inbox
         -> Download from &user@@popserver1 and &user@@popserver2 to +inbox.
|-gnu.emacs.sources|:+sources
         -> Copy messages from -gnu.emacs.sources to +sources.
@end group
@end example

After messages are moved, a hook @code{elmo-pipe-drained-hook} is called.

@node Internal Folder, File Folder, Pipe Folder, Folders
@section Internal folder
@cindex @samp{'}
@cindex Internal Folder
@cindex Folder, @samp{$} mark
@cindex Flag
@cindex Cache
@c @cindex Folder, Null

A folder to access internal messages of Wanderlust.

Format:

@example
@group
@samp{'flag} [@samp{/} @var{global-flag}]
@samp{'sendlog}
@samp{'cache/00} - @samp{'cache/1F}
@end group
@end example

A folder named @samp{'flag} is a special virtual folder which collects
messages which have @var{global-flag}.

There is @samp{important} flag defined as @var{global-flag} by default.
You can review important messages at once after you put important marks
on the messages in the different folders.  If @var{global-flag} is omitted,
it is treated as @samp{important} flag is specified.

In addition, in summary mode, to be described later, you can freely
define global flags and put them on messages.
@xref{Usage of Summary Mode}.

In this folder, if you delete message, @var{global-flag} put on the
message is removed.  If you append messages to this folder, the message
will have @var{global-flag}.


A folder named @samp{'sendlog} is a virtual folder which collects
cached messages which are recoded on @file{~/.elmo/sendlog}.
It might be useful when you forgot to add cc for yourself.
To use this, you should set @code{wl-draft-use-cache} to non-nil
so that sent messages are cached.


You can access cached messages fetched via network by accessing
folders named @samp{'cache/00} - @samp{'cache/1F}. 00 - 1F are
the name of the subdirectories of the cache directory
(@file{~/.elmo/cache}).


@node File Folder, Access Folder, Internal Folder, Folders
@section File folder
@cindex File Folder

File Folder gives the view for local file system. 
The one File Folder corresponds to the one directory.

Format:

@example
@samp{file:} @var{Path-of-the-directory}
@end example

Example:

@example
@group
file:~/work     -> @file{~/work}
file:/etc       -> @file{/etc}
@end group
@end example


@node Access Folder,, File Folder, Folders
@section Access folder
@cindex Access Folder

A folder to access virtual folder which collects messages from a root
folder and subfolders of one.  The add and remove of the subfolder is
automatically reflected.


Format:

@example
@samp{access:} @var{root-folder}
@end example

Example:

@example
@group
access:%INBOX -> All subfolders of IMAP mailbox "inbox".
access:'cache -> All of 'cache folder
@end group
@end example


@node Folder, Summary, Folders, Top
@chapter Folder mode
@cindex Folder

After you start Wanderlust, folder mode is appeared firstly.
It contains folder list you subscribed.
You can select and edit folders in this mode.

@menu
* Selecting Folder:: Select folder you want to read
* Folder Manager::   Editing folders
@end menu


@node Selecting Folder, Folder Manager, Folder, Folder
@section Selecting Folder
@cindex Selecting Folder

@subsection Usage (TIPS)

@subsubsection Check new, unread number

Folder mode looks like this.

@example
@group
[-]Desktop:14186/35580/67263
   Inbox:3/10/10
   Trash:2/7/10
   Drafts:0/0/3
   Sent:0/9/348
   [-]Emacsen:0/34/4837
     Wanderlust ML:0/0/558
     ELIPS ML:0/0/626
     tm:0/0/821
     XEmacs Beta:0/29/255
     Mew:0/0/998
     Mule-Win32:0/0/1491
     fj's Emacsen:0/5/88
@end group
@end example


Each line means:

@example
@var{folder-name}:@var{new-number}/@var{unread-number}/@var{all-number}
@end example

@noindent
@kbd{s} key on the folder line updates these numbers.
It changes its color if it has many new messages.

The whole folder mode is a folder group named @samp{Desktop}.
Folder group open/close by return key.
An operation on a folder group is treated as operations on the
children folders.
For example, when you type @kbd{s} on @samp{[-]Emacsen},
seven children folders update their unread number status.

@subsubsection Select Folder

To enter summary mode of the folder, type return (or space) key on
the folder line.
If the variable @code{wl-stay-folder-window} has non-nil value,
summary window appears on the right of the folder mode window.

@subsection Key bindings

Folder mode's key binding (related to selecting folders) is following.

@table @kbd
@item @key{SPC}
@itemx @key{RET}
@kindex @key{SPC} (Folder)
@kindex @key{RET} (Folder)
@findex wl-folder-jump-to-current-entity
Enter to the summary mode of the folder at the current cursor point.
With prefix argument, enter the sticky summary.
If the cursor is on the top of folder group line,
the folder group is opened or closed.
When the cursor is on the access group and this command is called
with prefix argument, folder children list is updated to the newest one.
(Children list is updated recursively if the access folder has hierarchical
structure.)
(@code{wl-folder-jump-to-current-entity})

@item M-@key{RET}
@kindex M-@key{RET} (Folder)
@findex wl-folder-update-recursive-current-entity
Folder children list of the access group at the current cursor point
is updated to the newest one.
(Children list is updated recursively if the access folder has hierarchical
structure.)
(@code{wl-folder-update-recursive-current-entity})

@item w
@kindex w (Folder)
@findex wl-draft
Create a new draft message.
(@code{wl-draft})

@item W
@kindex W (Folder)
@findex wl-folder-write-current-folder
If the current cursor point is on the NNTP folder, create a new draft
message which already has @samp{Newsgroups:} field.  If the current
cursor point is on the folder for mailing list (refile destination),
create a new draft message which already has @samp{To:} field with
guessed mailing list address (If @code{wl-subscribed-mailing-list} is
valid list).
(@code{wl-folder-write-current-folder})

@item C-c C-o
@kindex C-c C-o (Folder)
@findex wl-jump-to-draft-buffer
Move to the draft buffer if available.  If multiple draft buffer exists,
moved to one after another.  If prefix argument is specified, load draft
folder's message to the draft buffer and jump to it.
(@code{wl-jump-to-draft-buffer})

@item s
@kindex s (Folder)
@findex wl-folder-check-current-entity
Update new and unread number information of the folder at the current
cursor point.
(@code{wl-folder-check-current-entity})

@item S
@kindex S (Folder)
@findex wl-folder-sync-current-entity
Update summary information of the folder at the current cursor point.
(@code{wl-folder-sync-current-entity})

@item r s
@kindex r s (Folder)
@findex wl-folder-check-region
Update new and unread number information of the folders in the currently
selected region.
(@code{wl-folder-check-region})

@item r S
@kindex r S (Folder)
@findex wl-folder-sync-region
Update summary information of the folders in the currently selected region.
(@code{wl-folder-sync-region})

@item Z
@kindex Z (Folder)
@findex wl-status-update
Sync up address book status with @file{~/.addresses}'s content.
(@code{wl-status-update})

@item P
@kindex P (Folder)
@findex wl-folder-prev-unread
Jump cursor to the folder which have unread messages on the upward from
current cursor point.
(@code{wl-folder-prev-unread})

@item N
@kindex N (Folder)
@findex wl-folder-next-unread
Jump cursor to the folder which have unread messages on the downward
from current cursor point.
(@code{wl-folder-next-unread})

@item p
@kindex p (Folder)
@findex wl-folder-prev-entity
Move cursor to the folder on the previous line.
(@code{wl-folder-prev-entity})

@item n
@kindex n (Folder)
@findex wl-folder-next-entity
Move cursor to the folder on the next line.
(@code{wl-folder-next-entity})

@item J
@kindex J (Folder)
@findex wl-folder-jump-folder
Jump to the folder specified by the user input.
(@code{wl-folder-jump-folder})

@item I
@kindex I (Folder)
@findex wl-folder-prefetch-current-entity
Prefetch new messages of the folder at the current cursor point by
@code{wl-summary-incorporate}.
If the cursor is on the folder group, it is executed recursively.
(@code{wl-folder-prefetch-current-entity})

@item c
@kindex c (Folder)
@findex wl-folder-mark-as-read-all-current-entity
Mark all unread messages of the folder at the current cursor point as read.
If the cursor is on the folder group, it is executed recursively.
(@code{wl-folder-mark-as-read-all-current-entity})

@item f
@kindex f (Folder)
@findex wl-folder-goto-first-unread-folder
Enter summary mode of the first unread folder.
(@code{wl-folder-goto-first-unread-folder})

@item E
@kindex E (Folder)
@findex wl-folder-empty-trash
Empty trash.
(@code{wl-folder-empty-trash})

@item F
@kindex F (Folder)
@findex wl-folder-flush-queue
Flush queue.
(@code{wl-folder-flush-queue})

@item V
@kindex V (Folder)
@findex wl-folder-virtual
Move to the virtual folder (filter folder) with the condition specified.
(@code{wl-folder-virtual})

@item ?
@kindex ? (Folder)
@findex wl-folder-pick
Search the folders with the condition specified.
(@code{wl-folder-pick})

@item o
@kindex o (Folder)
@findex wl-folder-open-all-unread-folder
All unread folders are opened.
(@code{wl-folder-open-all-unread-folder})

@item x
@kindex x (Folder)
@findex wl-execute-temp-marks
Execute marks in summary buffers. @xref{Sticky Summary}.
(@code{wl-execute-temp-marks})

@item /
@kindex / (Folder)
@findex wl-folder-open-close
Folder group is opened/closed.
(@code{wl-folder-open-close})

@item [
@kindex [ (Folder)
@findex wl-folder-open-all
All folder groups are opened.
(@code{wl-folder-open-all})

@item ]
@kindex ] (Folder)
@findex wl-folder-close-all
All folder groups are closed.
(@code{wl-folder-close-all})

@item q
@kindex q (Folder)
@findex wl-exit
Quit Wanderlust.
(@code{wl-exit})

@item z
@kindex z (Folder)
@findex wl-folder-suspend
Suspend Wanderlust.
(@code{wl-folder-suspend})

@item C-x C-s
@kindex C-x C-s (Folder)
@findex wl-save
Save current folder status.
(@code{wl-save})

@item M-t
@kindex M-t (Folder)
@findex wl-toggle-plugged
Toggle Wanderlust's offline/online status.
(@code{wl-toggle-plugged})

@item C-t
@kindex C-t (Folder)
@findex wl-plugged-change
Start Wanderlust's plug-status manager.
(@code{wl-plugged-change})
@end table

@subsection Customize variables

@table @code
@item wl-folders-file
@vindex wl-folders-file
The initial setting is @file{~/.folders}.
Subscribed folders are described (saved) in this file.

@item wl-folder-info-save
@vindex wl-folder-info-save
The initial setting is @code{t}.  If non-nil, unread information is
saved and used in the next Wanderlust session.

@item wl-stay-folder-window
@vindex wl-stay-folder-window
The initial setting is @code{nil}.
If non-nil, summary window is appeared on the right side of the folder buffer.

@item wl-folder-window-width
@vindex wl-folder-window-width
The initial setting is 20.
Folder mode's window width when @code{wl-stay-folder-window} is non-nil.

@item wl-folder-use-frame
@vindex wl-folder-use-frame
The initial setting is @code{nil}.
If non-nil, use new frame for the folder window.

@item wl-folder-many-unsync-threshold
@vindex wl-folder-many-unsync-threshold
The initial setting is 70.
If the number of unread messages is more than this value,
folder color is changed.

@item wl-highlight-folder-by-numbers
@vindex wl-highlight-folder-by-numbers
This option controls how to highlight each line in the folder buffer.
The default value is @code{t}, highlighting with various colors based on
the message numbers.  If it is @code{nil}, highlighting with various
colors based on the folder status.  In addition, if it is a number
(e.g. 1), highlighting will be done based on both the message numbers
and the folder status.

@item wl-folder-desktop-name
@vindex wl-folder-desktop-name
The initial setting is @samp{Desktop}.
The name of top folder group.

@item wl-folder-petname-alist
@vindex wl-folder-petname-alist
The initial setting is @code{nil}.
An alist of folder's realname and its nickname.

@item wl-folder-access-subscribe-alist
@vindex wl-folder-access-subscribe-alist
The initial setting is @code{nil}.

Control automatic subscribing and unsubscribing of the children list
of access groups.

Each element is:

@example
(@var{regexp-of-access-folder} . (@var{subscribe-flag} @var{regexp-of-folders} @dots{}))
@end example

@noindent
If @var{subscribe-flag} is non-nil, folders which have name matched to
@var{regexp-of-folders} are displayed. Otherwise, hidden.  However,
already unsubscribed folder is not displayed even when the
@var{subscribe-flag} is non-nil. Multiple @var{regexp-of-folders} can be
specified.

Example:

@lisp
@group
'(("^-fj$" . (t   "^-fj\\.\\(comp\\|editor\\|mail\\)"
                  "^-fj\\.\\(net\\|news\\|os\\|rec\\)"))
  ("^-$" . (t   "^-\\(fj\\|tnn\\|japan\\|gnu\\|comp\\)"))
  ("^\\+ml$" . (nil "^\\+ml$" "^\\+ml/tmp")))
@end group
@end lisp

@item wl-folder-hierarchy-access-folders
@vindex wl-folder-hierarchy-access-folders
A list of regular expressions for access groups which creates children
folder list hierarchically.

For example, if you specify
@code{wl-folder-hierarchy-access-folders} like following,

@lisp
@group
(setq wl-folder-hierarchy-access-folders
     '("^-[^\\.]*$" "^-comp.unix$" "^-comp.unix.bsd$"))
@end group
@end lisp

@noindent
you obtain the access group hierarchy as follows.

@example
@group
   [-]-:912/912/3011
     [-]-fj:674/674/1314
       -fj.comp.announce:0/0/2
       -fj.comp.dev.cdrom:0/0/0
       @dots{}
     [+]-japan:238/238/1688
     [-]-comp:0/0/4
       [-]-comp.unix:0/0/0
         -comp.unix.admin:0/0/0
         -comp.unix.dos-under-unix:0/0/0
         -comp.unix.programmer:0/0/0
         [-]-comp.unix.bsd:0/0/23
           -comp.unix.bsd.freebsd.announce:0/0/0
     @dots{}
@end group
@end example

If you opened @samp{-} in this example, only the direct children is created
(@samp{-fj}, @samp{-japan}, @samp{-tnn}, @dots{}).
second hierarchy (@samp{-fj.comp.announce}, @dots{}, @samp{-comp.unix}, @dots{})
is not created until the children access group is opened.
@end table


@node Folder Manager,  , Selecting Folder, Folder
@section Editing Folders
@cindex Folder Manager
@cindex Folder, Edit
@cindex Folder, Subscribe
@cindex Folder, Unsubscribe

As described before, subscribed folder list is saved in @file{~/.folders} file.
But you don't have to edit @file{~/.folders} directly.
You can append, delete, edit folders from folder mode.

@subsection Usage (Tips)

@subsubsection Append Folder

@kbd{m a} appends new folder to your folder list. If you enter non-existent
folder, it will ask you to create a new one.
@kbd{m g} appends new folder group.
To append new folder to this group, firstly open it,
then execute append command in the next line.

@subsubsection Edit Folder

You can cut folder by @kbd{C-k}, paste by @kbd{C-y}.
Thus, you can change folder position as if you were editing a normal file.

@subsubsection Create Multi Folder

@enumerate
@item
Type @kbd{m q} to clear @code{wl-fldmgr-cut-entity-list}.
@item
Cut folder by @kbd{C-k} or copy folder by @kbd{M-c}.
@item
Type @kbd{m m}, then you can create multi folder.
@end enumerate

@subsubsection Delete Nickname, Filter

You can delete nickname or filter by putting ``''(@var{NULL}) from the
minibuffer while appending.

@subsubsection Append Folder to Empty Group

To append new folder to the empty folder group
(after you create folder group by typing @kbd{m g}),
firstly open it, then execute append command in the next line.
If it is closed, folder is appended on the same level with
the folder group above. It is difficult to explain by words so try it.
In other words, appended position depends on the
open/close status of the upper one.

@subsubsection Charset of the Folders File

@code{wl-mime-charset} is used for saving @code{wl-folders-file}.

@subsubsection Create Filter

@kbd{m f} adds filter to the folder at the current cursor point.  To
create new filter folder and leave the current folder unchanged, copy it
@kbd{M-c}, make filter @kbd{m f} and paste it @kbd{C-y}.  Multiple
filter can be specified while appending filter.  If you put
``''(@var{NULL}), filter is deleted.

@subsubsection Sort Folders

Sorting of the folders is executed by the function specified by
@code{wl-fldmgr-sort-function}.
The initial setting is @code{wl-fldmgr-sort-standard},
which sorts alphabetically.
Sorting affects only on the current folder group. It does not
affect on the child groups.

@subsubsection Hiding Folders in the Access Group

Usually, access group displays all children folders, but you can set
some folders hidden. Following operations are only available on access
group.

Command @code{wl-fldmgr-unsubscribe} (@kbd{u}) toggles the visibility
(subscribe/unsubscribe) of the folder at current cursor point.  Against
this, @code{wl-fldmgr-unsubscribe-region} (@kbd{U}) hides folders in the
specified region.

Note that @code{wl-fldmgr-unsubscribe-region} does not toggle while
@code{wl-fldmgr-unsubscribe} toggles.  These two commands accept prefix
argument and if the argument has positive number, the unsubscribe it.
If the prefix argument has negative value, folder becomes visible and if
zero, folder visibility is toggled.

The other commands, @code{wl-fldmgr-subscribe} and
@code{wl-fldmgr-subscribe-region} are also prepared (not binded to the
key).

Moreover, if @code{wl-fldmgr-cut} or @code{wl-fldmgr-cut-region} is
executed in the access group, they have a same effect with
@code{wl-fldmgr-unsubscribe} and @code{wl-fldmgr-unsubscribe-region}.
The difference is that cut commands deletes folders from the current
buffer.

@subsubsection Operations in the Access Group

You can insert and delete folders in the access group like usual folder
group.  But insert and delete commands can be only available for the
children folders of the access group and they only sets the subscribe
status.  In other words, insertion of the folder means subscribing,
deletion means unsubscribing.
@footnote{In the current implementation,
it is faster to delete region than to unsubscribe region.}

To update the access group when children folders are inserted or deleted
by other way (other than Wanderlust),
open the access group by typing @kbd{C-u @key{RET}}.
@xref{Selecting Folder}.

The order of children folders of access group is saved after
insertion/deletion/sorting.
If you set @code{wl-force-fetch-folders} to non-nil or open access group
by typing @kbd{C-u @key{RET}}, disappeared folders are deleted and
newly created folders are inserted on the top of the access group.

@subsection Key bindings
@cindex Keybind, Folder Mode
@cindex Keybind, Folder Buffer

Key bindings on the folder mode related to folder editing are shown below.
All bindings starts with @kbd{m}, and primary commands are binded to
one stroke key binding.

@table @kbd
@item m a
@kindex m a (Folder)
@findex wl-fldmgr-add
Add specified folder to your folder list . If you enter non-existent
folder, create it after confirmation.
(@code{wl-fldmgr-add})

@item +
@itemx m g
@kindex + (Folder)
@kindex m g (Folder)
@findex wl-fldmgr-make-group
Create a folder group.
(@code{wl-fldmgr-make-group})

@item m A
@kindex m A (Folder)
@findex wl-fldmgr-make-access-group
Create an access group.
(@code{wl-fldmgr-make-access-group})

@item m d
@kindex m d (Folder)
@findex wl-fldmgr-delete
Delete folder itself and msgdb.
If the folder itself cannot be deleted like NNTP folder,
only msgdb is deleted.
(@code{wl-fldmgr-delete})

@item R
@itemx m R
@kindex R (Folder)
@kindex m R (Folder)
@findex wl-fldmgr-rename
Change the name of folder or folder group.
msgdb's path is also changed.
(@code{wl-fldmgr-rename})

@item *
@itemx m m
@kindex * (Folder)
@kindex m m(Folder)
@findex wl-fldmgr-make-multi
Create a multi folders in the cutlist (cut, copied folders).
(@code{wl-fldmgr-make-multi})

@item |
@itemx m f
@kindex | (Folder)
@kindex m f (Folder)
@findex wl-fldmgr-make-filter
Create a filter folder. (Put a filter on the folder).
(@code{wl-fldmgr-make-filter})

@item M-c
@itemx m c
@kindex M-c (Folder)
@kindex m c (Folder)
@findex wl-fldmgr-copy
Copy folder (it is not available on folder group).
(@code{wl-fldmgr-copy})

@item M-w
@itemx m W
@kindex M-w (Folder)
@kindex m W (Folder)
@findex wl-fldmgr-copy-region
Copy folders in the specified region.
(@code{wl-fldmgr-copy-region})

@item C-k
@itemx m k
@kindex C-k (Folder)
@kindex m k (Folder)
@findex wl-fldmgr-cut
Cut folder. Folder itself is not deleted.
(@code{wl-fldmgr-cut})

@item C-w
@itemx m C-w
@kindex C-w (Folder)
@kindex m C-w (Folder)
@findex wl-fldmgr-cut-region
Cut folders in the specified region.
(@code{wl-fldmgr-cut-region})

@item C-y
@itemx m y
@kindex C-y (Folder)
@kindex m y (Folder)
@findex wl-fldmgr-yank
Paste folders that are copied or cut (folders in the cut-list).
(@code{wl-fldmgr-yank})

@item m p
@kindex m p (Folder)
@findex wl-fldmgr-set-petname
Put nickname on the folder.
(@code{wl-fldmgr-set-petname})

@item m q
@kindex m q (Folder)
@findex wl-fldmgr-clear-cut-entity-list
Clear the cut-list. (cut, copied folder information is cleared,
you cannot paste after this)
(@code{wl-fldmgr-clear-cut-entity-list})

@item m s
@kindex m s (Folder)
@findex wl-fldmgr-sort
Sort folders in the current folder group.
(@code{wl-fldmgr-sort})

@item m C-s
@kindex m C-s (Folder)
@findex wl-fldmgr-save
Save current folder view to the @file{wl-folders-file}.
(@code{wl-fldmgr-save})
@end table

[Following commands are only available on the access groups]

@table @kbd
@item u
@itemx m u
@kindex u (Folder)
@kindex m u (Folder)
@findex wl-fldmgr-unsubscribe
Set the visibility of folder (subscribe/unsubscribe).
(@code{wl-fldmgr-unsubscribe})

@item U
@itemx r u
@kindex U (Folder)
@kindex r u (Folder)
@findex wl-fldmgr-unsubscribe-region
Set the visibility of the folders (subscribe/unsubscribe) in the
specified region.
(@code{wl-fldmgr-unsubscribe-region})

@item l
@itemx m l
@kindex l (Folder)
@kindex m l (Folder)
@findex wl-fldmgr-access-display-normal
List folders that are currently available.
(@code{wl-fldmgr-access-display-normal})

@item L
@itemx m L
@kindex L (Folder)
@kindex m L (Folder)
@findex wl-fldmgr-access-display-all
List all folders regardless of the subscription status.
(@code{wl-fldmgr-access-display-all})
@end table


@subsection Customize variables

@table @code
@item  wl-interactive-save-folders
@vindex wl-interactive-save-folders
The initial setting is @code{t}.  If non-nil and folder view is
modified, confirm saving it before Wanderlust or Emacs exits.  If
@code{nil}, save without confirmation.

@item wl-fldmgr-make-backup
@vindex wl-fldmgr-make-backup
The initial setting is @code{t}.  If non-nil, @file{~/.folders.bak} is
created before saving the folder status.

@item wl-fldmgr-sort-function
@vindex wl-fldmgr-sort-function
The initial setting is @code{wl-fldmgr-sort-standard}.  A function to
sort folders.  By default function, folders are sorted alphabetically
and folder group is put on top (when @code{wl-fldmgr-sort-group-first}
is non-nil).

@item wl-fldmgr-sort-group-first
@vindex wl-fldmgr-sort-group-first
The initial setting is @code{t}.  If non-nil,
@code{wl-fldmgr-sort-standard} precedes folder group.  If @code{nil}, it
does not care whether it is folder group or not.

@item wl-folder-check-async
@vindex wl-folder-check-async
The initial setting is @code{t}.  If non-nil, check folder's unread
status asynchronously.  It boosts newsgroup checking.

@item wl-folder-check-fast
@vindex wl-folder-check-fast
The initial setting is @code{nil}.
If non-nil, it does not update folder status while checking.
@c it is obsolete?
@item wl-folder-notify-deleted
@vindex wl-folder-notify-deleted
The initial setting is @code{nil}.
@c  nil means?
If non-nil, negative value is displayed when the message is deleted.  If
@code{sync}, folder is synchronized when the message is deleted.  If
@code{nil}, message deletion is ignored.

@item wl-fldmgr-add-complete-with-current-folder-list
@vindex wl-fldmgr-add-complete-with-current-folder-list
The initial setting is @code{nil}.
Non-nil means call @code{elmo-folder-list-subfolders} and get completion
candidate for @code{wl-fldmgr-add}.
@end table

@subsection Miscellanea

Following is a note for folder editing.

@enumerate
@item
cut or copy stacks the folder in the @code{wl-fldmgr-cut-entity-list}.
paste(yank) command pastes the folders on one cut or copy command
(If copy command is executed by region, folders in the region are pasted
by one paste command)

@item
You cannot cut @samp{Desktop} group.
Also, you cannot paste folders at the outside of the @samp{Desktop}.

@item
You cannot copy folder group.

@item
Operations on the access group are only available for the folders
in the same access group.

@item
You cannot create a folder which has same name with the folders already exist.

@item
You cannot insert folders which have same name in one group.
You can insert them in the different groups.
You cannot put same nickname to the different folders.
@end enumerate


@node Summary, Message, Folder, Top
@chapter Summary Mode

After you select the folder via folder mode, you enter to the summary
mode.

@menu
* Usage of Summary Mode::       TIPS
* Thread Operations::           Thread operations
* Cache::                       File cache, Buffer cache, and Prefetch
* Auto Refile::                 Auto refile settings
* Sticky Summary::              Summary make sticky
* Summary View::                Format of summary lines
* Mark and Action::             Temporary marks and their effect
* Key Bindings of Summary::     Key bindings
* Variables of Summary::        Customize Summary Mode
@end menu


@node Usage of Summary Mode, Thread Operations, Summary, Summary
@section Usage (Tips)

@subsection Summary Content

In the summary mode, messages are displayed like following.

@example
@group
  377  09/16(Wed)11:57 [+1: Takuro Kitame  ] Bug?
  381  09/17(Thu)00:16 [+3: Fujikazu Okuni ] elmo-lha.el -- LHA interface
  384  09/17(Thu)01:32 [+1: Yuuichi Terani ] wl-0.6.2
  389 N09/18(Fri)01:07 [+2: Yuuichi Terani ] wl-0.6.3
@end group
@end example

Each line displays:

@example
@var{Message number}, @var{Temporal mark}, @var{Persistent mark}, @var{Date}, @var{Sender}, @var{Subject}
@end example

@noindent
If you want to know how to change the format for this, please refer
the section format of Summary lines.
@xref{Summary View}.

@var{Message number} is the message's unique number in the folder. In
the NNTP folder, it is article number, in the IMAP folder, it is UID and
in the MH folder, it is the filename of the message.

@var{Temporal mark} and @var{Persistent mark} are described later.

@var{Date} is displayed like @samp{@var{Month}/@var{Day}(@var{Week
Day})@var{Hour}:@var{Minute}}.  Default setting displays week day in
Japanese, but if you want to display it in English, set the value of
@code{wl-summary-weekday-name-lang} as @samp{en}.

@var{Sender}'s indentation corresponds to the depth of the thread.
Sender name is displayed as nickname if it is defined in the address
book.  Set @code{wl-use-petname} as @code{nil}, if you want to quit
displaying with nickname.

If number is printed at the head of @var{Sender} part like @samp{+2},
that means the message have 2 follow messages.

@var{Subject} is the @samp{Subject:} header field of the message.  If
the message have same @samp{Subject:} with the parent message, it is not
displayed.  Some mailing list puts its sequence number in the
@samp{Subject:} field, but it is
ignored. @code{wl-summary-no-subject-message} is displayed when the
message has empty subject field.

@subsection Temporary Marks
@cindex Mark, Temporary

There are seven temporary marks,
@samp{*}, @samp{d}, @samp{D}, @samp{o}, @samp{O}, @samp{i} and @samp{~}.
Temporary marks indicates message operations.

@table @samp
@item *
Target mark.
You can execute a command on the all messages that have @samp{*} mark,
with the key bindings which begins with @kbd{m}.

@item d
The mark to dispose. You can put @samp{d} by typing @kbd{d} key.

@item D
The mark to force delete. You can put @samp{D} by typing @kbd{D} key.

@item o
The mark to refile.
After you type @kbd{o} key, prompt appears to input refile destination.
Your answer is printed in the summary line.

@item O
The mark to refile.
You can put this mark by typing @kbd{O} key.
The difference between this mark and refile mark is,
this mark does not delete the message while latter does.

@item i
The mark to prefetch reserved.
You can put this mark by typing @kbd{i} key.

@item ~
The mark to resend reserved.
After you type @kbd{~} key, prompt appears to input address to resend.
Your answer is printed in the summary line.
@end table

@kbd{x} key executes action for temporary marks, respectively.

@subsection Persistent Marks

There are ten persistent marks, @samp{!}, @samp{N}, @samp{n}, @samp{U},
@samp{u}, @samp{A}, @samp{a}, @samp{F}, @samp{f} and @samp{$}.

The persistent mark indicates the message's status and it is saved.
Each persistent mark indicates:

@table @samp
@item N
It is new message.
@item n
It is new message. It differs from @samp{N} that message with @samp{n}
is already cached.
@item U
It is unread message.
@item u
It is unread message. It differs from @samp{U} that message with @samp{u}
is already cached.
@item !
It is message already read. It differs from message without mark that
message with @samp{!} is not cached yet.
@item A
It is already replied message.
@item a
It is already replied message. It differs from @samp{A} that message
with @samp{a} is already cached.
@item F
It is already forwarded message.
@item f
It is already forwarded message. It differs from @samp{F} that message
with @samp{f} is already cached.
@item $
It is a message with some global flag.  It is convenient to put this
mark on the messages to remember (If you want to remember to write a
reply for the message, for example) because this mark remains after
you exited Emacs.  Messages with the @samp{$} mark can be reviewed in
the @samp{'flag} folder even the message itself is deleted in the actual
folder. You can put global flag by typing @kbd{$} or @kbd{F} key.

@item None
If the message is read and cached (or local message),there are no
persistent mark.
@end table

@samp{N}, @samp{U}, @samp{!}, @samp{A}, @samp{F} indicates that the
message have no cache.  Messages with the marks other than these, you
can read them in the offline status even they are in the IMAP folder or
netnews folder.

Among messages with persistent marks, ones with marks specified by 
@code{wl-summary-expire-reserve-marks} are excluded from the expiration
(as a function of wanderlust) explained later. @xref{Expire and Archive}.

@subsection How To Read

Basically, you can read messages only typing space key again and again.

To update summary status to the newest status (synchronize),
type @kbd{s} key.

You can jump to next unread message by typing @kbd{N} key, and @kbd{n} key
moves cursor to the next message.
Enter message buffer by typing @kbd{j} key.
To operate multipart, you have to enter to the message buffer.
@xref{Message}.

@subsection Pack the Message Numbers
You can pack the message numbers in Summary by
@kbd{M-x wl-summary-pack-number}. Note that only MH Folder,
News Spool Folder and Maildir Folder are supported folder types.


@node Thread Operations, Cache, Usage of Summary Mode, Summary
@section Thread Operations

For example, the following line indicates one thread (a context of a topic).

@example
  384  09/17(Thu)01:32 [+1: Teranishi       ] wl-0.6.2
@end example

@noindent
If you type @kbd{/} on this line, the thread is opened and it changes
the appearance like following.

@example
@group
  384  09/17(Thu)01:32 [ Teranishi          ] wl-0.6.2
  388  09/17(Thu)22:34 +-[ Murata san         ]
@end group
@end example

(Message 388 is the replied message to the message 384.)
If you type @kbd{/} key once again, the thread is closed.
With prefix argument, @kbd{/} opens all children threads.

If you type @kbd{[}, opens all threads in summary.  @kbd{]} closes all
threads.

Commands with the key binding that begins with @kbd{t} executes commands
on the messages in the thread.
@xref{Key Bindings of Summary}.

@subsection reconstruct thread by hand

You can reconstruct the thread manually.  In Summary, @kbd{M-w}
(@code{wl-summary-save-current-message}) at the corresponding message,
and @kbd{C-y} (@code{wl-summary-yank-saved-message}) at the new parent
message then you have the reconstructed thread.


@node Cache, Auto Refile, Thread Operations, Summary
@section Cache

@subsection Cache File

The messages which have to access via network (e.x. IMAP, NNTP folder)
are cached as a local file so as to save network traffic or to enable
off-line operation.  The cache file is saved under the directory
@file{~/.elmo/cache}.  To expire cache, type @kbd{M-x
elmo-cache-expire-by-size}.  The command deletes cache files to the
specified size by the order of last accessed time.

@subsection Cache Filename

@vindex elmo-msgid-to-cache-max-length
@vindex elmo-msgid-to-cache-algorithm
A filename of cache file is generated from Message-ID with minimal
modification.  But if Message-ID is very long, cache file can't be
created.  To avoid it, filename's length is kept constant by hash
function when filename is longer than
@code{elmo-msgid-to-cache-max-length}'s value.  When the value of this
variable is @code{nil}, this feature is disabled.  An algorithm of hash
is indicated by @code{elmo-msgid-to-cache-algorithm}.

Changing the value of these variables, existing cache files may be
unused.

@subsection Buffer Cache and Prefetching

The messages that are read are kept in the cache buffer so as to make
the behavior fast when you are to read the message again.  It is called
`buffer cache'. The number of cache buffer is specified by
@code{wl-message-buffer-cache-size}.

There are message prefetching mechanism in the Wanderlust that
prefetches next message while you are reading.

You can control the message prefetching mechanism by these two
variables.

@table @code
@item wl-message-buffer-prefetch-folder-type-list
@vindex wl-message-buffer-prefetch-folder-type-list
The initial setting is @code{'(imap4 nntp)}.  If it is a list of folder
types, it specifies the folder types in which message prefetching is
enabled. In initial setting, messages are prefetch only in the nntp and
imap4 folders. In this case, multi folder that contains localdir and 
imap4 prefetches only imap4 messages. This variable precedes the value of
@code{wl-message-buffer-prefetch-folder-list}.
To prefetch messages in all folder types, specify @code{t}.

@item wl-message-buffer-prefetch-folder-list
@vindex wl-message-buffer-prefetch-folder-list
The initial setting is @code{nil}.
A list of regexp of folders to enable message prefetching.

@item wl-message-buffer-prefetch-depth
@vindex wl-message-buffer-prefetch-depth
The initial setting is 1. The number of messages for automatical prefetch.

@item wl-message-buffer-prefetch-idle-time
@vindex wl-message-buffer-prefetch-idle-time
The initial setting is 1 (in seconds). The period of automatical prefetch.

@item wl-message-buffer-prefetch-threshold
@vindex wl-message-buffer-prefetch-threshold
The initial setting is 30000 (bytes). If prefetching message has larger
size than this value, Wanderlust does not prefetch automatically.
If @code{wl-message-buffer-prefetch-threshold} is @code{nil}, 
the message is not checked for the size.

@item wl-auto-prefetch-first
@vindex wl-auto-prefetch-first
The initial setting is @code{nil}.
If non-nil, first message is automatically prefetched to the buffer
when you enter the folder.
@end table


@node Auto Refile, Sticky Summary, Cache, Summary
@section Auto Refile
@vindex elmo-msgdb-extra-fields
@vindex wl-refile-rule-alist
@findex wl-summary-auto-refile

You can refile messages automatically, by typing @kbd{C-o}
(@code{wl-summary-auto-refile}). It decides destination of refile by
the content of the message header information (information in the msgdb).

By default, @samp{From:}, @samp{Subject:}, @samp{To:} and @samp{Cc:} is
available.  If you want to decide destination by other header fields,
set the variable @code{elmo-msgdb-extra-fields} like following.

@lisp
@group
(setq elmo-msgdb-extra-fields
      '("x-ml-name"
        "reply-to"
        "sender"
        "mailing-list"
        "newsgroups"))
@end group
@end lisp

@noindent
By this setting, Wanderlust saves extra fields in the msgdb.  You have
to type @kbd{s all} to get extra fields for the messages that are
already in the summary.

Then, specify the refile rule.  The refile target folder of auto
refiling is decided by the value of @code{wl-refile-rule-alist}.
@code{wl-refile-rule-alist} is a list of a rule:

@example
@group
(@var{field} (@var{regexp} . @var{target})
       (@var{regexp} . @var{target})
       @dots{})
@end group
@end example

Each rule means `if @var{field} value matches @var{regexp},
then refile to @var{target} folder'.
The rule matched first is applied.

@var{field} is a string of field name.  You can specify a list of field name
string, too. In this case, if one of these fields is matched, then the
rule is fired (i.e. OR condition).

@var{regexp} is a regular expression for field value.  @var{target} is a target
folder string. You can specify a rule at @var{target} part, too.  In this
case, If the field value of the rule and the current rule is matched,
then the current rule is fired (i.e. AND condition).

You can refer matched substring of @var{regexp} to specify @var{target} part.
To refer substring, use following keys:

@table @samp
@item \&
means substitute original matched text.

@item \@var{N}
means substitute what matched the @var{N}th `\(@dots{}\)'.
(@var{N} is a number.)
@end table

Following is an example of @code{wl-refile-rule-alist}.

@lisp
@group
(setq wl-refile-rule-alist
      '(("x-ml-name"
         ("^Wanderlust" . "+wl")
         ("^Elisp" . "+elisp"))
        (("To" "Cc")
         ("\\([a-z]+\\)@@gohome\\.org" . "+\\1"))
        ("From"
         ("me@@gohome\\.org" . ("To" ("you@@gohome\\.org" .
                                    "+from-me-to-you"))))))
@end group
@end lisp

After these settings, refile marks are automatically put on the condition
matched messages by typing @kbd{C-o} (@code{wl-summary-auto-refile}).

Messages which have @code{wl-summary-auto-refile-skip-marks} is skipped
auto refiling.
By default, @samp{N}, @samp{U} and @samp{!} is specified, so the messages
with these persistent marks are not automatically refiled.
It means Wanderlust does not execute auto refile on unread messages by
the default setting.
To execute auto refile on all messages, set following.

@lisp
(setq wl-summary-auto-refile-skip-marks nil)
@end lisp


@node Sticky Summary, Summary View, Auto Refile, Summary
@section Sticky Summary
@cindex Summary, Sticky
@cindex Sticky Summary

The buffer of the `sticky summary' does not killed by typing @kbd{q}.

By entering the summary by typing @kbd{Shift RET} in Folder mode or
@kbd{G} in some summary sticky summary buffer is created.
Also typing @kbd{M-S} (@code{wl-summary-stick}) on the normal summary
makes current one sticky.

The buffer name of the sticky summary becomes like
@samp{Summary:@var{folder-name}}.
You can visit the sticky summary at any time by @kbd{C-x b}
(@code{switch-to-buffer}), or you can go round summary buffers by
@kbd{C-c C-n} (@code{wl-summary-previous-buffer}) and @kbd{C-c C-p}
(@code{wl-summary-next-buffer}) in summary mode.

In sticky summary, the summary buffer is preserved after @kbd{g} or
@kbd{q}.  To delete sticky summary, type @kbd{C-u q} to exit or move to
another summary by @kbd{C-u g}. Other operations in the sticky summary
are same as normal summary.

@code{wl-summary-always-sticky-folder-list} specifies the folders that
are automatically stuck.


@node Summary View, Mark and Action, Sticky Summary, Summary
@section Format of summary lines
@cindex Format of summary lines
@vindex wl-summary-line-format
@vindex wl-summary-line-format-spec-alist
@vindex wl-folder-summary-line-format-alist
@vindex wl-summary-default-number-column
@vindex wl-summary-number-column-alist

You can alter the format of lines in Summary mode.

Summary line format is specified by @code{wl-summary-line-format}.
You can use control strings defined by
@code{wl-summary-line-format-spec-alist}.

An example follows.

@lisp
@group
;; @r{number temporary-mark persistent-mark date branch}
;; @r{[ (number-of-children) sender ] subject}
(setq wl-summary-line-format "%n%T%P%M/%D(%W) %t%[%17(%c %f%) %] %s")
@end group
@end lisp

Where the number set the column number of the field. If negative value,
the column is filled from right. If the number begins with @samp{0},
@samp{0} is used for filling columns instead of @samp{ }.

Example:

@example
@group
%5l   -> `1    '
%-05l -> `00001'
@end group
@end example


Major control strings defined by @code{wl-summary-line-format-spec-alist}
are displayed in the following list.

@example
@group
%n  message number
%T  temporary mark
%P  persistent mark
%Y  year
%M  month
%D  day
%W  day of week
%h  hour
%m  minute
%t  branch of the thread
%[  [ (< for re-connected child)
%]  ] (> for re-connected child)
%f  sender
%s  subject
%S  size
%c  +number-of-children: (display only for opened thread)
%C  [+number-of-children] (display only for opened thread)
%#  mailing list information (`(' ML-name [ ` ' ML-number ] `)')
%l  number in the mailing list
%@@ `@@' only if the first MIME part is multipart/mixed
%~  ` ' only if previous column is not empty
@end group
@end example

If you want to change the width of message number (@samp{%n}), modify
@code{wl-summary-default-number-column} or
@code{wl-summary-number-column-alist}.

The temporary mark (@samp{%T}) and persistent mark (@samp{%P}) must
appear at the constant column. For example, if you specify @samp{%T} or
@samp{%P} after the @samp{%t}, which changes its length by thread
position, marks are not treated correctly.

If the format string is enclosed by @samp{%number(} and @samp{%)}, the
column of the enclosed region is justified to the `number'. Multiple
level @samp{%number(} parenthesis can be defined.  It is useful to
justify the column of the multiple control strings.  For example, in the
above @code{wl-summary-line-format},

@example
%17(%c %f%)
@end example

means ``Adjust number-of-children and sender string to the 17 column''.

You can specify the format by each folders with
@code{wl-folder-summary-line-format-alist}.  Please set regular
expression for folder names and summary line format as the following
example.

@lisp
@group
(setq wl-folder-summary-line-format-alist
      '(("^%" . "%T%P%M/%D(%W)%h:%m %t%[%17(%c %f%) %] %s")
        ("^+" . "%n%T%P%M/%D %[ %17f %] %t%C%s")))
@end group
@end lisp

@subsection on the format for sender name

The format string @samp{%f} displays the return value of the function specified
by @code{wl-summary-from-function}. If you use the function
@code{wl-summary-default-from} (default), it displays sender name ordinarily,
while displays the recipient names if the folder name matches with
@code{wl-summary-showto-folder-regexp} and the sender is yourself.
If the value of @code{wl-use-petname} is Non-nil, it uses petname to display.

For example, to display recipient names for the message in @samp{+backup} if
its sender is yourself, set up as follows.

@lisp
(setq wl-summary-showto-folder-regexp "^\\+backup$")
@end lisp


@node Mark and Action, Key Bindings of Summary, Summary View, Summary
@section Temporary marks and their effect
@cindex Mark and Action

You can define temporary marks and corresponding procedure by
@code{wl-summary-mark-action-list}.  Initially, refile (@samp{o}), copy
(@samp{O}), dispose (@samp{d}), delete (@samp{D}), prefetch (@samp{i})
and resend (@samp{~}) are defined.

Each element of @code{wl-summary-mark-action-list} consists of

@example
(@samp{MARK} @samp{SYMBOL}
 @samp{ARGUMENT-FUNCTION} @samp{SET-MARK-FUNCTION} @samp{EXEC-FUNCTION}
 @samp{FACE} @samp{DOC-STRING})
@end example

@samp{MARK} is a temporary mark string, and @samp{SYMBOL} is the name of
the action to be defined.  @samp{ARGUMENT-FUNCTION} is a function to
generate argument to be given to @samp{SET-MARK-FUNCTION}, which will be
described next, and it takes arguments:

@example
(@samp{ACTION} @samp{NUMBER})
@end example

Where @samp{ACTION} equals to @samp{SYMBOL}, and @samp{NUMBER} is message
number.  @samp{SET-MARK-FUNCTION} is a function to be called when the mark
is put. It takes arguments:

@example
(@samp{NUMBER} @samp{MARK} @samp{DATA})
@end example

Where @samp{NUMBER} is target message number, @samp{MARK} is a temporary
mark string, and @samp{DATA} is given by @samp{ARGUMENT-FUNCTION}.

@samp{EXEC-FUNCTION} is a function to be called when the action is
executed. Its argument is a list of @samp{MARK-INFO}.  Here @samp{MARK-INFO}
means a list consists of

@example
(@samp{NUMBER} @samp{MARK} @samp{DATA})
@end example

@samp{FACE} is a face to be used for highlighting.


@node Key Bindings of Summary, Variables of Summary, Mark and Action, Summary
@section Key bindings
@cindex Keybind, Summary Mode
@cindex Keybind, Summary Buffer

Key bindings of the summary mode are shown below.

@table @kbd
@item @key{SPC}
@kindex @key{SPC} (Summary)
@findex wl-summary-read
Proceed reading a message at the current cursor point.
(@code{wl-summary-read})

@item .
@kindex . (Summary)
@findex wl-summary-redisplay
Redisplay a message at the current cursor point with default display
type.  If this command is called with prefix argument, reload and redisplay
message regardless of the message cache.
If this command is called with twice multiples @kbd{C-u} as @kbd{C-u C-u .},
reload and redisplay message with current display type regardless of the
message cache.  (@code{wl-summary-redisplay})

@item <
@kindex < (Summary)
@findex wl-summary-display-top
Display the top message in the folder.
(@code{wl-summary-display-top})

@item >
@kindex > (Summary)
@findex wl-summary-display-bottom
Display the bottom message in the folder.
(@code{wl-summary-display-bottom})

@item @key{BS}
@itemx @key{DEL}
@kindex @key{BS} (Summary)
@kindex @key{DEL} (Summary)
Display the previous page of the message at the current cursor point.
@findex wl-summary-prev-page
(@code{wl-summary-prev-page})

@item @key{RET}
@kindex @key{RET} (Summary)
@findex wl-summary-enter-handler
Display the next line of the message at the current cursor point.
Display the message at the current cursor point if it is not displayed
yet.  (@code{wl-summary-next-line-content}) If prefix argument is
specified, message is scrolled up by one line.
(@code{wl-summary-prev-line-content}) If prefix argument is numeric,
cursor is jumped to the message with specified number.

@item -
@itemx M-@key{RET}
@kindex - (Summary)
@kindex M-@key{RET} (Summary)
@findex wl-summary-prev-line-content
Display the previous line of the message at the current cursor point.
Display the message at the current cursor point if it is not displayed yet.
(@code{wl-summary-prev-line-content})

@item /
@kindex / (Summary)
@findex wl-thread-open-close
Toggle open or close the thread at the current cursor point.
With prefix argument, open all children threads.
(@code{wl-thread-open-close})

@item [
@kindex [ (Summary)
Open all threads.
@findex wl-thread-open-all
(@code{wl-thread-open-all})

@item ]
@kindex ] (Summary)
Close all threads.
@findex wl-thread-close-all
(@code{wl-thread-close-all})

@item g
@kindex g (Summary)
@findex wl-summary-goto-folder
Go to other folder.
(@code{wl-summary-goto-folder})

@item c
@kindex c (Summary)
Mark all messages in the folder as read.
@findex wl-summary-mark-as-read-all
(@code{wl-summary-mark-as-read-all})

@item a
@kindex a (Summary)
@findex wl-summary-reply
Prepare a draft for reply the message at the current cursor point.
(@code{wl-summary-reply})

@item A
@kindex A (Summary)
@findex wl-summary-reply-with-citation
Prepare a draft for reply the message at the current cursor point.
(@code{wl-summary-reply-with-citation})

@item C
@kindex C (Summary)
@findex wl-summary-cancel-message
If the message at current cursor point is your own netnews article,
cancel it.
(@code{wl-summary-cancel-message})

@item E
@kindex E (Summary)
@findex wl-summary-reedit
Prepare a draft for re-editing the message at current cursor point.
If the message at current cursor point is your own netnews article,
a draft for `supersedes message' for the message is prepared.
(@code{wl-summary-reedit})

@item M-E
@kindex M-E (Summary)
@findex wl-summary-resend-bounced-mail
If the message at current cursor point is a bounced message,
a draft for re-sending original message is prepared.
(@code{wl-summary-resend-bounced-mail})

@item f
@kindex f (Summary)
@findex wl-summary-forward
A draft for forwarding the message at current cursor point is prepared.
(@code{wl-summary-forward})

@item $
@kindex $ (Summary)
@findex wl-summary-mark-as-important
Put @samp{important} flag on the message at current cursor point.
If already flagged as @samp{important}, remove the flag.  If it is
called with prefix argument, ask global flag to put similarly to @kbd{F}.
(@code{wl-summary-mark-as-important})

@item F
@kindex F (Summary)
@findex wl-summary-set-flags
Put arbitrary global flag entered in the minibuffer.  If you use Emacs
21 or later, you can specify multiple flags separated by @samp{,}
simultaneously.  If it is called with prefix argument, remove existent
global flags.
(@code{wl-summary-set-flags})

@item y
@itemx e
@kindex y (Summary)
@kindex e (Summary)
Save the message at current cursor point.
@findex wl-summary-save
(@code{wl-summary-save})

@item n
@kindex n (Summary)
@findex wl-summary-next
Move cursor to the next message.
If message is marked with a temporal mark in
@code{wl-summary-skip-mark-list}, cursor is not moved to it.
In the offline mode, cursor is not moved to the messages which are not cached
yet.
(@code{wl-summary-next})

@item p
@kindex p (Summary)
@findex wl-summary-prev
Move cursor to the previous message.
If message is marked with a temporal mark in
@code{wl-summary-skip-mark-list}, cursor is not moved to it.
In the offline mode, cursor is not moved to the messages which are not cached
yet.
(@code{wl-summary-prev})

@item N
@kindex N (Summary)
@findex wl-summary-down
Move cursor to the downward message which is unread or marked
as @samp{$}.
In the offline mode, cursor is not moved to the messages which are not cached
yet.
If there are messages which have target mark @samp{*} in the summary,
cursor is moved to the downward message which have a target mark.
This behavior is changed according to the value of @code{wl-summary-move-order}.
(@code{wl-summary-down})

@item P
@kindex P (Summary)
@findex wl-summary-up
Move cursor to the upward message which is unread or marked
as @samp{$}.
In the offline mode, cursor is not moved to the messages which are not cached
yet.
If there are messages which have target mark @samp{*} in the summary,
cursor is moved to the downward message which have a target mark.
This behavior is changed according to the value of @code{wl-summary-move-order}.
(@code{wl-summary-up})

@item w
@kindex w (Summary)
@findex wl-summary-write
Prepare a new draft.
(@code{wl-summary-write})

@item W
@kindex W (Summary)
@findex wl-summary-write-current-folder
Prepare a new draft.  If the current folder is NNTP folder,
@samp{Newsgroups:} field is completed.  If the current folder is mailing
list folder (refile destination), guess @samp{To:} field and completed
(If @code{wl-subscribed-mailing-list} is valid list)
(@code{wl-summary-write-current-folder})

@item H
@kindex H (Summary)
@findex wl-summary-toggle-all-header
Toggle display type between all and partial header fields and redisplay
the message at current cursor point.  If this command is called with
prefix argument, reload and redisplay message regardless of the message cache.
If this command is called with twice multiples @kbd{C-u} as @kbd{C-u C-u H},
set default display type of summary by current display type of header fields.
(@code{wl-summary-toggle-all-header})

@item M
@kindex M (Summary)
@findex wl-summary-toggle-mime
Toggle display type for MIME analysis and redisplay the message at
current cursor point.  A change is performed in the order set as
@code{wl-summary-display-mime-mode-list}.  If this command is called
with numeric prefix argument, it switch directly as follows.

@example
@group
1: Enable MIME analysis.
2: Enable MIME analysis only for header fields.
3: Disable MIME analysis.
@end group
@end example

If this command is called with twice multiples @kbd{C-u} as @kbd{C-u C-u
M}, set default display type of summary by current display type of MIME
analysis.  (@code{wl-summary-toggle-mime})

@item C-c C-f
@kindex C-c C-f (Summary)
@findex wl-summary-toggle-header-narrowing
Toggle header body narrowing of the message at current cursor point.
(@code{wl-summary-toggle-header-narrowing})

@item B
@kindex B (Summary)
@findex wl-summary-burst
If the message at current cursor point has
encapsulates multiple messages using MIME,
de-capsulate and extract them on the current folder.
If it is invoked in non-writable folder or it is called with prefix
argument, it asks the destination folder.
(@code{wl-summary-burst})

@item @@
@kindex @@ (Summary)
@findex wl-summary-edit-addresses
Append/change/delete the message's sender information to the address
book @file{~/.addresses} interactively.  If this command is called with
prefix argument, arbitrary address can be edited.
(@code{wl-summary-edit-petname})

@item Z
@kindex Z (Summary)
@findex wl-status-update
Sync up address book status with @file{~/.addresses}'s content.
(@code{wl-status-update})

@item |
@kindex | (Summary)
@findex wl-summary-pipe-message
Pipe current message's content to the external process.
(@code{wl-summary-pipe-message})

@item #
@kindex # (Summary)
@findex wl-summary-print-message
Print out current message's content.
It uses @code{ps-print} module.
If you don't use color printer, you might want to set
@code{wl-ps-print-buffer-function} to @code{ps-print-buffer}.

@lisp
(setq wl-ps-print-buffer-function 'ps-print-buffer)
@end lisp

(@code{wl-summary-print-message})

@item q
@kindex q (Summary)
@findex wl-summary-exit
Exit current folder.
(@code{wl-summary-exit})

@item j
@kindex j (Summary)
@findex wl-summary-jump-to-current-message
Jump cursor to the currently displayed message's window.
(@code{wl-summary-jump-to-current-message})

@item J
@kindex J (Summary)
Jump cursor to the other message.
@findex wl-summary-jump-to-msg
(@code{wl-summary-jump-to-msg})

@item I
@kindex I (Summary)
Update summary status and
prefetch all messages which have marks included in the
@code{wl-summary-incorporate-marks}.
@findex wl-summary-incorporate
(@code{wl-summary-incorporate})

@item M-j
@kindex M-j (Summary)
@findex wl-summary-jump-to-msg-by-message-id
Jump cursor to the message which have specified @samp{Message-Id:}.

@item ^
@kindex ^ (Summary)
Jump to parent message.
@findex wl-summary-jump-to-parent-message
(@code{wl-summary-jump-to-parent-message})

@item !
@kindex ! (Summary)
@findex wl-summary-mark-as-unread
Mark as unread the message at current cursor point.
(@code{wl-summary-mark-as-unread})

@item s
@kindex s (Summary)
@findex wl-summary-sync
Synchronize summary view after prompting the update range.
You can specify one of the follows.

@example
@group
all              Discard present msgdb and retrieve all informations.
                 Do not retrieve killed messages.
all-entirely     Discard present msgdb and retrieve all informations.
                 Retrieve killed messages, too.
update           Update the difference between informations in present
                 msgdb and in current folder instance.
                 Do not retrieve killed messages.
update-entirely  Update the difference between informations in present
                 msgdb and in current folder instance.
                 Retrieve killed messages, too.
rescan           Redisplay summary by rescanning present msgdb.
rescan-noscore   Redisplay summary by rescanning present msgdb.
                 Display messages killed by score, too.
rescan-thread    Redisplay summary by rescanning present msgdb.
                 Reconstruct thread, too.
cache-status     Sync the all marks with the real status of cache.
mark             Update marks.
no-sync          Do nothing.
first:NUM        Move to the filter folder(partial filter).
last:NUM         Move to the filter folder(partial filter).
@end group
@end example

@noindent
(@code{wl-summary-sync})

@item S
@kindex S (Summary)
@findex wl-summary-sort
Sort summary order.
You can sort by @samp{date}, @samp{from}, @samp{number}, @samp{subject},
@samp{size} and @samp{list-info}.
With prefix argument, sort summary lines into reverse order.
(@code{wl-summary-sort})

@item T
@kindex T (Summary)
@findex wl-summary-toggle-thread
Toggle the threading. The state will be preserved after exiting
Wanderlust. You can alter default state for newly created summary
by @code{wl-summary-default-view} or @code{wl-summary-default-view-alist}.
Threading status is displayed on the modeline.
@samp{@{S@}} means threading is off (Sequence) and
@samp{@{T@}} means threading is on (Thread).
(@code{wl-summary-toggle-thread})

@item l
@kindex l (Summary)
@findex wl-summary-toggle-disp-folder
Toggle displaying of folder window.
(@code{wl-summary-toggle-disp-folder})

@item v
@kindex v (Summary)
Toggle displaying of message window.
@findex wl-summary-toggle-disp-msg
(@code{wl-summary-toggle-disp-msg})

@item V
@kindex V (Summary)
Move to the virtual folder (filter folder) with the condition specified.
If called with prefix argument and current folder is virtual, exit it.
@findex wl-summary-virtual
(@code{wl-summary-virtual})

@item @key{TAB}
@kindex @key{TAB} (Summary)
@findex wl-summary-goto-last-displayed-msg
Jump to the message which is displayed last.
(@code{wl-summary-goto-last-displayed-msg})

@item ?
@kindex ? (Summary)
Put @samp{*} mark on the messages that satisfies the specified condition.
If messages already have @samp{*} mark, new @samp{*} marks are overridden.
If prefix argument is specified, current @samp{*} marks are removed and
new @samp{*} marks are appended.

@findex wl-summary-pick
(@code{wl-summary-pick})

@item R
@kindex R (Summary)
@findex wl-summary-mark-as-read
Mark as read the message at the current cursor point.
(@code{wl-summary-mark-as-read})

@item x
@kindex x (Summary)
Execute action for all temporary marks in the summary buffer.
@findex wl-summary-exec
(@code{wl-summary-exec})

@item *
@kindex * (Summary)
@findex wl-summary-target-mark-line
Put target mark on the message at the current cursor point.
(@code{wl-summary-target-mark-line}) @xref{Mark and Action}.

@item o
@kindex o (Summary)
Put refile mark on the message at the current cursor point.
@findex wl-summary-refile
(@code{wl-summary-refile}) @xref{Mark and Action}.

@item C-o
@kindex C-o (Summary)
Execute auto refile.
@findex wl-summary-auto-refile
(@code{wl-summary-auto-refile})

@item O
@kindex O (Summary)
Put copy mark on the message at the current cursor point.
@findex wl-summary-copy
(@code{wl-summary-copy}) @xref{Mark and Action}.

@item M-o
@kindex M-o (Summary)
Put refile mark on the message at the current cursor point with the destination
previously specified.
@findex wl-summary-refile-prev-destination
(@code{wl-summary-refile-prev-destination})

@item d
@kindex d (Summary)
@findex wl-summary-dispose
Put disposal mark on the message at the current cursor point.
The result of disposal is controlled by @code{wl-dispose-folder-alist},
refiled to @code{wl-trash-folder} by default.
(@code{wl-summary-dispose}) @xref{Mark and Action}.

@item D
@kindex D (Summary)
@findex wl-summary-delete
Put force deletion mark on the message at the current cursor point.
(@code{wl-summary-delete}) @xref{Mark and Action}.

@item i
@kindex i (Summary)
Put prefetch reservation mark on the message at the current cursor point.
@findex wl-summary-prefetch
(@code{wl-summary-prefetch}) @xref{Mark and Action}.

@item ~
@kindex ~ (Summary)
@findex wl-summary-resend
Put resend reservation mark on the message at the current cursor point.
(@code{wl-summary-resend}) @xref{Mark and Action}.

@item u
@kindex u (Summary)
@findex wl-summary-unmark
Unmark the temporal mark on the message at the current cursor point.
(@code{wl-summary-unmark})

@item U
@kindex U (Summary)
Unmark all the temporal marks.
@findex wl-summary-unmark-all
(@code{wl-summary-unmark-all})

@item r R
@kindex r R (Summary)
@findex wl-summary-mark-as-read-region
Mark as read messages in the specified region.
(@code{wl-summary-mark-as-read-region})

@item r $
@kindex r $ (Summary)
@findex wl-summary-mark-as-important-region
Put @samp{important} flag on messages in the specified region.
If already flagged as @samp{important}, remove the flag.
(@code{wl-summary-mark-as-important-region})

@item r F
@kindex r F (Summary)
@findex wl-summary-set-flags-region
Put arbitrary global flag entered in the minibuffer on messages in
specified region.
(@code{wl-summary-set-flags-region})

@item r !
@kindex r ! (Summary)
@findex wl-summary-mark-as-unread-region
Mark as unread messages in the specified region.
(@code{wl-summary-mark-as-unread-region})

@item r x
@kindex r x (Summary)
@findex wl-summary-exec-region
Execute action for each temporary marks on the messages in the
specified region.
(@code{wl-summary-exec-region})

@item r *
@kindex r * (Summary)
@findex wl-summary-target-mark-region
Put target mark on the messages in the specified region.
(@code{wl-summary-target-mark-region}) @xref{Mark and Action}.

@item r o
@kindex r o (Summary)
@findex wl-summary-refile-region
Put refile mark on the messages in the specified region.
(@code{wl-summary-refile-region}) @xref{Mark and Action}.

@item r O
@kindex r O (Summary)
@findex wl-summary-copy-region
Put copy mark on the messages in the specified region.
(@code{wl-summary-copy-region}) @xref{Mark and Action}.

@item r d
@kindex r d (Summary)
@findex wl-summary-dispose-region
Put disposal mark on the messages in the specified region.
(@code{wl-summary-dispose-region}) @xref{Mark and Action}.

@item r D
@kindex r D (Summary)
@findex wl-summary-delete-region
Put force deletion mark on the messages in the specified region.
(@code{wl-summary-delete-region}) @xref{Mark and Action}.

@item r i
@kindex r i (Summary)
@findex wl-summary-prefetch-region
Put prefetch reservation mark on messages in the specified region.
(@code{wl-summary-prefetch-region}) @xref{Mark and Action}.

@item r u
@kindex r u (Summary)
@findex wl-summary-unmark-region
Delete temporal mark on the messages in the specified region.
(@code{wl-summary-unmark-region})

@item r y
@kindex r y (Summary)
Save messages in the specified region.
@findex wl-summary-save-region
(@code{wl-summary-save-region})

@item t R
@kindex t R (Summary)
@findex wl-thread-mark-as-read
Mark as read messages which are the descendant of the current thread.
With prefix argument, it affects on the all messages in the thread tree.
(@code{wl-thread-mark-as-read})

@item t $
@kindex t $ (Summary)
@findex wl-thread-mark-as-important
Put @samp{important} flag on the messages which are the descendant of
the current thread.  If already flagged as @samp{important}, remove the
flag.  With prefix argument, it affects on the all messages in the
thread tree.
(@code{wl-thread-mark-as-important})

@item t F
@kindex t F (Summary)
@findex wl-thread-set-flags
Put arbitrary global flag entered in the minibuffer on the messages
which are the descendant of the current thread.  With prefix argument,
it affects on the all messages in the thread tree.
(@code{wl-thread-set-flags})

@item t !
@kindex t ! (Summary)
@findex wl-thread-mark-as-unread
Mark as unread messages which are the descendant of the current thread.
With prefix argument, it affects on the all messages in the thread tree.
(@code{wl-thread-mark-as-unread})

@item t x
@kindex t x (Summary)
@findex wl-thread-exec
Execute action for temporary marks on the messages which are
the descendant of the current thread.  With prefix argument, it affects
on the all messages in the thread tree.
(@code{wl-thread-exec})

@item t *
@kindex t * (Summary)
@findex wl-thread-target-mark
Put target mark @samp{*} on the messages which are the descendant of the
current thread.  With prefix argument, it affects on the all messages in
the thread tree.
(@code{wl-thread-target-mark}) @xref{Mark and Action}.

@item t o
@kindex t o (Summary)
@findex wl-thread-refile
Put refile mark on the messages which are the descendant of the current thread.
With prefix argument, it affects on the all messages in the thread tree.
(@code{wl-thread-refile}) @xref{Mark and Action}.

@item t O
@kindex t O (Summary)
@findex wl-thread-copy
Put copy mark on the messages which are the descendant of the current thread.
With prefix argument, it affects on the all messages in the thread tree.
(@code{wl-thread-copy}) @xref{Mark and Action}.

@item t d
@kindex t d (Summary)
@findex wl-thread-dispose
Put disposal mark on the messages which are the descendant of the current thread.
With prefix argument, it affects on the all messages in the thread tree.
(@code{wl-thread-dispose}) @xref{Mark and Action}.

@item t D
@kindex t D (Summary)
@findex wl-thread-delete
Put force deletion mark on the messages which are the descendant of the
current thread.
(@code{wl-thread-delete}) @xref{Mark and Action}.

@item t i
@kindex t i (Summary)
@findex wl-thread-prefetch
Put prefetch reservation mark on messages which are the descendant of
the current thread.
(@code{wl-thread-prefetch}) @xref{Mark and Action}.

@item t u
@kindex t u (Summary)
@findex wl-thread-unmark
Unmark temporal mark on the messages which are the descendant of the
current thread. With prefix argument, it affects on the all messages in
the thread tree.
(@code{wl-thread-unmark})

@item t y
@kindex t y (Summary)
@findex wl-thread-save
Save messages which are the descendant of the current thread.
With prefix argument, it affects on the all messages in the thread tree.
(@code{wl-thread-save})

@item m R
@kindex m R (Summary)
@findex wl-summary-target-mark-mark-as-read
Mark as read all messages which have target mark @samp{*}.
(@code{wl-summary-target-mark-mark-as-read})

@item m $
@kindex m $ (Summary)
@findex wl-summary-target-mark-mark-as-important
Put @samp{important} flag on all messages which have target mark @samp{*}.
If already flagged as @samp{important}, remove the flag.
(@code{wl-summary-target-mark-mark-as-important})

@item m F
@kindex m F (Summary)
@findex wl-summary-target-mark-set-flags
Put arbitrary global flag entered in the minibuffer on all messages
which have target mark @samp{*}.
(@code{wl-summary-target-mark-set-flags})

@item m !
@kindex m ! (Summary)
@findex wl-summary-target-mark-mark-as-unread
Mark as unread all messages which have target mark @samp{*}.
(@code{wl-summary-target-mark-mark-as-unread})

@item m o
@kindex m o (Summary)
@findex wl-summary-target-mark-refile
Put refile mark on the messages which have target mark @samp{*}.
(@code{wl-summary-target-mark-refile}) @xref{Mark and Action}.

@item m O
@kindex m O (Summary)
@findex wl-summary-target-mark-copy
Put copy mark on the messages which have target mark @samp{*}.
(@code{wl-summary-target-mark-copy}) @xref{Mark and Action}.

@item m d
@kindex m d (Summary)
@findex wl-summary-target-mark-dispose
Put disposal mark on the messages which have target mark @samp{*}.
(@code{wl-summary-target-mark-dispose}) @xref{Mark and Action}.

@item m D
@kindex m D (Summary)
@findex wl-summary-target-mark-delete
Put force deletion mark on the messages which have target mark @samp{*}.
(@code{wl-summary-target-mark-delete}) @xref{Mark and Action}.

@item m i
@kindex m i (Summary)
@findex wl-summary-target-mark-prefetch
Put prefetch reservation mark on messages which have target mark @samp{*}.
(@code{wl-summary-target-mark-prefetch}) @xref{Mark and Action}.

@item m y
@kindex m y (Summary)
@findex wl-summary-target-mark-save
Save messages which have target mark @samp{*}.
(@code{wl-summary-target-mark-save})

@item m u
@kindex m u (Summary)
Unmark all temporal marks.
(@code{wl-summary-delete-all-temp-marks})
@findex wl-summary-delete-all-temp-marks

@item m a
@kindex m a (Summary)
Put target mark @samp{*} on the all messages.
(@code{wl-summary-target-mark-all})
@findex wl-summary-target-mark-all

@item m t
@kindex m t (Summary)
Put target mark @samp{*} on the messages in the current thread.
@findex wl-summary-target-mark-thread
(@code{wl-summary-target-mark-thread})

@item m T
@kindex m T (Summary)
Put target mark @samp{*} on all the messages of the threads which
contain already target marked message.
@findex wl-summary-target-mark-threads
(@code{wl-summary-target-mark-threads})

@item m r
@kindex m r (Summary)
@findex wl-summary-target-mark-region
Put target mark @samp{*} on the messages in the specified region.
(@code{wl-summary-target-mark-region})

@item m A
@kindex m A (Summary)
@findex wl-summary-target-mark-reply-with-citation
Prepare a draft which cites all messages which have target mark @samp{*}.
(@code{wl-summary-target-mark-reply-with-citation})

@item m f
@kindex m f (Summary)
@findex wl-summary-target-mark-forward
Prepare a draft which forwards all messages which have target mark @samp{*}.
(@code{wl-summary-target-mark-forward})

@item m U
@kindex m U (Summary)
@findex wl-summary-target-mark-uudecode
Uudecode the messages which have target mark @samp{*}.
(@code{wl-summary-target-mark-uudecode})

@item m ?
@kindex m ? (Summary)
@findex wl-summary-target-mark-pick
Pick messages from the @samp{*} marked messages.
That is, @samp{*} marks on the messages are remained
if the specified condition is satisfied.
(@code{wl-summary-target-mark-pick})

@item m #
@kindex m # (Summary)
@findex wl-summary-target-mark-print
Print out all messages which have target mark @samp{*}.
(@code{wl-summary-target-mark-print})

@item m |
@kindex m | (Summary)
@findex wl-summary-target-mark-pipe
Pipe content of each message with target mark @samp{*} to some specified
external process.
(@code{wl-summary-target-mark-pipe})

@item M-t
@kindex M-t (Summary)
@findex wl-toggle-plugged
Toggle offline/online status of Wanderlust.
(@code{wl-toggle-plugged})

@item C-t
@kindex C-t (Summary)
Start Wanderlust's plug-status manager.
(@code{wl-plugged-change})

@item C-c C-o
@kindex C-c C-o (Summary)
@findex wl-jump-to-draft-buffer
Move to the draft buffer if available.  If multiple draft buffer exists,
moved to one after another.  If prefix argument is specified, load draft
folder's message to the draft buffer and jump to it.
(@code{wl-jump-to-draft-buffer})

@item M-w
@kindex M-w (Summary)
@findex wl-summary-save-current-message
Save the message at the current cursor point.
(@code{wl-summary-save-current-message})

@item C-y
@kindex C-y (Summary)
@findex wl-summary-yank-saved-message
Regard the message at the current cursor point as
parent, connect the message saved by
@code{wl-summary-save-current-message}
to the thread.
(@code{wl-summary-yank-saved-message})

@item C-x C-s
@kindex C-x C-s (Summary)
@findex wl-summary-save-status
Save the current summary.
(@code{wl-summary-save-status})
@end table


@node Variables of Summary,  , Key Bindings of Summary, Summary
@section Customiziable variables

@table @code
@item wl-summary-move-order
@vindex wl-summary-move-order
The initial setting is @code{unread}.  Specify cursor moving policy.  If
you want to precede new messages, set @code{new}.  If you want to
precede unread messages, set @code{unread}.  If @code{nil}, proceed to
next message.

@item wl-auto-select-first
@vindex wl-auto-select-first
The initial setting is @code{nil}.
If non-nil, first message is automatically displayed when you enter
the folder.

@item wl-auto-select-next
@vindex wl-auto-select-next
The initial setting is @code{nil}. This controls behavior when there is
no unread message in current summary.

@example
nil: asks whether you want to go back to folder mode
'unread: asks whether you want to go to next unread folder
  If the next one comes to be possessing no unread message
  by treatment of cross-posted messages or Scoring, then
  asks whether you want to go to next to next folder.
'skip-no-unread: similar as unread
  But does not ask before going to next to next folder.
otherwise: asks whether you want to go to next unread folder
@end example

It might be useful to set @code{'skip-no-unread} for people who
want to continue reading by just pressing and pressing space key.

@item wl-thread-insert-opened
@vindex wl-thread-insert-opened
The initial setting is @code{nil}.
If non-nil, thread is inserted as opened.

@item wl-thread-open-reading-thread
@vindex wl-thread-open-reading-thread
The initial setting is @code{t}.  If non-nil, reading thread is
automatically opened though it is closed thread.

@item wl-summary-exit-next-move
@vindex wl-summary-exit-next-move
The initial setting is @code{t}.  If non-nil, move to next folder at
summary exit.

@item wl-folder-move-cur-folder
@vindex wl-folder-move-cur-folder
The initial setting is @code{nil}.  If non-nil, cursor position on the
folder is moved.

@item wl-summary-weekday-name-lang
@vindex  wl-summary-weekday-name-lang
Specify language of the weekday.
@samp{en} displays English, @samp{fr} displays French, @samp{de}
displays Deutsch. You should rescan summary view after changing this value.

@item wl-summary-fix-timezone
@vindex wl-summary-fix-timezone
The initial setting is @code{nil}.
Time zone of the date string in summary mode is adjusted using this value.
If @code{nil}, it is adjust to the default time zone information
(system's default time zone or environment variable @samp{TZ}).

@item wl-use-petname
@vindex  wl-use-petname
The initial setting is @code{t}.
If non-nil, sender part displays nickname.

@item wl-break-pages
@vindex  wl-break-pages
The initial setting is @code{t}.
If non-nil, message is split as pages by @samp{^L}.

@item wl-summary-from-function
@vindex wl-summary-from-function
Format function to display sender in summary.
The initial setting is @code{wl-summary-default-from}.

@item wl-summary-no-from-message
@vindex  wl-summary-no-from-message
The initial setting is @samp{nobody@@nowhere?}.  A string which is
displayed when there's no @samp{From:} field in the message.

@item wl-summary-subject-function
@vindex wl-summary-subject-function
Format function to display subject in summary.
The initial setting is @code{wl-summary-default-subject} and
it will cut the list name part etc. on the top of the subject.
To display subject as it is, set as follows.

@lisp
(setq wl-summary-subject-function 'identity)
@end lisp

@item wl-summary-no-subject-message
@vindex  wl-summary-no-subject-message
The initial setting is @samp{(WL:No Subject in original.)}.  A string
which is displayed when there's no @samp{Subject:} field in the message.

@item wl-summary-default-view
@vindex wl-summary-default-view
The initial setting is @code{'thread}.
The default state for newly created summary. You can set either
@code{'thread} for thread view or @code{'sequence} for sequential view.

@item wl-summary-order
@vindex wl-summary-order
The initial setting is @code{'ascending}.
Specify order of messages in summary buffer.
Note that messages in a thread are always listed in ascending order
even if this value is @code{'descending}.

@item wl-summary-nobreak-char-display
@vindex wl-summary-nobreak-char-display
The initial setting is @code{nil}.
@code{nobreak-char-display} is overridden by this value in Summary
buffer.

@item wl-summary-use-frame
@vindex wl-summary-use-frame
The initial setting is @code{nil}.
If non-nil, use new frame for the summary.

@item wl-use-folder-petname
@vindex  wl-use-folder-petname
The initial setting is the list shown below:

@lisp
@group
(modeline)
@end group
@end lisp

@noindent
A list of display policy (symbol) of folder nickname.  Available symbols
are:

@table @code
@item modeline
Display folder petname on modeline.
@item ask-folder
Destination folder is notified as nickname if
@code{wl-auto-select-next} is non-nil.
@item read-folder
You can input folder name by nickname in the function
@code{wl-summary-read-folder}.
@end table

@item wl-summary-move-direction-toggle
@vindex  wl-summary-move-direction-toggle
The initial setting is @code{t}.  If non-nil, last executed @kbd{p},
@kbd{P}, @kbd{n}, @kbd{N} toggles the direction of cursor move.  If you
want to aware of reading direction, set this to @code{t}.

@item wl-summary-width
@vindex  wl-summary-width
The initial setting is 80.
Width of summary line. If @code{nil}, summary line's width is as is.

@item wl-summary-print-argument-within-window
@vindex wl-summary-print-argument-within-window
The initial setting is @code{nil}.
If non-nil, the action argument is always printed on right side of
window.

@item wl-summary-indent-length-limit
@vindex  wl-summary-indent-length-limit
The initial setting is 46.
Specify the limit of thread indent level. @code{nil} means unlimited
indent level.
If you set this to @code{nil} you should set @code{wl-summary-width}
to @code{nil}, too.

@item wl-summary-max-thread-depth
@vindex wl-summary-max-thread-depth
The initial setting is 15.
If thread depth of the message is larger than this value,
the thread is divided.

@item wl-summary-recenter
@vindex  wl-summary-recenter
The initial setting is t.
If non-nil, cursor point is moved to the center of the summary window.

@item wl-summary-max-thread-depth
@vindex wl-summary-max-thread-depth
The initial setting is 30.
If thread depth is larger than this value, divide it.

@item wl-summary-divide-thread-when-subject-changed
@vindex wl-summary-divide-thread-when-subject-changed
The initial setting is @code{nil}.  If non-nil, thread is split if
the subject is changed.

@item wl-summary-search-via-nntp
@vindex wl-summary-search-via-nntp
The initial setting is @code{confirm}.

If non-nil and @code{wl-summary-jump-to-msg-by-message-id} failed, call
@code{wl-summary-jump-to-msg-by-message-id-via-nntp} and search message
from the NNTP server @code{elmo-nntp-default-server}.  The value of
@code{elmo-nntp-default-user}, @code{elmo-nntp-default-port},
@code{elmo-nntp-default-stream-type} are used.

If @code{confirm}, server name can be specified. You can specify NNTP
folder format like @samp{-:username@@servername:119!}.

@item wl-summary-keep-cursor-command
@vindex wl-summary-keep-cursor-command
The initial setting is the list shown below:

@lisp
@group
(wl-summary-goto-folder wl-summary-goto-last-visited-folder)
@end group
@end lisp

@noindent
When you entered to summary by these commands and the target summary
buffer already exists, summary status is not automatically updated and
cursor position is saved.

@item elmo-folder-update-threshold
@vindex elmo-folder-update-threshold
The initial setting is 500.  If updated message number is larger than
this value, confirm whether drop them or not (in the case where the value
of @code{elmo-folder-update-confirm} is non-nil).

@item elmo-folder-update-confirm
@vindex elmo-folder-update-confirm
The initial setting is @code{t}. If the value is non-nil, do check with
@code{elmo-folder-update-threshold}.

@item wl-summary-always-sticky-folder-list
@vindex wl-summary-always-sticky-folder-list
The initial setting is @code{nil}.
@code{wl-summary-always-sticky-folder-list} specifies the folders that
are automatically stuck. Each element is regexp of folder name.

@item wl-summary-reserve-mark-list
@vindex wl-summary-reserve-mark-list
The initial setting is the list shown below:

@lisp
@group
("o" "O" "D" "d" "i")
@end group
@end lisp

@noindent
If a message is already marked as temporal marks in this list, the
message is not marked by any mark command.

@item wl-summary-skip-mark-list
@vindex wl-summary-skip-mark-list
The initial setting is the list shown below:

@lisp
@group
("D" "d")
@end group
@end lisp

@noindent
If a message is already marked as temporal marks in this list, the
message is skipped at cursor move.

@item elmo-message-fetch-threshold
@vindex elmo-message-fetch-threshold
The initial setting is 30000 (bytes).  If displaying message has larger
size than this value, Wanderlust confirms whether fetch the message or
not (in the case where the value of @code{elmo-message-fetch-confirm}
is non-nil).

@item elmo-message-fetch-confirm
@vindex elmo-message-fetch-confirm
The initial setting is @code{t}. If the value is non-nil, do check with
@code{elmo-message-fetch-threshold}.

@item wl-prefetch-threshold
@vindex wl-prefetch-threshold
The initial setting is 30000 (bytes). If prefetching message has larger
size than this value and @code{wl-prefetch-confirm} is non-nil,
Wanderlust confirms whether prefetch the message or not.  If
@code{wl-prefetch-threshold} is @code{nil}, the message is prefetched
without confirmation.

@item wl-prefetch-confirm
@vindex wl-prefetch-confirm
The initial setting is @code{t}. If non-nil, Wanderlust confirms whether
prefetch the message or not if the message has larger size than
@code{wl-prefetch-threshold}.

@item elmo-imap4-use-cache
@vindex elmo-imap4-use-cache
The initial setting is @code{t}.  If non-nil, messages read via IMAP4
are cached.

@item elmo-nntp-use-cache
@vindex elmo-nntp-use-cache
The initial setting is @code{t}.  If non-nil, messages read via NNTP are
cached.

@item elmo-pop3-use-cache
@vindex elmo-pop3-use-cache
The initial setting is @code{t}.  If non-nil, messages read via POP3 are
cached.

@item elmo-shimbun-use-cache
@vindex elmo-shimbun-use-cache
The initial setting is @code{t}.  If non-nil, messages read in Shimbun
folders are cached.

@item wl-summary-resend-use-cache
@vindex wl-summary-resend-use-cache
The initial setting is @code{nil}.  If non-nil, messages are resend
using cache even in the offline status. Note that if you use cache,
the message identity is not guaranteed.

@item wl-folder-process-duplicates-alist
@vindex wl-folder-process-duplicates-alist
The initial setting is @code{nil}.
This list determines how to deal with duplicated messages in the same folder.
Each item in the list is regexp of folder name and action; you can specify any
one of the following in the place of action:

@example
@code{nil} : do nothing for duplicated messages.
@code{hide} : hide duplicated messages from the summary.
@code{read} : set duplicated messages as read.
@end example

@noindent
Following is an example (hide duplicated messages in multi folders)

@lisp
@group
(setq wl-folder-process-duplicates-alist
                 '(("^\\+draft$" . nil) ("^\\+trash$" . nil)
                   ("^\\*.*" . hide) (".*" . read)))
@end group
@end lisp

@item wl-summary-flag-alist
@vindex wl-summary-flag-alist
The initial setting is as follows:

@lisp
@group
((important "orange"))
@end group
@end lisp

Specify the color and the mark of message in summary buffer with flag.
If the mark are omitted, the mark specified in the variable
@code{wl-summary-flag-mark} is assumed.  If multiple global flags are on
one message, the former flag in this list is preferred.

Example:

@lisp
@group
(setq wl-summary-flag-alist
      '((important "purple")
        (todo "red")
        (business "green" "B")
        (private "blue" "X")))
@end group
@end lisp

@item wl-summary-display-mime-mode-list
@vindex wl-summary-display-mime-mode-list
The initial setting is the list shown below:

@lisp
@group
(mime as-is)
@end group
@end lisp

@noindent
The function @code{wl-summary-toggle-mime} switch specification of MIME
analysis in the order of this list. You can specify one of the follows.

@example
@code{mime}        : Header and body are decoded.
@code{header-only} : Only header is decoded.
@code{as-is}       : Header and body are not decoded.
@end example
@end table


@node Message, Draft, Summary, Top
@chapter Message Buffer

Message Buffers utilize MIME-View mode of SEMI.  For operational
procedures and key bindings, refer to respective documents.
@xref{MIME-View, , ,mime-ui-en, a MIME user interface for GNU Emacs}.
You can also see help by @kbd{?} in message buffer.

@kbd{p} at the top of a message or @kbd{n} at the bottom of a message
brings you back to Summary mode.  @kbd{l} toggles display of Summary
mode buffer.

@section Key Bindings

@table @kbd

@item l
@kindex l (Message)
@findex wl-message-toggle-disp-summary
Toggles display of Summary buffer.
(@code{wl-message-toggle-disp-summary})

@item Button-2
@findex wl-message-button-refer-article
@kindex Button-2 (Message)
Assumes @samp{Message-ID:} at the mouse pointer, and shows the
corresponding message if found.
(@code{wl-message-button-refer-article})

@item Button-4 (upward movement of a wheel)
@kindex Button-4 (Message)
@findex wl-message-wheel-down
Scrolls the message backwards.  When the top of the message is hit,
moves to the previous message.
(@code{wl-message-wheel-down})

@item Button-5 (downward movement of a wheel)
@kindex Button-5 (Message)
@findex wl-message-wheel-up
Scrolls the message forward.  When the bottom of the message is hit,
moves to the next message.
(@code{wl-message-wheel-up})

@item D
@kindex D (Message)
@findex wl-message-delete-current-part
Delete the part under cursor. In fact it appends modified message to
the current folder then moves old one to trash folder. Therefore the
message number will be changed.
(@code{wl-message-delete-current-part})
@end table

@section Customizable Variables

@table @code
@item wl-message-window-size
@vindex wl-message-window-size
Initial setting is @code{(1 . 4)}.  It is a cons cell and the ratio of
its car and cdr value corresponds to the ratio of Summary and Message
windows.

@item wl-message-ignored-field-list
@vindex wl-message-ignored-field-list
Initial setting is @code{nil}.
All fields that match this list will be hidden in message buffer.
Each elements are regexp of field-name.
If @code{nil}, the value of @code{mime-view-ignored-field-list} is used.

@item wl-message-visible-field-list
@vindex wl-message-visible-field-list
Initial setting is @code{nil}.
All fields that match this list will be display in message buffer.
Each elements are regexp of field-name. This value precedes
@code{wl-message-ignored-field-list}.
If @code{nil}, the value of @code{mime-view-visible-field-list} is used.

@item wl-message-sort-field-list
@vindex wl-message-sort-field-list
Initial setting is
'("Return-Path" "Received" "^To" "^Cc" "Newsgroups" "Subject" "^From").
Header fields in message buffer are ordered by this value.
Each elements are regexp of field-name.

@item wl-message-truncate-lines
@vindex wl-message-truncate-lines
The initial value is the value of @code{default-truncate-lines}.
If it is non-nil, truncate long lines in message buffer.

@item wl-message-auto-reassemble-message/partial
@vindex wl-message-auto-reassemble-message/partial
The initial setting is @code{nil}.
If non-nil, automatically reassemble fragments of the message on
displaying when its MIME media type is message/partial.
@end table

@node Draft, Disconnected Operations, Message, Top
@chapter Draft Buffer

At Summary mode, pressing @kbd{w} and the like creates a new draft
buffer.  You can edit and send mail and news articles in this buffer.

By pressing @kbd{W}, Wanderlust guess addressees and prepare draft buffer
with those if possible.

@menu
* Usage of Draft Mode::         TIPS
* Key Bindings of Draft::       Key bindings
* Variables of Draft Mode::     Customize Draft Mode
@end menu

@node Usage of Draft Mode, Key Bindings of Draft, Draft, Draft
@section Tips

Basically it is Emacs-standard mail mode.

@menu
* Parameters for Sending::
* Editing Header::
* Editing Message Body and Sending::
* Dynamical Message Re-arrangement::
* Template::
* POP-before-SMTP::
@end menu

@node Parameters for Sending, Editing Header, Usage of Draft Mode, Usage of Draft Mode
@subsection Parameters for Sending

According to the information of servers to send messages, configure
following variables.

@table @code
@item wl-smtp-posting-server
The name of the SMTP server used for mail transmission.

@item wl-smtp-posting-port
The SMTP port number for mail transmission.
Without configuration, use default SMTP port number (25).

@item wl-nntp-posting-server
The name of NNTP server used for news submission.
Without configuration, use @code{elmo-nntp-default-server}.

@item wl-nntp-posting-port
The NNTP port number for news submission.
Without configuration, use @code{elmo-nntp-default-port}.
@end table

You may configure following variables on demand. See section
Variables of Draft Mode for detail @xref{Variables of Draft Mode}.

@table @code
@item wl-smtp-posting-user
User name for authentication by SMTP AUTH.

@item wl-smtp-authenticate-type
The authentication method for SMTP AUTH.
Without configuration, authentication will not be carried out.

@item wl-smtp-authenticate-realm
The authentication realm for SMTP AUTH.
Without configuration, authentication realm will not be specified.

@item wl-smtp-connection-type
Specify how to establish SMTP connections.

@item wl-nntp-posting-user
User name for AUTHINFO authentication on news submission.

@item wl-nntp-posting-stream-type
Specify how to establish NNTP connections.
@end table

@node Editing Header, Editing Message Body and Sending, Parameters for Sending, Usage of Draft Mode
@subsection Editing Message Header

You can freely edit header region above @samp{--text follows this line--},
until you invoke the sending operation.

Initially, the cursor is at the @samp{To:} field.  Fill in recipients
addresses.  @kbd{@key{TAB}} completes them.

You can use following headers to specify recipients. Add some of them
by yourself. Field names can be completed by @kbd{@key{TAB}}.

@table @asis
@item @samp{Newsgroups:}
Specify newsgroups to which you post the news article.

@item @samp{Cc:}
Specify addresses to send a copy (Carbon Copy) of the message.
@end table

Following ones are removed from the header contents before sending.

@table @asis
@item @samp{Bcc:}
Specify addresses to send a copy (Blind Carbon Copy) of the message.

@item @samp{Fcc:}
Specify folders in which a copy of the message is saved.

@item @samp{Ecc:}
Specify recipients to send encapsulated copy of the message.
@end table

You can add initial headers by following variables.

@table @code

@item wl-fcc
@vindex wl-fcc
The initial setting is @code{nil}.
If non-nil, the value of this variable is inserted as a @samp{Fcc:} of
the draft when it is prepared.  If function is specified, its return
value is used.

@item wl-bcc
@vindex wl-bcc
The initial setting is @code{nil}.
If non-nil, the value of this variable is inserted as a @samp{Bcc:} of
the draft when it is prepared.
@end table

@node Editing Message Body and Sending, Dynamical Message Re-arrangement, Editing Header, Usage of Draft Mode
@subsection Editing Messages and Sending

As a matter of course, editing message body can be performed in the same
way as usual writing. You may write message body under
@samp{--text follows this line--} line. (NOTE: Be sure to leave the line
@samp{--text follows this line--} intact.)

Multi-part editing utilize MIME edit mode of SEMI.  For procedures of
editing, refer to respective documents.  @xref{MIME-Edit, , ,mime-ui-en,
a MIME user interface for GNU Emacs}.
You can also see help by @kbd{C-c C-x ?} in draft buffer.

If you save the draft buffer you are editing, it is appended to the
draft folder specified by @code{wl-draft-folder}.  You can leave draft
buffer after storing it for future editing by @kbd{C-c C-z}
(@code{wl-draft-save-and-exit}) and resume editing by pressing @kbd{E}
(@code{wl-summary-reedit}) in the draft folder (@pxref{Key Bindings of
Summary}).

If you have finished editing, you can send message by @kbd{C-c C-c}.


@node Dynamical Message Re-arrangement, Template, Editing Message Body and Sending, Usage of Draft Mode
@subsection Dynamic Modification of Messages
@vindex wl-draft-config-alist
@c @cindex Change Message
@c @cindex Message, Change Dynamic

You can set @code{wl-draft-config-alist} so that header and body of the
message will automatically modified depending on information of header
and others.

The initial setting of @code{wl-draft-config-alist} is @code{nil}.

In the example below, the header is modified when
@code{wl-draft-send-and-exit} or @code{wl-draft-send} is invoked.  You
can set @code{wl-interactive-send} to non-nil so as to confirm changes
before sending the message.

@lisp
@group
(setq wl-draft-config-alist
      '(((string-match "aaa\\.example\\.com$" (system-name))
         ;; @r{applied if the expression is non-nil}
         (wl-smtp-posting-server . "mailserver-B")
         (wl-nntp-posting-server . "newsserver-B")
         ;; @r{settings of temporary variables}
         )
        ("^To: .*user@@aaa\\.bbb\\.example\\.com"
         ;; @r{applied if it matches the header of the draft buffer}
         ("Organization" . (format "Go %s" my-webpage)))
                       ;; @r{you can write elisp expressions here (eval only)}
         (top . "Hello.\n")    ;; @r{inserted at the top of the body}
         (bottom . "\nBye.\n") ;; @r{inserted at the bottom of the body}
        ))
@end group
@end lisp

The format of @code{wl-draft-config-alist} is:

@example
@group
'(("@var{regexp of the header}" or @var{elisp expression}
  ("@var{Field}" . value(@var{elisp expression}))
   (@var{variable} . value(@var{elisp expression}))
   (@var{sub-function} . value(@var{elisp expression}))
   @var{function}
   @dots{})
  ("@var{regexp of the header}" or @var{elisp expression}
   ("@var{Field}" . value(@var{elisp expression}))
   @dots{}))
@end group
@end example

Per default, there are 13 following sub-functions.

@example
'header:      Inserts the specified string at the bottom of the header.
'header-top:  Inserts the specified string at the top of the header.
'header-file: Inserts the specified file at the bottom of the header.
'x-face:      Inserts @samp{X-Face:} field with the content of the specified file.
'top:         Inserts the specified string at the top of the body.
'top-file:    Inserts the specified file at the top of the body.
'body:        Replaces the body with the specified string.
              Specifying @code{nil} deletes the entire body string.
'body-file:   Replaces the body with the content of the specified file.
'bottom:      Inserts the specified string at the bottom of the body.
'bottom-file: Inserts the specified file at the top of the body.
'part-top:  Inserts the specified string at the top of the current part.
'part-bottom: Inserts the specified string at the bottom of the current part.
'template:    Applies the specified template.
              (refer to the next subsection)
@end example

These are defined in @code{wl-draft-config-sub-func-alist} and you can
change them or add your own functions.  If you read the code, you can
easily find how to write the functions.

At the first of each item, @var{a regular expression of the header} or
an @var{elisp expression} should be specified.  In the case of an elisp
expression, the item is applied when the expression is evaluated
non-nil.

Per default, when multiple items match or are evaluated non-nil, all
such items are applied, but if you set a variable
@code{wl-draft-config-matchone} to @code{t}, only the first matching one
is applied.

At the second of the item, a cons or a list of functions should be
specified.  The car part of the cons should be a header field, a
variable, or a sub-function.  When a header field is specified, the
field will be modified.  If a variable is specified, the value of the
variable will be modified temporarily.

In the cdr part of a cons, not only a variable but also an elisp
expression can be specified as is.  If the car part is a header field
and the cdr part is @code{nil}, the field will be deleted.

See the next example as well:

@lisp
@group
(setq wl-draft-config-alist
      '((reply                         ;; @r{(1)}
         "X-ML-Name: \\(Wanderlust\\|emacs-mime-ja\\|apel-ja\\)"
         ;; @r{applied if it matches the header of the buffer being replied}
         (body . "  Hello.\n")
         (template . "default")
         )))
@end group
@end lisp

As in the (1) above, if a header regexp is prepended with @code{reply},
it is applied when the draft is prepared by @code{wl-summary-reply} for
example, and when it matches the header being replied.  It is ignored
when there is no buffer being replied, like after @code{wl-draft} was
invoked.

If you want to use name of parent folder, you can refer the buffer local
variable @code{wl-draft-parent-folder}. In the following example, Wanderlust
changes From according to the folder name of the summary in which the draft
was invoked.

@lisp
@group
(setq wl-draft-config-alist
      '(((string-match \".*@@domain1$\" wl-draft-parent-folder)
         (\"From\" . \"user@@domain1\"))
        ((string-match \".*@@domain2$\" wl-draft-parent-folder)
         (\"From\" . \"user@@domain2\"))))
@end group
@end lisp


Note that @code{wl-draft-config-alist} is applied only once when
@code{wl-draft-send-and-exit} or @code{wl-draft-send} is invoked.
Therefore, if you want to apply @code{wl-draft-config-alist} again after
aborting transmission, execute @kbd{C-c C-e}
(@code{wl-draft-config-exec}) explicitly.

If you don't want to apply @code{wl-draft-config-alist} when
@code{wl-draft-send-and-exit} or @code{wl-draft-send} is invoked,
do the following:

@lisp
(remove-hook 'wl-draft-send-hook 'wl-draft-config-exec)
@end lisp

If you want to apply @code{wl-draft-config-alist} when a draft buffer is
prepared, do the following:

@lisp
(add-hook 'wl-mail-setup-hook 'wl-draft-config-exec)
@end lisp

If you want to apply @code{wl-draft-config-alist} when you re-edit a mail
from summary mode by typing @kbd{E}(@code{wl-summary-reedit}), do the
following:

@lisp
(add-hook 'wl-draft-reedit-hook 'wl-draft-config-exec)
@end lisp

@node Template, POP-before-SMTP, Dynamical Message Re-arrangement, Usage of Draft Mode
@subsection Inserting Templates
@cindex Template
@cindex Apply Template

Set a variable @code{wl-template-alist}, and type @kbd{C-c C-j} or
@kbd{M-x wl-template-select} in the draft buffer.

The format of @code{wl-template-alist} is almost the same as
@code{wl-draft-config-alist}.
@xref{Dynamical Message Re-arrangement}.

@lisp
@group
(setq wl-template-alist
      '(("default"
         ("From" . wl-from)
         ("Organization" . "Example Co.Ltd.")
         (body . "Hello.\n"))
        ("report"
         (template . "default")                 ;; @r{(a)}
         ("To" . "boss@@example.com")
         ("Subject" . "Report")
         (body-file . "~/work/report.txt")
         )
        ))
@end group
@end lisp

As you can see, the only difference is item (template) names such as
@samp{default} and @samp{report}, instead of a regexp of header.
Because definition of each item is the same as
@code{wl-draft-config-alist}, you can call another template, like (a).

Executing the command @code{wl-template-select} results in template
selection, but the result differs depending on variable
@code{wl-template-visible-select}.

If @code{wl-template-visible-select} is @code{t} (default), a buffer
window is shown below the draft buffer.  You can select a template by
@kbd{n} and @kbd{p} seeing the buffer window.

Press the @key{RET} key and the template is actually applied to the draft
buffer.  If you press @kbd{q}, nothing is applied.  In addition, you can
adjust the window size by @code{wl-template-buffer-lines}.

If @code{wl-template-visible-select} is @code{nil}, you should type the
name of the template in the mini buffer.

If @code{wl-template-select} is executed with prefix argument,
inversed value of @code{wl-template-visible-select} is used.

As shown in the example in @code{wl-draft-config-alist}, you can select
@samp{default} template by writing:

@lisp
(template . "default")
@end lisp

@node POP-before-SMTP,  , Template, Usage of Draft Mode
@subsection Sending mail by POP-before-SMTP
@cindex POP-before-SMTP

You can send mail by POP-before-SMTP. Necessary setting is

@lisp
(setq wl-draft-send-mail-function 'wl-draft-send-mail-with-pop-before-smtp)
@end lisp

@noindent
to change mail posting function from its default value @code{wl-draft-send-mail-with-smtp}.
Also you would configure following variables on demand.

@table @code
@item wl-pop-before-smtp-user
The POP user name for POP-before-SMTP authentication.
If unset, @code{elmo-pop3-default-user} is used.

@item wl-pop-before-smtp-server
The POP server name for POP-before-SMTP authentication.
If unset, @code{elmo-pop3-default-server} is used.

@item wl-pop-before-smtp-authenticate-type
The POP authentication method for POP-before-SMTP authentication.
If unset, @code{elmo-pop3-default-authenticate-type} is used.

@item wl-pop-before-smtp-port
The POP port number for POP-before-SMTP authentication.
If unset, @code{elmo-pop3-default-port} is used.

@item wl-pop-before-smtp-stream-type
If @code{ssl}, POP connection is established using SSL.  If
@code{starttls}, STARTTLS (RFC2595) connection will be established.  If
unset, @code{elmo-pop3-default-stream-type} is used.
@end table

If variables for POP-before-SMTP (@code{wl-pop-before-smtp-*}) are
unset, settings for POP folders (@code{elmo-pop3-default-*}) are
used.
Therefore, if SMTP server and POP server are actually the same, and if
POP folder per default (such as @samp{&}) is available, no settings are
required.

Refer to the following URL about POP-before-SMTP.

@example
@group
@uref{http://www.iecc.com/pop-before-smtp.html}
@end group
@end example


@node Key Bindings of Draft, Variables of Draft Mode, Usage of Draft Mode, Draft
@section Key Bindings
@cindex Keybind, Draft Mode
@cindex Keybind, Draft Buffer

@table @kbd

@item C-c C-y
@kindex C-c C-y (Draft)
@findex wl-draft-yank-original
Cites the content of the current message buffer (the part under cursor).
If the region is active, cites the region (it affects only if
@code{transient-mark-mode} is Non-nil).
If the command is called with prefix argument,
the text inserted by yank command (the text content of clipboard) is cited.
(@code{wl-draft-yank-original})

@item C-c C-p
@kindex C-c C-p (Draft)
@findex wl-draft-preview-message
Previews the content of the current draft.
This is useful for previewing MIME multi-part messages.
(@code{wl-draft-preview-message})

@item C-c C-s
@kindex C-c C-s (Draft)
@findex wl-draft-send
Sends the content of the current draft.  Does not erase the draft buffer.
This is useful for sending multiple messages, which are a little different
from each other.
(@code{wl-draft-send})

@item C-c C-c
@kindex C-c C-c (Draft)
@findex wl-draft-send-and-exit
Sends the content of the current draft and erases the draft buffer.
(@code{wl-draft-send-and-exit})

@item C-x C-s
@kindex C-x C-s (Draft)
@findex wl-draft-save
Save the current draft.
(@code{wl-draft-save})

@item C-c C-k
@kindex C-c C-k (Draft)
@findex wl-draft-kill
Kills the current draft.
(@code{wl-draft-kill})

@item C-x k
@kindex C-x k (Draft)
@findex wl-draft-mimic-kill-buffer
Kills the current draft.
(@code{wl-draft-mimic-kill-buffer})

@item C-c C-z
@kindex C-c C-z (Draft)
@findex wl-draft-save-and-exit
Saves the current draft, and erases the draft buffer.
This is useful if you want to suspend editing of the draft.
(@code{wl-draft-save-and-exit})

@item C-c C-r
@kindex C-c C-r (Draft)
@findex wl-caesar-region
Encodes or decodes the specified region in Caesar cipher.
(@code{wl-caesar-region})

@item C-l
@kindex C-l (Draft)
@findex wl-draft-highlight-and-recenter
Recenter and rehighlight current draft.
(@code{wl-draft-highlight-and-recenter})

@item M-t
@kindex M-t (Draft)
@findex wl-toggle-plugged
Toggles off-line/on-line states of Wanderlust.
(@code{wl-toggle-plugged})

@item C-c C-o
@kindex C-c C-o (Draft)
@findex wl-jump-to-draft-buffer
Jumps to the other draft buffer, if exists.
With prefix argument, reads a file (if any) from the draft folder when
there is no such buffer.
(@code{wl-jump-to-draft-buffer})

@item C-c C-e
@kindex C-c C-e (Draft)
@findex wl-draft-config-exec
Applies @code{wl-draft-config-alist}.
(@code{wl-draft-config-exec})

@item C-c C-j
@kindex C-c C-j (Draft)
@findex wl-template-select
Selects a template.
(@code{wl-template-select})

@item C-c C-a
@kindex C-c C-a (Draft)
@findex wl-addrmgr
Enter Address Manager.
@xref{Address Manager}.
(@code{wl-addrmgr})

@item C-c C-d
@kindex C-c C-d (Draft)
@findex wl-draft-elide-region
Elide the text between point and mark (@code{wl-draft-elide-region}).
The text is killed and replaced with the contents of the variable
@code{wl-draft-elide-ellipsis}.  The default value is to use an ellipsis
(@samp{[...]}).
@end table

@node Variables of Draft Mode,  , Key Bindings of Draft, Draft
@section Customizable Variables
@cindex SMTP AUTH

@table @code
@item wl-subscribed-mailing-list
@vindex wl-subscribed-mailing-list
The initial setting is @code{nil}.  Mailing lists to which you
subscribe.  If any of these are contained in @samp{To:} or @samp{Cc:}
field of a reply draft, removes your own address from
@samp{Mail-Followup-To:} and @samp{Cc:}.  And if any of these are
contained in @samp{To:} or @samp{Cc:} field of a message to be
automatically re-filed, the destination folder will be leaned in
connection with the address.

Example:

@lisp
@group
(setq wl-subscribed-mailing-list
      '("wl@@ml.gentei.org"
        "apel-ja@@m17n.org"
        "emacs-mime-ja@@m17n.org"))
@end group
@end lisp

@item wl-insert-mail-followup-to
@vindex wl-insert-mail-followup-to
The initial setting is @code{nil}.  If non-nil, @samp{Mail-Followup-To:}
field is automatically inserted in the draft buffer.

@item wl-insert-mail-reply-to
@vindex wl-insert-mail-reply-to
The initial setting is @code{nil}.  If non-nil, @samp{Mail-Reply-To:}
field is automatically inserted in the draft buffer.

@item wl-auto-insert-x-face
@vindex wl-auto-insert-x-face
The initial setting is @code{t}.  If non-nil and there is an encoded
X-Face string in a file @file{~/.xface} (the value of the variable
@code{wl-x-face-file}), inserts it as an @samp{X-Face:} field in the
draft buffer.  If @code{nil}, it is not automatically inserted.

@item wl-insert-message-id
@vindex wl-insert-message-id
The initial setting is @code{t}.  If non-nil, @samp{Message-ID:} field
is automatically inserted on the transmission.

@item wl-message-id-use-message-from
@vindex wl-message-id-use-message-from
The initial setting is @code{t}.  If non-nil, the value of @samp{From:}
field or @code{wl-from} will be used as the domain part of
@samp{Message-ID:}.

@item wl-local-domain
@vindex wl-local-domain
The initial setting is @code{nil}.  If @code{nil}, the return value of
the function @code{system-name} will be used as the domain part of
@samp{Message-ID:}.

If @code{system-name} does not return FQDN (i.e. the full name of the
host, like @samp{smtp.gohome.org}), you @strong{must} set this variable
to the string of the local domain name without hostname (like
@samp{gohome.org}).  That is, a concatenation of @code{system-name}
@samp{.} @code{wl-local-domain} is used as domain part of the
@samp{Message-ID:}.

If your terminal does not have global IP, set the value of
@code{wl-message-id-domain}.  (You might be beaten up on the Net News if
you use invalid @samp{Message-ID:}.)

Moreover, concatenation of @code{system-name} @samp{.}
@code{wl-local-domain} will be used as an argument to the HELO command
in SMTP.

@item wl-message-id-domain
@vindex wl-message-id-domain
The initial setting is @code{nil}.  If non-nil, this value is used as a
domain part of the @samp{Message-ID:}.  If your terminal does not have
global IP address, set unique string to this value (e.x. your e-mail
address).

@item wl-unique-id-suffix
@vindex wl-unique-id-suffix
The initial setting is @samp{.wl}. You can specify the string in generated
Message-ID which appear just before @samp{@@} or @samp{%}.

@item wl-draft-config-alist
@vindex wl-draft-config-alist
The initial setting is @code{nil}.  Modifies the draft message just
before the transmission.  The content of @code{wl-draft-config-alist}
will be automatically applied only once on the transmission.  If you
want to apply it manually, use @kbd{C-c C-e}.  This command can be used
many times.

@item wl-template-alist
@vindex wl-template-alist
The initial setting is @code{nil}.
This variable specifies the template to be applied in the draft buffer.

@item wl-draft-config-matchone
@vindex wl-draft-config-matchone
The initial setting is @code{nil}.  If non-nil, only the first matching
item is used when @code{wl-draft-config-alist} is applied.  If
@code{nil}, all matching items are used.

@item wl-template-visible-select
@vindex wl-template-visible-select
The initial setting is @code{t}.
If non-nil, you can preview the result of the template selection in
another window.

@item wl-template-confirm
@vindex wl-template-confirm
The initial setting is @code{nil}.
If non-nil, asks for confirmation when you press the enter key to select
template while previewing.

@item wl-template-buffer-lines
@vindex wl-template-buffer-lines
The initial setting is 7.
If @code{wl-template-visible-select} is non-nil, this variable specifies
the size of the preview window.

@item wl-draft-buffer-style
@vindex wl-draft-buffer-style
The initial setting is @code{full}.
Style of draft buffer window (except for replying and forwarding).

@table @code
@item keep
is to use the current window,

@item full
is to use full frame window,

@item split
is to split the current window vertically and use it.

@item msg-split
is to split the message window vertically and use it as if
replying message.

@item split-horiz
is to split the current window horizontally and use it.

@item msg-split-horiz
is to split the message window horizontally and use it as if
replying message.
@end table

If some function is specified, it is called with the draft buffer
as an argument.

@item wl-draft-reply-buffer-style
@vindex wl-draft-reply-buffer-style
The initial setting is @code{split}.
Style of draft buffer for replying and forwarding.

@table @code
@item keep
is to use the message buffer window,

@item full
is to use full frame window,

@item split
is to split the message buffer window vertically and use it.

@item split-horiz
is to split the message buffer window horizontally and use it.
@end table

If some function is specified, it is called with the draft buffer
as an argument.

@item wl-draft-use-frame
@vindex wl-draft-use-frame
The initial setting is @code{nil}.
If non-nil, use new frame for the draft.

@item wl-draft-reply-default-position
@vindex wl-draft-reply-default-position
The initial setting is @code{body}.
Specify initial cursor position on draft buffer for reply.
@code{body} is to move cursor to the top of the message body,
@code{bottom} to the bottom of the message body, and @code{top} to the
top of the header.

@item wl-draft-truncate-lines
@vindex wl-draft-truncate-lines
The initial value is the value of @code{default-truncate-lines}.
If it is non-nil, truncate long lines in draft buffer.

@item wl-from
@vindex wl-from
The initial setting is the value of the variable
@code{user-mail-address}.  The value of this variable is inserted as a
@samp{From:} field of the draft when it is prepared.

@item wl-envelope-from
@vindex wl-envelope-from
The initial setting is @code{nil}.
The value of this variable is used for envelope from (MAIL FROM).
If @code{nil}, the address part of @code{wl-from} is used.

@item wl-user-mail-address-list
@vindex wl-user-mail-address-list
The initial setting is @code{nil}.
This is the User's address list.  If you have multiple addresses,
set this variable.

@item wl-reply-subject-prefix
@vindex wl-reply-subject-prefix
The initial setting is @samp{Re: }.
In the @samp{Subject:} of the reply draft, this string is prepended to
the @samp{Subject:} of being replied.  You can specify a function to be
message buffer of the reply target.

@item wl-forward-subject-prefix
@vindex wl-forward-subject-prefix
The initial setting is @samp{Forward: }.
In the @samp{Subject:} of the forwarding draft, this string is prepended
to the @samp{Subject:} of being forwarded.  You can specify a function
to be message buffer of the forward target.

@item wl-draft-reply-use-address-with-full-name
@vindex wl-draft-reply-use-address-with-full-name
The initial setting is @code{t}.
If non-nil, insert her full name with address when prepare a draft for
reply a message.  If it is @code{nil}, insert her address only.

@item wl-draft-enable-queuing
@vindex wl-draft-enable-queuing
The initial setting is @code{t}.
This flag controls off-line transmission.  If non-nil, the draft is
sent off-line.

@item wl-draft-use-cache
@vindex wl-draft-use-cache
The initial setting is @code{nil}. If the value is non-nil and
@code{wl-insert-message-id} is nil, cache the message which is sent.

@item wl-fcc-force-as-read
@vindex wl-fcc-force-as-read
The initial setting is @code{nil}. If the value is non-nil,
Mark as read the message saved by @samp{Fcc:}.

@item wl-auto-flush-queue
@vindex wl-auto-flush-queue
The initial setting is t.
This flag controls automatic transmission of the queue when Wanderlust
becomes on-line.  If non-nil, the queue is automatically transmitted
(with confirmation by @code{y-or-n-p}).  If you want to transmit it
manually, press @kbd{F} in the folder mode.

@item wl-ignored-forwarded-headers
@vindex wl-ignored-forwarded-headers
Initial setting is @samp{\\(received\\|return-path\\|x-uidl\\)}.
All headers that match this regexp will be deleted when forwarding a message.

@item wl-ignored-resent-headers
Initial setting is @samp{\\(return-receipt\\|[bdf]cc\\)}.
All headers that match this regexp will be deleted when resending a message.

@item wl-draft-always-delete-myself
@vindex wl-draft-always-delete-myself
If non-nil, always removes your own address from @samp{To:} and
@samp{Cc:} when you are replying to the mail addressed to you.

@item wl-draft-delete-myself-from-bcc-fcc
@vindex wl-draft-delete-myself-from-bcc-fcc
If any of @code{wl-subscribed-mailing-list} are contained in @samp{To:}
or @samp{Cc:} field, do not insert @samp{Bcc:} or @samp{Fcc:} field.

@item wl-draft-send-mail-function
@vindex wl-draft-send-mail-function
The initial setting is @code{wl-draft-send-mail-with-smtp}.
This is the function to post mails. To use POP-before-SMTP, set this to
@code{wl-draft-send-mail-with-pop-before-smtp}.

@item wl-smtp-posting-server
@vindex wl-smtp-posting-server
The initial setting is @code{nil}.
This is the SMTP server name for mail transmission.

@item wl-smtp-posting-port
@vindex wl-smtp-posting-port
The initial setting is @code{nil}.
This is the SMTP port number for mail transmission.
If @code{nil}, default SMTP port number (25) is used.

@item wl-smtp-posting-user
@vindex wl-smtp-posting-user
The initial setting is @code{nil}.
This is the user name for SMTP AUTH authentication.

@item wl-smtp-authenticate-type
@vindex wl-smtp-authenticate-type
The initial setting is @code{nil}.
This string-valued variable specifies the authentication method for SMTP
AUTH authentication.  You may specify @code{plain}, @code{cram-md5},
@code{digest-md5}, @code{login}, etc.  If @code{nil}, authentication
will not be carried out.

@item wl-smtp-authenticate-realm
@vindex wl-smtp-authenticate-realm
The initial setting is @code{nil}.
This string-valued variable specifies the authentication realm for SMTP
AUTH authentication. You have to set this variable for DIGEST-MD5
authentication and so on.
If @code{nil}, authentication realm is not specified in the authentication.

@item wl-smtp-connection-type
@vindex wl-smtp-connection-type
The initial setting is @code{nil}.
This symbol-valued variable specifies how to establish SMTP connections.
If @code{nil}, use default connection type.
If it is @code{starttls}, use STARTTLS (RFC3207).
If it is @code{ssl}, use SSL.

@item wl-nntp-posting-server
@vindex wl-nntp-posting-server
The initial setting is @code{nil}.
This is the NNTP server name used for news submission.
If @code{nil}, @code{elmo-nntp-default-server} is used.

@item wl-nntp-posting-user
@vindex wl-nntp-posting-user
The initial setting is @code{nil}.
This is the user name for AUTHINFO authentication on news submission.
If @code{nil}, @code{elmo-nntp-default-user} is used.
If it is still @code{nil}, AUTHINFO authentication will not be carried out.

@item wl-nntp-posting-port
@vindex wl-nntp-posting-port
The initial setting is @code{nil}.
This is the port number of the NNTP server used for news submission.
If @code{nil}, @code{elmo-nntp-default-port} is used.

@item wl-nntp-posting-stream-type
@vindex wl-nntp-posting-stream-type
The initial setting is @code{nil}.
If @code{nil}, @code{elmo-nntp-default-stream-type} is evaluated.  If @code{ssl},
SSL is used for news submission.  If @code{starttls}, STARTTLS (RFC2595)
connection will be established.

@item wl-nntp-posting-function
@vindex wl-nntp-posting-function
The initial setting is @code{elmo-nntp-post}.
This is the function to post NNTP message.

@item wl-nntp-posting-config-alist
@vindex wl-nntp-posting-config-alist
The initial setting is @code{nil}.
The value takes an alist to define NNTP server like following example.
It takes precedence over @code{wl-nntp-posting-@{server|user|port|function@}}.

@lisp
@group
(setq wl-nntp-posting-config-alist
      '((",?gmane\\." . "news.gmane.org")
        (",?comp\\." .
         ((server . "news-server")
          (user . "newsmaster")
          (port . 119)
          (function . elmo-nntp-post)))
        (".*" . "default-news-server")))
@end group
@end lisp

@item wl-pop-before-smtp-user
@vindex wl-pop-before-smtp-user
The initial setting is @code{nil}.
This is the POP user name for POP-before-SMTP.
If it is @code{nil}, @code{elmo-pop3-default-user} is used.

@item wl-pop-before-smtp-server
@vindex wl-pop-before-smtp-server
The initial setting is @code{nil}.
This is the POP server name for POP-before-SMTP.
If it is @code{nil}, @code{elmo-pop3-default-server} is used.

@item wl-pop-before-smtp-authenticate-type
@vindex wl-pop-before-smtp-authenticate-type
The initial setting is @code{nil}.
This is the authentication method for POP-before-SMTP authentication.
If it is @code{nil}, @code{elmo-pop3-default-authenticate-type} is used.

@item wl-pop-before-smtp-port
@vindex wl-pop-before-smtp-port
The initial setting is @code{nil}.
This is the POP port number for POP-before-SMTP.  If it is @code{nil},
@code{elmo-pop3-default-port} is used.

@item wl-pop-before-smtp-stream-type
@vindex wl-pop-before-smtp-stream-type
The initial setting is @code{nil}.
This flag controls the use of SSL for POP-before-SMTP.  If it is
@code{nil}, @code{elmo-pop3-default-stream-type} is used.  If @code{ssl},
SSL is used.  If @code{starttls}, STARTTLS (RFC2595) connection will be
established.

@item wl-draft-queue-save-variables
@vindex wl-draft-queue-save-variables
Specifies a list of variable to which queued messages are saved on the
off-line transmission.

@item wl-draft-sendlog
@vindex wl-draft-sendlog
The initial setting is @code{t}.
If @code{t}, transmission log is written in @file{~/.elmo/sendlog}.  It
is written when:

@itemize @minus
@item drafts are sent by smtp or qmail
@item saved into folders by fcc
@item saved into folders by queuing
@end itemize

(it is written even if the transmission fails).
But transmission by @file{im-wl.el} is not written in the @file{sendlog}
and left to the logging function of @command{imput}.


@item wl-draft-sendlog-max-size
@vindex wl-draft-sendlog-max-size
The initial setting is 20000 (in bytes).
If @code{wl-draft-sendlog} is @code{t}, the log is rotated when it grows
beyond the size specified by this variable.

@item wl-use-ldap
@vindex wl-use-ldap
The initial setting is @code{nil}.
If non-nil, address completion uses LDAP.

@item wl-ldap-server
@vindex wl-ldap-server
The initial setting is @samp{localhost}.
LDAP server name for address completion.

@item wl-ldap-port
@vindex wl-ldap-port
The initial setting is @code{nil}.
If non-nil, the value is used as port number.

@item wl-ldap-base
@vindex wl-ldap-base
The initial setting is @samp{c=US}.
LDAP search starting point (base) for address completion.

@item wl-draft-remove-group-list-contents
@vindex wl-draft-remove-group-list-contents
The initial setting is @code{t}.
If non-nil, remove the group-lists' members in the recipients when
sending the message (group-list means the description such as
@samp{Group: foo@@gohome.org, bar@@gohome.org;} in the recipients).
@end table

@node Disconnected Operations, Expire and Archive, Draft, Top
@chapter Off-line Management
@cindex Disconnected Operations

Wanderlust has on-line and off-line states.

@menu
* Off-line State::              Wanderlust has on-line and off-line states
* Enable Operations::           Enable Disconnected Operations
* Plugged Mode::                Switching On-line/Off-line per Server/Port
* Off-line State settings::     Invoking Wanderlust in the Off-line State
* Variables of Plugged Mode::   Customize Plugged Mode
@end menu


@node Off-line State, Enable Operations, Disconnected Operations, Disconnected Operations
@section Off-line State

Wanderlust has on-line and off-line states.  In the off-line state, you
cannot access messages via network, unless they are cached.

@samp{[ON]} in the mode line indicates the on-line state.  @samp{[--]}
in the mode line indicates the off-line state.  In folder or summary
modes, press @kbd{M-t} to switch between off- and on-line.

You can invoke Wanderlust in the off-line state by setting
@code{wl-plugged} to @code{nil} in @file{~/.wl} or anything appropriate.

In the off-line mode, @kbd{n} and @kbd{p} command in the summary mode
ignores uncached messages.


@node Enable Operations, Plugged Mode, Off-line State, Disconnected Operations
@section Enable Disconeected Operations

Even in the off-line state, provided that relevant messages are cached,
and the variable @code{elmo-enable-disconnected-operation} (described
later) is non-nil, you can following operations:
@xref{Plugged Mode}, @xref{Off-line State settings}.

@menu
* Send Messages off-line::      Transmit Messages
* Re-file and Copy queue::      Re-file and Copy (IMAP4)
* Creation of Folders::         Create Folders off-line (IMAP4)
* Marking::                     Mark (IMAP4)
* Pre-fetching Reservations::   Pre-fetch
@end menu

As soon as Wanderlust becomes on-line, such operations invoked off-line
are reflected in the servers via network.

If the variable @code{elmo-enable-disconnected-operation} is @code{nil},
these off-line operations are not executed and causes an error on
re-file or copy operations.

@node Send Messages off-line, Re-file and Copy queue, Enable Operations, Enable Operations
@subsection Transmission of Messages

You can proceed sending operation for  mail/news messages while you are
off-line, then it will be reserved for sending (if you are using
@file{im-wl.el}, it is irrelevant).
Messages reserved for sending while off-line are accumulated in the
queue folder, @samp{+queue}. These messages are transmitted at once when
Wanderlust becomes on-line.

You can visit @samp{+queue} in the off-line state and confirm content of
messages in the queue.  You can also remove messages.  Removed messages
are not transmitted even in the on-line state.


@node Re-file and Copy queue, Creation of Folders, Send Messages off-line, Enable Operations
@subsection Re-file and Copy (IMAP4)

Re-file and copy operations to IMAP folders invoked during the off-line
state are accumulated in the queue, and reflected in the server side
when Wanderlust becomes on-line.  If you visit destination folders after
off-line re-file or copy, it looks as if messages were appended even in
off-line state.

For the safety reasons, messages re-filed off-line are removed from
source folders only if their @samp{Message-ID:} match messages on the
servers.  While the queue is processed, messages that failed to be
re-filed or copied to the specified folders are appended to the folder
@samp{+lost+found}.


@node Creation of Folders, Marking, Re-file and Copy queue, Enable Operations
@subsection Creation of Folders (IMAP4)

You can create IMAP folders off-line.  The creation of folders are
reflected in the servers when Wanderlust becomes on-line.  If the creation
of those folders fails at that time for some reasons, messages
to be re-filed into those are appended to the folder @samp{+lost+found}
instead.


@node Marking, Pre-fetching Reservations, Creation of Folders, Enable Operations
@subsection Marking (IMAP4)

Off-line changes in unread/read and importance mark @samp{$} information
are also reflected in the servers when Wanderlust becomes on-line.


@node Pre-fetching Reservations,  , Marking, Enable Operations
@subsection Pre-fetching

You can make reservations for pre-fetching messages in networking
folders (IMAP, NNTP, POP3, shimbun).  Reserved messages are marked with
@samp{u} but not cached yet.  When Wanderlust becomes on-line, they are
pre-fetched from servers.


@node Plugged Mode, Off-line State settings, Enable Operations, Disconnected Operations
@section Switching On-line/Off-line per Server/Port

@kbd{M-t} described above switches networking states as a whole, but you
can switch on-line/off-line per server/port.

Pressing @kbd{C-t} in the folder or summary modes brings you in
wl-plugged-mode shown below, in which you can change the plugged state
for each port.

@example
@group
Queuing:[ON] AutoFlushQueue:[--] DisconnectedOperation:[ON]
[ON](wl-plugged)
  [--]hosta
    [--]smtp        +queue: 2 msgs (1,2)        @dots{}@r{sending queue}
    [--]nntp(119)   +queue: 1 msg (3)           @dots{}@r{sending queue}
  [ON]hostb
    [--]imap4/cram-md5(143) %#mh/wl(prefetch-msgs:3,mark-as-important:1)
                            %inbox(delete-msgids:1)    @dots{}@r{dop queue}
    [ON]nntp(119)
    [ON]smtp
@end group
@end example

The first line indicates status of the following three variables, and
simply pressing @kbd{@key{SPC}} or @kbd{@key{RET}} in each labeled
column modifies the values of these variables.

@example
@group
"Queuing"               @code{wl-draft-enable-queuing}
"AutoFlushQueue"        @code{wl-auto-flush-queue}
"DisconnectedOperation" @code{elmo-enable-disconnected-operation}
@end group
@end example

where @samp{[ON]} means its value is @code{t}, and @samp{[--]} means
@code{nil}.

The second and after lines indicate on-line/off-line states of servers
and ports, where @samp{[ON]} stands for on-line and @samp{[--]} for
off-line (in XEmacs or Emacs 21, they are shown with icons).  Pressing
@kbd{@key{SPC}} or @kbd{@key{RET}} in each line switches its state.

@dfn{sending queue} means messages accumulated in the folder
@samp{+queue} for off-line transmission, and @dfn{dop queue} means
off-line operations when @code{elmo-enable-disconnected-operation} is
@code{t}.
@c If the variable @code{elmo-enable-disconnected-operation} is non-nil,
@c off-line operations are enabled.

They are displayed if there are any of them.  In the example above, in
the sending queue there are two messages (the first and the second in
the queue folder) for smtp to hosta and one (the third) for nntp to
hosta, and in the dop queue there are one for @samp{%inbox} and two for
@samp{%#mh/wl}.

If you change @samp{(wl-plugged)} in the second line, the variable
@code{wl-plugged} is changed, so that the mode line indicator and
plugged states of all ports are affected.  If you change plugged states
of any servers or ports, @samp{(wl-plugged)} in the second line is
affected depending on @code{elmo-plugged-condition} settings and the
plugged state of each port.


@node Off-line State settings, Variables of Plugged Mode, Plugged Mode, Disconnected Operations
@section Invoking Wanderlust in the Off-line State

As described before, if you set @code{wl-plugged} to @code{nil} in
@file{~/.wl} or anything appropriate, you can invoke Wanderlust in the
off-line state.  You can specify off-line state on a per server or port
basis.  Refer to @code{wl-reset-plugged-alist} also.

Usually, when Wanderlust starts up, the plugged state of each port is
read from @file{~/.folders} and @code{wl-smtp-posting-server},
@code{wl-nntp-posting-server} and so on.  If you want to change the
plugged state of these ports or to add other ports, configure
@code{wl-make-plugged-hook} with a function.

@lisp
@group
(add-hook 'wl-make-plugged-hook
          '(lambda ()
             (elmo-set-plugged plugged-value(t/nil) server port)
                 ;; @r{add or change plugged states of the port of the server}
             (elmo-set-plugged plugged-value(t/nil) server)
                 ;; @r{if the port is omitted, all ports are affected}
                 ;; @r{(you cannot omit the port if you newly add the server)}
             ))
@end group
@end lisp


@node Variables of Plugged Mode,  , Off-line State settings, Disconnected Operations
@section Customizable Variables

@table @code
@item wl-plugged
@vindex wl-plugged
If this variable is set to @code{nil}, Wanderlust starts up in off-line
mode from the beginning.

@item wl-queue-folder
@vindex wl-queue-folder
The initial setting is @samp{+queue}.
This is the folder in which messages in the transmission queue are
accumulated.

@item wl-auto-flush-queue
@vindex wl-auto-flush-queue
The initial setting is @code{t}.
This flag controls automatic transmission of the queue when Wanderlust
becomes on-line.  If non-nil, the queue is automatically transmitted
(with confirmation by @code{y-or-n-p}).  If you want to transmit it
manually, press @kbd{F} in the folder mode.

@item elmo-enable-disconnected-operation
@vindex elmo-enable-disconnected-operation
The initial setting is @code{t}.  Controls off-line operations regarding
networking folders.  If non-nil, off-line operations are carried out.

@item elmo-lost+found-folder
@vindex elmo-lost+found-folder
The initial setting is @samp{+lost+found}.
This is the folder to which messages are saved when they fails to be
appended while the off-line re-file/copy queue is processed.

@item elmo-plugged-condition
@vindex elmo-plugged-condition
The initial setting is @code{one}.
The value of @code{wl-plugged} reflects the return value of the function
@code{elmo-plugged-p} (without arguments).
This variable @code{elmo-plugged-condition} specifies the condition on
which the return value of @code{(elmo-plugged-p)} should be t depending on the
plugged state of each port.

@example
'one         : plugged if one or more ports are plugged.
'all         : plugged if all ports are plugged.
'independent : reflects wl-plugged (elmo-plugged) regardless of plugged
               states of the ports.
@var{function}     : reflects the return value of the @var{function}
 functions available per default
 'elmo-plug-on-by-servers
             : reflects the plugged state of the servers specified by the
               variable elmo-plug-on-servers.
 'elmo-plug-on-by-exclude-servers
             : reflects the plugged state of the servers that are not
               in elmo-plug-on-exclude-servers.
                  elmo-plug-on-exclude-servers defaults to
                   '("localhost"
                     (system-name)
                     (system-name)without the domain part)
@end example

@example
@group
Example 1:
 (setq elmo-plugged-condition 'all)
Example 2:
 (setq elmo-plug-on-servers '("smtpserver" "newsserver"))
 (setq elmo-plugged-condition 'elmo-plug-on-by-servers)
Example 3:
 (setq elmo-plug-on-exclude-servers '("localhost" "myname"))
 (setq elmo-plugged-condition 'elmo-plug-on-by-exclude-servers)
@end group
@end example

@item wl-reset-plugged-alist
@vindex wl-reset-plugged-alist
The initial setting is @code{t}.  If non-nil, plugged states are
initialized on a per server or port basis when Wanderlust starts up.

If @code{nil}, plugged states are retained while Emacs is running.  In
other words, they are initialized when Emacs is restarted even if the
value is @code{nil}.
@end table


@node Expire and Archive, Scoring, Disconnected Operations, Top
@chapter Automatic Expiration and Archiving of Messages
@cindex Expire and Archive

@menu
* Expire::      Expiration and Archiving
* Archive::     Archiving All Messages
@end menu


@node Expire, Archive, Expire and Archive, Expire and Archive
@section Expiration
@cindex Expire Message

Expiration means deletion of old messages which have outlasted a
certain period of time.

@code{wl-expire} supports not only simple deletion, but also moving to
specified archiving folders.

@section How to Use

Configure @code{wl-expire-alist} and press @kbd{e} in the folder mode,
or @kbd{M-e} in the summary mode.

@subsection Configuring @code{wl-expire-alist}

An example configuration of @code{wl-expire-alist} is shown below.
Everything in this @code{wl-expire-alist} makes a great difference in
expiration, so be careful.  I advise you to set @code{wl-expire-use-log}
to @code{t}, especially in the initial stage.

@lisp
@group
(setq wl-expire-alist
      '(("^\\+trash$"   (date 14) remove)
                                  ;; @r{delete}
        ("^\\+tmp$"     (date 7) trash)
                                  ;; @r{re-file to @code{wl-trash-folder}}
        ("^\\+outbox$"  (number 300) "$outbox;lha")
                                  ;; @r{re-file to the specific folder}
        ("^\\+ml/tmp$"  nil)
                           ;; @r{do not expire}
        ("^\\+ml/wl$"   (number 500 510) wl-expire-archive-number1 t)
                           ;; @r{archive by message number (retaining numbers)}
        ("^\\+ml/.*"    (number 300 310) wl-expire-archive-number2 t)
                           ;; @r{archive by a fixed number (retaining numbers)}
        ("^\\+diary$"   (date 30) wl-expire-archive-date)
                           ;; @r{archive by year and month (numbers discarded)}
        ))
@end group
@end lisp

Items in the list have the format of:

@example
(@var{regexp-for-folders} @var{specification-of-messages-to-be-deleted} @var{destination})
@end example

@noindent
The folder is examined if it matches @var{regexp-for-folders} from the
beginning of the list.  If you invoke expiration on the folder that does
not match any of them, nothing will happen.  And if either the second or
the third element of the item is @code{nil}, expiration will not take
place.

You can use any one of the following for
@var{specification-of-messages-to-be-deleted}:

@table @code
@item (number @var{n1} [@var{n2}])
deletes messages depending on the number of messages in the folder.

@var{n1} is the number of messages which should survive deletion, for example
if its value is 500, the newest 500 messages survive and the rests are
deleted.

@var{n2} is the number of messages in the folder on which expiration should
take place, which defaults to @var{n1} + 1.  For example if its value is 510,
folders with 510 or more messages are expired.
If you configured automatic expiration, frequently used folders may
expire every time it receive messages, and you may be annoyed with the
long delay in reading mail.
In that case, you can set a wide margin between @var{n2} and @var{n1}, so that
expiration would not take place until a certain number of messages
accumulate.

Messages with marks in @code{wl-summary-expire-reserve-marks} (marked
with important/new/unread) are not deleted.
If @code{wl-expire-number-with-reserve-marks} is non-nil, the folder
will expire so as to have 500 messages including such ones.
Otherwise, it will have 500 messages except such ones.

@item (date @var{d1})
deletes messages depending on the dates.

Messages dated @var{d1} or more days ago are deleted, for example if its
value is seven, messages seven days old or more are deleted.  Note that
the date is the one in the @samp{Date:} field of the message, not when
the message entered the folder.

Messages with no or invalid @samp{Date:} field does not expire; you
might have to delete them by hand.
@end table

You can use any one of the following in the place of @var{destination}:

@table @asis
@item @code{remove}
deletes the messages instantly.

@item @code{hide}
hides the messages from summary (messages are not deleted).

@item @code{trash}
moves the messages to @code{wl-trash-folder}.

@item @var{string}(folder)
moves the messages to the folder specified with @var{string}.

It would be useful for specifying an archiving folder, but because this
does not move important messages, it might be better to use the
standard functions described below.

@item @var{function}
invokes the specified @var{function}.

To the @var{function}, three arguments are passed: a folder name, a list
of messages to be deleted, and msgdb information of the summary.  You
can specify function-specific arguments after the name of the
@var{function}.  Note that the list contains messages with marks in
@code{wl-summary-expire-reserve-marks}, so be careful in writing your own
function.

These are four standard functions; three of them move messages to an archive
folder in the specified way.  This means old messages can be compressed
and saved in a file, being deleted from the original folder.
The last one divides messages to some MH folders.

@table @code
@item wl-expire-archive-number1
re-files to archiving folders corresponding to the message numbers of
the messages being deleted.  For example, a message numbered 102 will be
re-filed to @file{wl-00100.zip}, 390 to @file{wl-00300.zip}, and so on.
If @code{wl-expire-archive-files} is 200, messages will be re-filed to
@file{wl-00000.zip}, @file{wl-00200.zip}, @file{wl-00400.zip}, @dots{}.

The archiving folders to which messages are re-filed are determined by
the name of the folder as follows (in this case, archiving folders are
handled as if @code{elmo-archive-treat-file} were non-nil).

@table @asis
@item If the folder type is localdir:
@file{@var{ArchiveDir}/@var{foldername}-xxxxx.zip}

For example, @samp{+ml/wl} corresponds to @samp{$ml/wl;zip}
(@file{~/Mail/ml/wl-00100.zip}).

@item The folder type is other than localdir:
@file{@var{ArchiveDir}/@var{foldertype}/@var{foldername}-xxxxx.zip}

For example, @samp{%#mh/ml/wl} corresponds to
@samp{$imap4/#mh/ml/wl;zip} (@file{~/Mail/imap4/#mh/ml/wl-00100.zip}).
@end table

As you can see, in the case of localdir, the folder type is not included
in the path name, but otherwise it is included.
And you can control the prefix to the archiving folder name by
@code{wl-expire-archive-folder-prefix}.
Refer to @code{wl-expire-archive-folder-prefix} for details.

@item wl-expire-archive-number2
re-files every certain number of messages to archiving folders.

This differs from @samp{wl-expire-archive-number1} in that this re-files
to the folder up to the specified number regardless of message numbers.
The archiving folders to which messages are re-filed are determined in the
same way as @code{wl-expire-archive-number1}.

@code{elmo-localdir-folder-path} and @code{elmo-archive-folder-path}
should be different from each other when you use this function.  Please
beware that default values are the same.

@item wl-expire-archive-date
re-files messages depending on its date (year and month) to archive
folders.

For example, a message dated December 1998 is re-filed to
@code{$folder-199812;zip}.  The name of the archiving folders except the
date part are determined in the same way as
@code{wl-expire-archive-number1}.


You can set the first argument to these three standard functions to non-nil
in @code{wl-expire-alist} so as to retain message numbers in the folder.
For example, it can be specified just after the name of the function:

@lisp
("^\\+ml/wl$" (number 300 310) wl-expire-archive-number1 t)
@end lisp

If you omit the argument, consecutive numbers from 1 are assigned for
each archiving folder.

@item wl-expire-localdir-date
divides messages depending on their date (year and month) to MH folders
e.g. to @samp{+ml/wl/1999_11/}, @samp{+ml/wl/1999_12/}.
@end table
@end table

@subsection Treatment for Important or Unread Messages

If you specify any of @code{remove}, @code{trash}, a folder name, or a
standard function, messages with marks in
@code{wl-summary-expire-reserve-marks} (which are called @dfn{reserved
messages} thereafter) are retained.

By default, this variable includes the important, new, and unread marks,
so that messages with these marks are not removed.
Note that you cannot include the temporary mark (i.e. temporary marks
are removed anyway), and be sure to process temporary marks before you
invoke expiration.

@subsection Auto Expiration

The following setup invokes expiration when you move into the summary
mode.  There will be no confirmation, so make sure you made no mistake
in regexp and other settings before you set up this.

@lisp
@group
(add-hook 'wl-summary-prepared-pre-hook 'wl-summary-expire)
@end group
@end lisp

In the folder mode, you can invoke expiration per group as well as per
folder.  Therefore, if you specify @samp{Desktop} group, all folders
matching @code{wl-expire-alist} expire.

@section Tips

@subsection Treating archive folders
To treat archive folders created by @code{wl-expire-archive-number1} and so on,
you must set non-nil value to @code{elmo-archive-treat-file}.

@subsection Confirming

If you are to use @code{remove}, try @code{trash} at first and see
messages move to @code{wl-trash-folder} as expected, then replace it
with @code{remove}.  It would be dangerous to use @code{remove} from the
beginning.

If you are to use @code{wl-expire-archive-number1} and the like, try to
make a folder of the archiver type (@code{zip} or @code{lha}) and see if
you can append messages to it.  Even if settings in
@code{wl-expire-alist} and @code{elmo-archive} are correct, messages
would not be saved anywhere and disappeared in case the archiver program
fails.

After you make sure you can archive to the folder correctly, you can
invoke expiration and utilize the log.

If you set @code{wl-expire-use-log} to @code{t},
@file{~/.elmo/expired-log} should contain the log, for example:

@example
@group
delete  +ml/wl  (593 594 595 596 597 598 599)
move    +ml/wl -> $ml/wl-00600;tgz;wl  (600 601 602)
@end group
@end example

The first column indicates the operation, i.e. @samp{delete},
@samp{copy}, or @samp{move}.  The next is the name of the folder that
expired.  In the case of @samp{copy} and @samp{move}, the destination
folder is recorded after @samp{->}.  The last is the list of message
numbers that are actually deleted or moved (in the case of @samp{copy}
and @samp{move}, the number is the one in the source folder, rather than
the destination folder).

@subsection Re-filing Reserved Messages

The three standard functions copy reserved messages to the archive
folder, but do not delete them from the source folder.  Because
reserved messages and the like always remain, they are recorded in
@file{~/.elmo/expired-alist} so that they are not copied over and over
again.  They are not recorded if copied by @code{wl-summary-archive}.

If you enabled logging, usually @samp{move} is recorded for re-filing,
but instead @samp{copy} and @samp{delete} are recorded separately if
reserved messages are involved.  This is because it actually copies
messages including reserved, then deletes ones except reserved in that
case.

@section Customizable Variables

@table @code
@item wl-expire-alist
@vindex wl-expire-alist
The initial setting is @code{nil}.
This variable specifies folders and methods to expire.  For details,
refer to @code{wl-expire-alist} settings above.

@item wl-summary-expire-reserve-marks
@vindex wl-summary-expire-reserve-marks
The initial setting is the list below.

@lisp
@group
(list wl-summary-flag-mark
      wl-summary-new-uncached-mark
      wl-summary-new-cached-mark
      wl-summary-unread-uncached-mark
      wl-summary-unread-cached-mark)
@end group
@end lisp

Messages with these marks are retained in the folder, even after
expiration.
Only permanent marks can be listed, not temporary marks.

You can list marks one by one as in the default; you can use the
following settings as well:

@table @code
@item all
All messages with permanent marks are retained,
i.e. @code{wl-summary-read-uncached-mark} is included in addition to the
defaults.

@item none
All messages are handled as usual ones that are already read, no matter
what marks they have; even important messages are deleted.
@end table

@item wl-expire-archive-files
@vindex wl-expire-archive-files
The initial setting is 100.
This variable specifies the number of messages to be retained in one
archiving folder.

@item wl-expire-number-with-reserve-marks
@vindex wl-expire-number-with-reserve-marks
The initial setting is @code{nil}.
If non-nil, if expiring messages are specified by @code{number},
messages with @code{wl-summary-expire-reserve-marks} are also retained.

@item wl-expire-archive-get-folder-function
@vindex wl-expire-archive-get-folder-function
The initial setting is @code{wl-expire-archive-get-folder}.

This variable specifies a function that returns the name of an archiving
folder for standard functions in the place of @var{destination}.
You can use the following three variables for simple modification of
folder names; if you want more complex settings, define your own
function in this variable.

@code{wl-expire-archive-get-folder} can be customized by these
variables:
@itemize @bullet
@item @code{wl-expire-archive-folder-name-fmt}
@item @code{wl-expire-archive-folder-type}
@item @code{wl-expire-archive-folder-prefix}
@end itemize

@item wl-expire-archive-folder-name-fmt
@vindex wl-expire-archive-folder-name-fmt
The initial setting is @samp{%s-%%05d;%s}.
This is a @code{format} string for archiving folders used in
@code{wl-expire-archive-number1} and @code{wl-expire-archive-number2}.
Note that you must specify the message number by @samp{%%d}, because it
is parsed twice by @code{format}.

If you modify this, adjust @code{wl-expire-archive-folder-num-regexp} as
well.

@item wl-expire-archive-date-folder-name-fmt
@vindex wl-expire-archive-date-folder-name-fmt
The initial setting is @samp{%s-%%04d%%02d;%s}.
This is a @code{format} string for archiving folders used in
@code{wl-expire-archive-date}.  Note that you must specify the message
number by @samp{%%d}, because it is parsed twice by @code{format}.
There should be @samp{%%d} twice, one for the year and the other for the
month.

If you modify this, adjust
@code{wl-expire-archive-date-folder-num-regexp} as well.

@item wl-expire-archive-folder-type
@vindex wl-expire-archive-folder-type
The initial setting is @code{zip}.
This variable specifies an archiver type of the archiving folders.

@item wl-expire-archive-folder-prefix
@vindex wl-expire-archive-folder-prefix
The initial setting is @code{nil}.
This variable specifies the prefix (directory structure) to archiving
folders.
Exercise extreme caution in using this feature, as it has not been
seriously tested.
In the worst case, there is a fear of destructing archiving folders.

@table @code
@item nil
There will be no prefix.

@item short
For example, @samp{+ml/wl} will be prefixed by @samp{wl}, resulting in
@samp{$ml/wl-00000;zip;wl}.

@item t
For example, @samp{+ml/wl} will be prefixed by prefix @samp{ml/wl},
resulting in

@samp{$ml/wl-00000;zip;ml/wl}.
@end table

@item wl-expire-archive-folder-num-regexp
@vindex wl-expire-archive-folder-num-regexp
The initial setting is @samp{-\\([-0-9]+\\);}.
This variable specifies the regular expression to be used for getting
message numbers from multiple archiving folders specified by
@code{elmo-list-folders}.
Set it in accordance with @code{wl-expire-archive-folder-name-fmt}.

@item wl-expire-archive-date-folder-num-regexp
@vindex wl-expire-archive-date-folder-num-regexp
The initial setting is @samp{-\\([-0-9]+\\);}.
This is the regular expression to be used for getting message numbers
from multiple archiving folders specified by @code{elmo-list-folders}.
Set it in accordance with @code{wl-expire-archive-date-folder-name-fmt}.

@item wl-expire-delete-oldmsg-confirm
@vindex wl-expire-delete-oldmsg-confirm
The initial setting is @code{t}.
If non-nil, messages older than the one with the largest number will be
deleted with confirmation.
If @code{nil}, they are deleted without confirmation.

This feature is valid only if non-nil is specified as a argument to the
standard functions so as to retain numbers.

@item wl-expire-use-log
@vindex wl-expire-use-log
The initial setting is @code{nil}.
If non-nil, expiration logs are recorded in @file{~/.elmo/expired-log}.
They are appended but not truncated or rotated automatically; you might
need to remove it manually.

@item wl-expire-add-seen-list
@vindex wl-expire-add-seen-list
The initial setting is @code{t}.

If non-nil, when messages are re-filed by expiration, read/unread
information is passed to the destination folder.

However if you do not read the destination folder from Wanderlust,
@file{seen} under @file{~/.elmo/} grows larger and larger, so you might
want to set this to @code{nil} if you are simply saving to some
archiving folders.  Even if its value is @code{nil}, messages in the
archiving folders are simply treated as unread; it does not affect
expiration itself.

@item wl-expire-folder-update-msgdb
@vindex wl-expire-folder-update-msgdb
The initial setting is @code{t}.
If @code{t}, in the folder mode, expiration is carried out after
updating summary information.  If you specified a list of regular
expressions of folder names, summary information is updated for matching
folders only.
@end table


@node Archive,  , Expire, Expire and Archive
@section Archiving Messages

@subsection Archiving Messages
@kbd{M-x wl-summary-archive} copies the whole folder to archiving
folders.  If there are the archiving folders already, only new messages
are appended.

You can use @code{wl-archive-alist} in order to specify how messages are
archived according to their folder names, as in @code{wl-expire-alist}.
For example:

@lisp
@group
(setq wl-archive-alist
      '(("^\\+tmp$"     wl-archive-date)
        ("^\\+outbox$"  wl-archive-number2)
        (".*"           wl-archive-number1)))
@end group
@end lisp

Each item in the list has the following format:

@example
(@var{folders-regexp}  @var{deleting-function})
@end example

As you can see, you can only use a function after @var{folders-regexp}.
Per default, there are three functions:

@itemize @bullet
@item @code{wl-archive-number1}
@item @code{wl-archive-number2}
@item @code{wl-archive-date}
@end itemize

As inferred from their names, they work similarly to "expire" versions,
other than the following points:

@itemize @minus
@item No messages are deleted
@item Message numbers are retained even if invoked without arguments
@end itemize

These functions are good to archive all messages in a folder by their
numbers or by their dates.
These are also useful for backup or confirmation purposes before
expiration.
If you try to re-file them after they are archived, they are deleted but
not re-filed.

Per default, the archiving folders to which messages are copied are
determined automatically by @code{wl-expire-archive-get-folder-function}.
You can copy to a specific folder by invoking with a prefix argument,
i.e. @kbd{C-u M-x wl-summary-archive}.

Note that this feature has not been seriously tested, because you can
simply copy to an archiving folder, for example by
@code{wl-summary-copy-region}.

The archiving folders are determined by the same logic as in
@code{wl-summary-expire}; the following customizable variables are
relevant:

@itemize @bullet
@item @code{wl-expire-archive-files}
@item @code{wl-expire-archive-get-folder-function}
@item @code{wl-expire-archive-folder-name-fmt}
@item @code{wl-expire-archive-folder-type}
@item @code{wl-expire-archive-folder-prefix}
@item @code{wl-expire-archive-folder-num-regexp}
@end itemize

@subsection Customizable Variables

@table @code
@item wl-archive-alist
@vindex wl-archive-alist
The initial setting is the list shown below:

@lisp
@group
((".*" wl-archive-number1))
@end group
@end lisp

@noindent
This variable specifies a function that copies to archiving folders.
To the function, three arguments are passed: a folder name, a list of
messages in the folder, and msgdb information of the summary.
Needless to say, you can use your own function.
@end table


@node Scoring, Address Book, Expire and Archive, Top
@chapter Score of the Messages
@cindex Scoring
@c @cindex Kill File

Scoring is the function that associates a score (value) with each
message, and marks as read or deletes from the summary according to it.

You can put target or important marks on essential messages, or read marks
on the ones you do not want to read, for example spam articles.

This scoring function has a capability and a format similar to the one
that Gnus has, although there are some unsupported features and
Wanderlust specifics.
@xref{Scoring, , ,gnus, Gnus Manual}.

@menu
* Score Commands::             Score Commands
* Score File Format::          Score File Format
@end menu


@node Score Commands, Score File Format, Scoring, Scoring
@section Score Commands
@cindex Score Commands

@subsection Score File Specification

@code{wl-score-folder-alist} specifies score files or variables in which
scores are defined, corresponding to folder names.

@lisp
@group
(setq wl-score-folder-alist
      '(("^-.*"
         "news.SCORE"
         "my.SCORE")
        (".*"
         "all.SCORE")))
@end group
@end lisp

If paths to the score files are omitted, the directory specified in the
variable @code{wl-score-files-directory} is assumed.

No matter what you write in @code{wl-score-folder-alist}, the default
score file @code{wl-score-default-file} (@file{all.SCORE}) is always
read (it does not have to exist).
Therefore, in the example above, the three score files,
@file{news.SCORE}, @file{my.SCORE}, and @file{all.SCORE} are read for
the folders that matches @samp{^-.*}.

@subsection Scored Messages

Scores are attached to the messages that are specified by
@code{wl-summary-score-marks} temporarily when the summary is updated;
when you exit from the summary, the scores are removed and reverts to
the defaults.

@subsection Creation of Score Files

In the summary buffer, move to an appropriate message and type @kbd{L}.
Then type @kbd{s}, @kbd{s}, and @kbd{p} at a prompt in a mini-buffer.
The string in Subject is presented.  Edit it and press @kbd{@key{RET}}.

This makes @minus{}1000 are scored for messages with the same
@samp{Subject:} as the string you entered.  That is, such a score file
is created automatically.

Then, try typing @kbd{h} and @kbd{e} in the same summary buffer.
The score file you just made appears.
This buffer is called @dfn{score editing buffer} thereafter.
When you type @kbd{C-c C-e} in it, you are prompted in the mini-buffer
as you are previously; type @kbd{a}.  Then a score entry for "From"
should be inserted.
In this way, you can create a score file easily either in the summary
buffer or in the score editing buffer.

By the way, you might be aware the numbers of key strokes are different
between @kbd{s s p} and @kbd{a}.
This is determined by @code{wl-score-header-default-entry}.
This variable specifies the default score entries corresponding to
header fields.
For example, for "subject" field, a type and a time limit are prompted,
but for "from" field, they are fixed upon automatically as substring and
permanent respectively.
However, score values can be modified by the prefix argument.
Typing @kbd{?} at the mini-buffer shows a help on keys and corresponding
headers and types.

At last, type @kbd{C-c C-c} in the score editing buffer.  This saves the
score file and terminates the edit mode.  Typing @kbd{C-c C-c} after
erasing contents of the buffer deletes the score file being edited.

@subsection Tips

@subsubsection Selecting Score Files

You can change score files to which scores are appended by
@code{wl-summary-increase-score} and @code{wl-summary-lower-score} by
@code{wl-score-change-score-file}.

@subsubsection Summing Up the Score

If you add the same entries by @code{wl-summary-increase-score},
@code{wl-summary-lower-score}, and @code{wl-score-edit-insert-entry},
scores for the entry is summed up.

For example, if you create @samp{from} entry with the score of @minus{}1000 by
@kbd{L a} and again @samp{from} with @minus{}200, one entry with the score of
@minus{}1200 will be created as a result.

@subsubsection Creating Thread Key

Creating @samp{Thread} key by @code{wl-summary-increase-score} or
@code{wl-summary-lower-score} appends @samp{Message-ID} of all children.

@subsubsection Creating Followup Key

Creating @samp{Followup} key by @code{wl-summary-increase-score} or
@code{wl-summary-lower-score} appends @samp{Message-ID} of the message
at the cursor to @samp{References} key.
If @code{wl-score-auto-make-followup-entry} is non-nil,
@samp{Message-ID} of all messages to be followed up within dates
specified by @code{wl-score-expiry-days}.

@subsection Key Bindings

@table @kbd
@item K
@kindex K (Summary)
@findex wl-summary-increase-score
Increases the score for the current message.
And the score entry is appended to the score file at the same moment.
You can specify the score value by a prefix argument.

@item L
@kindex L (Summary)
@findex wl-summary-lower-score
Decreases the score for the current message.
And the score entry is appended to the score file at the same moment.
You can specify the score value by a prefix argument.

@item h R
@kindex h R (Summary)
@findex wl-summary-rescore
Re-applies the scoring.
However, already scored messages are not scored anew.

@item h c
@kindex h c (Summary)
@findex wl-score-change-score-file
Changes the score file currently selected.

@item h e
@kindex h e (Summary)
@findex wl-score-edit-current-scores
Edits the score file currently selected.
If there are multiple score files, the previously specified one is
selected.

@item h f
@kindex h f (Summary)
@findex wl-score-edit-file
Edits an arbitrary score file and selects it.

@item h F
@kindex h F (Summary)
@findex wl-score-flush-cache
Erases caches associated to the score files that are read.
If you modified score files directly (from other than Wanderlust), you
need to re-read them after erasing the cache.

@item h m
@kindex h m (Summary)
@findex wl-score-set-mark-below
Specifies the criterion for scores to be marked as read.
Messages with scores less than this value are marked as read.

@item h x
@kindex h x (Summary)
@findex wl-score-set-expunge-below
Specifies the criterion for scores to be deleted from the summary.
Messages with scores less than this value are deleted.
"Deleted" means it is not shown; they are not removed from the summary
information or the folder.
The deleted messages can be shown by rescan-noscore again.
@end table

@subsection Key Bindings in the Score Editing Buffer

@table @kbd
@item C-c C-k
@kindex C-c C-k (Score Mode)
@findex wl-score-edit-kill
Abandons the file being edited.

@item C-c C-c
@kindex C-c C-c (Score Mode)
@findex wl-score-edit-exit
Saves the file being edited, and quits from the edit mode.

@item C-c C-p
@kindex C-c C-p (Score Mode)
@findex wl-score-pretty-print
Re-draws the score.

@item C-c C-d
@kindex C-c C-d (Score Mode)
@findex wl-score-edit-insert-date
Inserts the number of dates from Dec. 31, 1 B.C.
It is used for creating the third factor of time-limited scores.

@item C-c C-s
@kindex C-c C-s (Score Mode)
@findex wl-score-edit-insert-header
Inserts the header of the message selected in the summary buffer.

@item C-c C-e
@kindex C-c C-e (Score Mode)
@findex wl-score-edit-insert-entry
Inserts the score entry of the message selected in the summary buffer.
@end table

@subsection Customizable Variables

@table @code
@item wl-summary-default-score
@vindex wl-summary-default-score
The initial setting is 0 (zero).
This variable specifies the default value of the score.
The score is increased or decreased based upon this value.

@item wl-summary-important-above
@vindex wl-summary-important-above
The initial setting is @code{nil}.
Messages with scores larger than this value are attached with the
important mark (@samp{$}).
If @code{nil}, no important marks are attached.

@item wl-summary-target-above
@vindex wl-summary-target-above
The initial setting is @code{nil}.
Messages with scores larger than this value are attached with the target
mark (@samp{*}).
If @code{nil}, no target marks are attached.

@item wl-summary-mark-below
@vindex wl-summary-mark-below
The initial setting is 0 (zero).
Messages with scores smaller than this value are marked as read.

@item wl-summary-expunge-below
@vindex wl-summary-expunge-below
The initial setting is @code{nil}.
Messages with scores smaller than this value are deleted from the
summary.
If @code{nil}, they are not deleted.

@item wl-summary-score-marks
@vindex wl-summary-score-marks
The initial setting is the list shown below:

@lisp
@group
(list wl-summary-new-uncached-mark
      wl-summary-new-cached-mark)
@end group
@end lisp

@noindent
Messages with these marks are scored.

@item wl-use-scoring
@vindex wl-use-scoring
The initial setting is t.
If non-nil, scoring is enabled.

@item wl-score-files-directory
@vindex wl-score-files-directory
The initial setting is @file{~/.elmo/}.
The default directory for score files.

@item wl-score-interactive-default-score
@vindex wl-score-interactive-default-score
The initial setting is 1000.
This value is used as a score when a score factor is @code{nil} in the
score file.  It is also used in @code{wl-summary-increase-score} and
@code{wl-summary-lower-score}, on condition that the value of
@code{wl-score-header-default-entry} is @code{nil}.

@item wl-score-expiry-days
@vindex wl-score-expiry-days
The initial setting is 7.
This is the number of days before time-limited scores are deleted.

@item wl-score-update-entry-dates
@vindex wl-score-update-entry-dates
The initial setting is @code{t}.
If non-nil, it enables deletion of time-limited scores.

@item wl-score-header-default-entry
@vindex wl-score-header-default-entry
Specifies the default value for each header field for score entries
created by @code{wl-summary-increase-score},
@code{wl-summary-lower-score}, and @code{wl-score-edit-insert-entry}.

@item wl-score-simplify-fuzzy-regexp
@vindex wl-score-simplify-fuzzy-regexp
In the case of a type of a score entry is @code{fuzzy}, this specifies a
regular expression to be deleted from the string.
Because this is usually used for Subject, the default is prefixes that
are attached by mailing list programs.

@item wl-summary-rescore-partial-threshold
@vindex wl-summary-rescore-partial-threshold
The initial setting is 200.
When sync-all or rescan is executed, if there are messages more than
this value, only the last same number of messages as this value are
scored.

@item wl-summary-auto-sync-marks
@vindex wl-summary-auto-sync-marks
If non-nil, unread/important marks are synchronized when the summary
does.
Unread marks reflect information on the IMAP4 server.
Important marks reflect information on the IMAP4 server (flagged or
not), and contents of @samp{'flag} folder.
The initial setting is @code{t}.
@end table


@node Score File Format,  , Score Commands, Scoring
@section Score File Format
@cindex Score File Format

The format of score files are the same as Gnus, and basically you can
use Gnus score files as they are.  But they are not fully compatible
because some keys are not supported and there are Wanderlust specifics.
@xref{Score File Format, , ,gnus, Gnus Manual}.

@lisp
@group
(("subject"
  ("for sale" -1000 nil s)
  ("profit" -1000 nil s))
 ("from"
  ("spam@@spamspamspam" -10000 nil s))
 ("followup"
  ("my@@address" 3001 nil s))
 ("chars"
  (1000000 -10 nil >))
 (important 5000)
 (target 3000)
 (mark 0)
 (expunge -3000))
@end group
@end lisp

@table @code
@item string
If the key is a string, it is the name of the header to be matched.
The following keys are available:
@code{Subject}, @code{From}, @code{Date}, @code{Message-ID},
@code{References}, @code{To}, @code{Cc}, @code{Chars}, @code{Lines},
@code{Xref}, @code{Extra}, @code{Followup}, @code{Thread}
@code{Chars} and @code{Lines} mean the size and the number of lines of
the message, respectively.  @code{Extra}, @code{Followup}, @code{Thread}
are described later.
The rest corresponds the field of the same name.

Arbitrary numbers of core entries are specified after the key.
Each score entry consists of these five factors:

@enumerate
@item
A factor that matches header.  This should be a number in the cases of
@code{lines} and @code{chars}, otherwise a string.

@item
A score factor.  When the first item matches, the score of the message
is increased or decreased by this value.

@item
A time limiting factor.  If @code{nil}, the score is permanent, and in the case
of a number, the score is deleted if it does not match for days
(@code{wl-score-expiry-days}) from the date specified by this.
The date is since Dec. 31, 1 B.C.

@item
A type factor.  This specifies the way the first factor matches.
Available types depend on keys.

@table @dfn
@item From, Subject, References, Message-ID
For these keys in string, @code{r} and @code{R} (regexp),
@code{s} and @code{S} (substring), @code{e} and @code{E} (exact match),
as well as @code{f} and @code{F} (fuzzy) can be used.
@code{R}, @code{S}, @code{E}, and @code{F} are case sensitive.

@item Lines, Chars
For these keys, the following five numerical relative operators can be
used: @code{<}, @code{>}, @code{=}, @code{>=}, @code{<=}.

@item Followup
This key matches @code{From} header, and scores all follow-ups to the
message.
For example, it would be useful for increasing scores for follow-ups to
you own article.

You can use the same types as @code{From} except for @code{f}.
And a @samp{Followup} entry is automatically appended to the score file.

@item Thread
This key scores (sub-)threads beginning with @code{Message-ID} @var{x}.
A @samp{Thread} entry is automatically appended for each article that
has @var{x} in the @code{References} header.
You can make sure the whole thread including messages that does not have
all ancestors @code{Message-ID} in @code{References} is scored.

You can use the same types as @code{References} except for @code{f}.
And a @samp{Thread} entry is automatically appended to the score file.
@end table

@item
A factor for extension header.  This is meaningful only if the key is
@code{Extra}.
This specifies headers to be matched other than standard headers like
@code{Subject} and @code{From}.
Note that you should specify the header in
@code{elmo-msgdb-extra-fields} also.
Therefore it does not work in folders where extension headers cannot be
retrieved.

@end enumerate

The sum of these scores @emph{after all factors are applied} becomes the
score of the message.

@cindex Score File Atoms
@item mark
Messages with a score less than this value is marked as read.
The default is @code{wl-summary-mark-below}.

@item expunge
Messages with a score less than this value is deleted from the summary.
The default is @code{wl-summary-expunge-below}.

@item mark-and-expunge
Both @code{mark} and @code{expunge} are applied,
i.e. messages with a score less than this value is marked as read and
deleted from the summary.

@item target
Messages with a score greater than this value is attached with temp
marks.
The default is @code{wl-summary-target-above}.

@item important
Messages with a score greater than this value is attached with important
marks.
The default is @code{wl-summary-important-above}.
@end table

@subsection Caveats

Not to mention the @code{extra} key, if @code{lines} or @code{xref} keys
are used, you need to set @code{elmo-msgdb-extra-fields}.

@lisp
(setq elmo-msgdb-extra-fields '("lines" "xref"))
@end lisp

There are other restrictions as shown below:

@itemize @bullet
@item Because @samp{References} field in the summary information
contains only the last @samp{Message-ID}, @code{references} key matches
the last one only.
@end itemize

Keys that can be seen by folder of types:

@example
@group
@multitable {nntp (supporting xover)} {chars} {lines} {xref} {extra}
@headitem @tab chars @tab lines @tab xref  @tab extra
@item localdir,localnews @tab Y @tab E @tab E @tab E
@item nntp (supporting xover) @tab Y @tab E @tab E @tab N
@item (otherwise) @tab N @tab E @tab E @tab E
@item imap4 @tab Y @tab E @tab E @tab E
@item pop3 @tab N @tab E @tab E @tab E
@end multitable

                Y: can be seen
                N: cannot be seen (ignored)
                E: can be seen with @code{elmo-msgdb-extra-fields} settings
@end group
@end example


@node Address Book, Quick Search, Scoring, Top
@chapter Address Book
@cindex Address Book

With address book, you can utilize address completion, and you have
summary displayed with nicknames.

@menu
* Mail Addresses::   Definition of Address Book
* Address Manager::  Address Manager
@end menu


@node Mail Addresses, Address Manager, Address Book, Address Book
@section Address book
@cindex Address book Definition
@cindex .addresses
@cindex Alias, Address

The file @file{~/.addresses} is a simple address book for Wanderlust.
Make address file @file{~/.addresses}, and edit to suit your requirement.

The data written in @file{~/.addresses} are used for address completion
under draft editing mode. Furthermore, they are used when showing names
in summary display mode. You can safely skip this section, if you don't
want to customize address completion and summary display.
It is possible to add/change/remove addresses from @file{~/.addresses} in
summary buffer after Wanderlust is invoked. @refill

The format is very simple. Like this. @refill

@example
@group
#
# @r{Lines begin with @samp{#} are comment.}
# @r{Empty lines are ignored}
#
# @r{Format of each line:}
# @var{email-address}  "@var{nickname} "@var{realname}"
#
teranisi@@gohome.org            "Yuuichi"    "Yuuichi Teranishi"
foo@@bar.gohome.org             "Mr. Foo"    "John Foo"
bar@@foo.gohome.org             "Mr. Bar"    "Michael Bar"
@end group
@end example

@noindent
One line defines one persons description.

Actually, in default setup, @var{nickname} is used in summary-mode and
@var{realname} is used in draft preparation mode. This behavior is
better understood if you try it and confirmed the function first. You
can write and try a small definition, so you will know the idea of the
address book before writing a big one.

And, if MH alias file is specified in variable @code{wl-alias-file},
it is used as an address information in the draft preparation mode.

If variable @code{wl-use-ldap} is non-nil (initial setting is
@code{nil}), address completion in draft mode uses LDAP information.

If you use LDAP, you have to set @code{wl-ldap-server},
@code{wl-ldap-port} and @code{wl-ldap-base} properly.
You also have to set command exec @env{PATH} to
the program @command{ldapsearch}.


@node Address Manager,  , Mail Addresses, Address Book
@section Address Manager
@cindex Address Manager

You can type @kbd{C-c C-a} to enter address manger mode.  You can edit
the address book and insert address to draft buffer.

@subsection Key Bindings

@table @kbd
@item t
@kindex t (Address Manager)
@findex wl-addrmgr-set-to
Add @samp{To:} mark.

@item c
@kindex c (Address Manager)
@findex wl-addrmgr-set-cc
Add @samp{Cc:} mark.

@item b
@kindex b (Address Manager)
@findex wl-addrmgr-set-bcc
Add @samp{Bcc:} mark.

@item u
@kindex u (Address Manager)
@findex wl-addrmgr-unmark
Cancel the mark.

@item x
@kindex x (Address Manager)
@findex wl-addrmgr-apply

Insert @samp{To:}, @samp{Cc:}, or @samp{Bcc:} marked addresses to draft
buffer and quit address manager.  When no draft buffer, make new draft
with insert marked addresses.

If no mark, quit address manager.


@item q
@kindex q (Address Manager)
@findex wl-addrmgr-quit
Quit address manager.

@item a
@kindex a (Address Manager)
@findex wl-addrmgr-add
Add new entry.

@item d
@kindex d (Address Manager)
@findex wl-addrmgr-delete
Delete entry.

@item e
@kindex e (Address Manager)
@findex wl-addrmgr-edit
Edit entry.
@end table

@node Quick Search, Spam Filter, Address Book, Top
@chapter Quick Search
@cindex Quick Search

@code{wl-qs} provides an interface to quickly search your mail archive.
It can use an external search engine (@ref{Search Folder}), Gmail
search, or a filter folder (@ref{Filter Folder}).

@code{wl-qs} provides the command
@code{wl-quicksearch-goto-search-folder}. Using it will first prompt for
a search, and then jump to the search results.

@menu
* Setup of Quick Search::       Setup
* Usage of Quick Search::       Searching
@end menu

@node Setup of Quick Search, Usage of Quick Search,, Quick Search
@section Setup of @code{wl-qs}

To setup, configure the value of @code{wl-quicksearch-folder}.
This should be the name of the folder you would like to search. For
example, @samp{%[Gmail]/All Mail:username@@imap.gmail.com},
@samp{.archive} or @samp{[]}. The latter is advised if you use a mail
index, such as mu, notmuch or namazu, as it is quite fast.

@node Usage of Quick Search,, Setup of Quick Search, Quick Search
@section Searching

To search your mail archive, use the command
@code{wl-quicksearch-goto-search-folder}, which can be called using
@kbd{'} in a Summary buffer or the Folder buffer. You will be prompted
for a search, and then will immediately jump to the search results.

@subsection Search folder

If you use specified @samp{[} as the value of
@code{wl-quicksearch-folder}, you will be accessing a search folder
(@ref{Search Folder}). You will be prompted for a search string. The
syntax of the search will depend on the value of
@code{elmo-search-default-engine}. Quotes will be escaped for you
automatically and passed on to the search program.

(If you are using the grep search engine, you must specify a target
folder. Your @code{wl-quicksearch-folder} should look like
@samp{[]~/Mail/semi!grep}.)

@subsection Gmail

If you use a gmail folder as your @code{wl-quicksearch-folder}, you will be prompted for a
Gmail search query
(@uref{https://support.google.com/mail/answer/7190}). You may use
any Gmail search operator; the search is handled by Gmail's server.

@subsection Filter folder

If you are using any other type of folder, you will be prompted for a
query using the interactive query builder. When you have finished your
query, you will be directed to a filter folder for your
@code{wl-quicksearch-folder}.

@node Spam Filter, Advanced Issues, Quick Search, Top
@chapter Spam Filter
@cindex Spam Filter

@code{wl-spam} provides an frontend to external spam filtering programs.
You can register to or judge spam by the filtering program cooperateing
with messages operations on Wanderlust.

@menu
* Usage of Spam Filter::        Usage of Spam Filter
* Spam Filter Processors::      Supported spam filters
@end menu

@node Usage of Spam Filter, Spam Filter Processors, Spam Filter, Spam Filter
@section Usage of Spam Filter

@subsection Initial Setting

To use @code{wl-spam}, write in @file{~/.wl} as follows:

@lisp
@group
;; @r{Use @samp{bogofilter} as spam back end}
;; @r{Set @samp{scheme} here as the spam filter you will use.}
;; @r{@xref{Spam Filter Processors}.}
(setq elmo-spam-scheme 'bogofilter)
(require 'wl-spam)
@end group
@end lisp

@subsection spam mark

The spam mark (@samp{s}) will be provided as new temporary mark.
Messages marked by this will be refiled into @code{wl-spam-folder} when
the action is called for execution. Marked messages will be skipped by
summary walking in ordinary way.

The spam mark is be put on by spam judgement described later, or by
invoking @kbd{k m} at any time.

@subsection spam judgment

You can judge spam messages by following ways:

@enumerate
@item
Make judgement on execution of auto-refile.

Insert @code{wl-refile-guess-by-spam} to arbitrary position in
@code{wl-auto-refile-guess-functions} as follows.

@lisp
@group
(setq wl-auto-refile-guess-functions
      '(wl-refile-guess-by-rule
        wl-refile-guess-by-spam))
@end group
@end lisp

In this example, judge spam if it could not decide refile destination by
@code{wl-refile-rule-alist}.

@item
Make judgement on entering the summary of specified folder.

Specify the value of @code{wl-spam-auto-check-folder-regexp-list}
as the list of regular expressions for folder names to be
automatically judged by spam filter.

@lisp
(setq wl-spam-auto-check-folder-regexp-list '("\\+inbox"))
@end lisp

In this example, judgement will be processed when you enter summary of
the folder whose name contains @samp{+inbox}.

@item
Make judgement on splitting messages with @code{elmo-split}.

It provides new function @code{spam-p} to be specified as @samp{CONDITION}
in @code{elmo-split-rule}. This function returns true when the message
is judged as spam.
@xref{Split messages}.

You can also process learning by the result of judgement. (You would
better turn on this feature after learning to some extent)

Example follows:

@lisp
@group
(setq elmo-split-rule
      '(((spam-p) "+spam")
        ;; @r{to learn by the judgement, use following instead}
        ;((spam-p :register t) "+spam")
        (t "+inbox"))
@end group
@end lisp
@end enumerate

@subsection spam learning

@code{wl-spam} automatically learn spam with refiling messages.

At first, @code{wl-spam} classifies the folders controlled by Wanderlust
into following 4 domains by the class of containig messages

@table @samp
@item spam
Folders containing messages judged as spam.
(The folder specified by @code{wl-spam-folder})
@item good
Folders containing messages judged as non-spam.
@item undecide
Folders containing messages not yet judged. Folders without
pre-distribution may belong to this domain e.g. @samp{+inbox}.
(specified by @code{wl-spam-undecided-folder-regexp-list})
@item ignored
Foldes have nothing to do with spam processing e.g.
@code{wl-trash-folder} or @code{wl-draft-folder}. (specified by
@code{wl-spam-ignored-folder-regexp-list})
@end table

When you refile messages across different domains, it automatically
learn messages as @samp{spam} or @samp{non-spam} according to domains
it belongs before and after.

To put it concretely, it will learn by following rule:

@table @samp
@item undecide -> spam
learn as spam.
@item good -> spam
learn as spam and cancel previous study as non-spam.
@item undecide -> good
learn as non-spam.
@item spam -> good
learn as non-spam and cancel previous study as spam.
@end table

It do not learn anything in other cases.

@subsection Key Bindings
@cindex Keybind, spam filter

@table @kbd
@item k m
@kindex k m (Summary)
@findex wl-summary-spam
Put spam mark (@samp{s}) on current message.

@item k c
@kindex k c (Summary)
@findex wl-summary-test-spam
Test current message and put spam mark if judged as spam.
Remove spam mark if judged as non-spam.

@item k C
@kindex k C (Summary)
@findex wl-summary-mark-spam
Test messages with the mark in @code{wl-spam-auto-check-marks},
and put spam mark if judged as spam. If it is called with prefix
argument, test all messages regardless of their marks.

@item k s
@kindex k s (Summary)
@findex wl-summary-register-as-spam
Register current message as spam and put spam mark.

@item k S
@kindex k S (Summary)
@findex wl-summary-register-as-spam-all
Register all messages in the folder as spam and put spam mark.

@item k n
@kindex k n (Summary)
@findex wl-summary-register-as-good
Register current message as non-spam and remove spam mark.

@item k N
@kindex k N (Summary)
@findex wl-summary-register-as-good-all
Register all messages in the folder as non-spam and remove spam mark.

@item r k m
@kindex r k m (Summary)
@findex wl-summary-spam-region
Put spam mark on messages in the specified region.

@item r k c
@kindex r k c (Summary)
@findex wl-summary-test-spam-region
Test messages in the specified region and put spam mark if judged as spam.
Remove spam mark if judged as non-spam.

@item r k s
@kindex r k s (Summary)
@findex wl-summary-register-as-spam-region
Register messages in the specified region as spam and put spam mark.

@item r k n
@kindex r k n (Summary)
@findex wl-summary-register-as-good-region
Register messages in the specified region as non-spam and remove spam mark.

@item t k m
@kindex t k m (Summary)
@findex wl-thread-spam
Put spam mark on messages which are the descendant of the current thread.
With prefix argument, it affects on the all messages in the thread tree.

@item t k c
@kindex t k c (Summary)
@findex wl-thread-test-spam
Test messages which are the descendant of the current thread and put spam mark
if judged as spam.  Remove spam mark if judged as non-spam.
With prefix argument, it affects on the all messages in the thread tree.

@item t k s
@kindex t k s (Summary)
@findex wl-thread-register-as-spam
Register messages which are the descendant of the current thread as spam
and put spam mark.
With prefix argument, it affects on the all messages in the thread tree.

@item t k n
@kindex t k n (Summary)
@findex wl-thread-register-as-good
Register messages which are the descendant of the current thread as non-spam
and remove spam mark.
With prefix argument, it affects on the all messages in the thread tree.

@item m k
@kindex m k (Summary)
@findex wl-summary-target-mark-spam
Put spam mark (@samp{s}) on messages with the target mark @samp{*}.

@item m s
@kindex m s (Summary)
@findex wl-summary-target-mark-register-as-spam
Register messages with the target mark @samp{*} as spam and put spam mark.

@item m n
@kindex m n (Summary)
@findex wl-summary-target-mark-register-as-good
Register messages with the target mark @samp{*} as non-spam and remove spam mark.
@end table

@subsection Customizable Variables

@table @code
@item wl-spam-folder
@vindex wl-spam-folder
Specify the name of destination folder for the spam messages.
The initial setting is @samp{+spam}.

@item wl-spam-undecided-folder-regexp-list
@vindex wl-spam-undecided-folder-regexp-list
Specify the list of regexp of folder names which contain messages
not yet decided as spam or non-spam.
The initial setting is @code{'("inbox")}.

@item wl-spam-ignored-folder-regexp-list
@vindex wl-spam-ignored-folder-regexp-list
The initial setting is as follows.

@lisp
@group
(list (regexp-opt (list wl-draft-folder
                        wl-trash-folder
                        wl-queue-folder)))
@end group
@end lisp

Folders of no effect against spam judgement, specified by the list of
folder name regular expressions.

@item wl-spam-auto-check-folder-regexp-list
@vindex wl-spam-auto-check-folder-regexp-list
Folders to make spam judgement on entering the summary of them,
specified by the list of folder name regular expressions.
The initial setting is @code{nil}.

@item wl-spam-auto-check-marks
@vindex wl-spam-auto-check-marks
The initial setting is the following list:

@lisp
@group
(list wl-summary-new-uncached-mark
      wl-summary-new-cached-mark)
@end group
@end lisp

Messages with mark specified by this variable will be processed
by whole-folder judgement including auto test by
@code{wl-spam-auto-check-folder-regexp-list}.
Persistent marks can be used in this method, but temporary marks cannot.

You can specify the list of marks as the initial setting, or you can
specify follwing symbol:

@table @code
@item all
Process all messages regardless of persistent marks.
@end table
@end table


@node Spam Filter Processors,  , Usage of Spam Filter, Spam Filter
@section Supported Spam Filters
@cindex Spam Filter, Bogofilter
@cindex Spam Filter, Spamfilter

Supported spam filtering libraries are following ones.

@menu
* bogofilter::                          bogofilter
* spamfilter::                          spamfilter.el
* bsfilter::                            bsfilter
* SpamAssassin::                        SpamAssassin
* SpamOracle::                          SpamOracle
* Regular Expressions Header Matching:: Header regexp
@end menu


@node bogofilter, spamfilter, Spam Filter Processors, Spam Filter Processors
@subsection bogofilter
@cindex bogofilter

bogofilter (@uref{http://bogofilter.sourceforge.net/}) is a spam filter
implemented by C language.

To use spam filter with bogofilter, write following setting in
@file{~/.wl} or somewhere else.

@lisp
@group
(setq elmo-spam-scheme 'bogofilter)
@end group
@end lisp

@subsubsection Customizable Variables

@table @code
@item elmo-spam-bogofilter-program
@vindex elmo-spam-bogofilter-program
The initial setting is @file{bogofilter}.
Specify the name of executable of bogofilter. If the executable
is not in your environmental variable @env{PATH}, you should
set this by full path.

@item elmo-spam-bogofilter-args
@vindex elmo-spam-bogofilter-args
The initial setting is @code{nil}.
Specify arguments to be supplied for bogofilter executable.

@item elmo-spam-bogofilter-database-directory
@vindex elmo-spam-bogofilter-database-directory
Specify the directory for statistical database to be used.
@code{nil} to use default directory (@file{~/.bogofilter}).
The initial setting is @code{nil}.

@item elmo-spam-bogofilter-max-messages-per-process
@vindex elmo-spam-bogofilter-max-messages-per-process
The initial setting is 30.  This variable specifies the number of
messages to be learned by one process.

@item elmo-spam-bogofilter-debug
@vindex elmo-spam-bogofilter-debug
The initial setting is @code{nil}.
If you specify non-nil, the output from @command{bogofilter} is
stored in the buffer named @code{"*Debug ELMO SPAM Bogofilter*"}.
@end table


@node spamfilter, bsfilter, bogofilter, Spam Filter Processors
@subsection spamfilter.el
@cindex spamfilter

@file{spamfilter.el}
(@uref{http://www.geocities.co.jp/SiliconValley-PaloAlto/7043/}) is a
spam filtering library implemented by Emacs Lisp.

Corresponding modules will be compiled/installed, if you have
@file{spamfilter.el} within @code{load-path} when you are to install wl.
@xref{Install}.

To use @file{spamfilter.el}, write following setting in @file{~/.wl} or
somewhere else.
(Of cource, you have to have settings for @file{spamfilter.el} itself)

@lisp
@group
(setq elmo-spam-scheme 'spamfilter)
@end group
@end lisp

@subsubsection Customizable Variables

@table @code
@item elmo-spam-spamfilter-corpus-filename
@vindex elmo-spam-spamfilter-corpus-filename
The initial setting is @file{~/.elmo/.spamfilter}.
It specifies the name of corpus file.
@end table

@node bsfilter, SpamAssassin, spamfilter, Spam Filter Processors
@subsection bsfilter
@cindex bsfilter

bsfilter (@uref{http://bsfilter.org/index-e.html}) is a spam filter
implemented by Ruby language.

To use spam filter with bsfilter, write following setting in
@file{~/.wl} or somewhere else.

@lisp
@group
(setq elmo-spam-scheme 'bsfilter)
@end group
@end lisp

@subsubsection Customizable Variables

@table @code
@item elmo-spam-bsfilter-program
@vindex elmo-spam-bsfilter-program
The initial setting is @file{bsfilter}.
Specify the name of executable of @command{bsfilter}.  If the executable
is not in your environmental variable @env{PATH}, you should
set this by full path.

@item elmo-spam-bsfilter-args
@vindex elmo-spam-bsfilter-args
The initial setting is @code{nil}.
Specify arguments to be supplied for bsfilter executable.

@item elmo-spam-bsfilter-database-directory
@vindex elmo-spam-bsfilter-database-directory
Specify the directory for statistical database to be used.
@code{nil} to use default directory (@file{~/.bsfilter}).
The initial setting is @code{nil}.

@item elmo-spam-bsfilter-debug
@vindex elmo-spam-bsfilter-debug
The initial setting is @code{nil}.
If you specify non-nil, the output from @command{bsfilter} is
stored in the buffer named @code{"*Debug ELMO Bsfilter*"}.

@item elmo-spam-bsfilter-shell-program
@vindex elmo-spam-bsfilter-shell-program
The initial setting is @file{ruby}.
Specify the shell to execute @command{bsfilter}.  If the shell is not
in your environmental variable @env{PATH}, you should set this by full path.

@item elmo-spam-bsfilter-shell-switch
@vindex elmo-spam-bsfilter-shell-switch
The initial setting is @code{nil}.
Specify options to give to the shell executing @command{bsfilter}.

@item elmo-spam-bsfilter-update-switch
@vindex elmo-spam-bsfilter-update-switch
The initial setting is @code{"--auto-update"}.
Specify options to give to @command{bsfilter} for learning messages.

@end table

@node SpamAssassin, SpamOracle, bsfilter, Spam Filter Processors
@subsection SpamAssassin
@cindex SpamAssassin

SpamAssassin (@uref{http://spamassassin.org/}) is one of the most
popular spam filtering program implemented on Perl. SpamAssassin
attempts to identify spam using text analysis and several internet-based
realtime blacklists.  SpamAssassin also uses a Bayesian learning filter
which enables more accurate spam filtering.

To use @file{SpamAssassin} on Wanderlust, write following setting
in @file{~/.wl} or somewhere else.
(Of course, you have to install SpamAssassin beforehand.)

@lisp
@group
(setq elmo-spam-scheme 'sa)
@end group
@end lisp

@subsubsection Customize Variables

@table @code
@item elmo-spam-spamassassin-program
@vindex elmo-spam-spamassassin-program
The initial setting is @file{spamassassin}.
Specify the name of executable @command{spamassassin}. If the executable
is not in your environmental variable @env{PATH}, you should
set this by full path.

@item elmo-spam-spamassassin-learn-program
@vindex elmo-spam-spamassassin-learn-program
The initial setting is @file{sa-learn}.  
Specify the name of the SpamAssassin's Bayesian filtering learner
program, @command{sa-learn}. If the executable is not in your
environmental variable @env{PATH}, you should set this by full path.

@item elmo-spam-spamassassin-program-arguments
@vindex elmo-spam-spamassassin-program-arguments
The initial setting is @code{'("-e")}.
Specify the arguments to be supplied for @command{spamassassin} executable.
You have to specify the argument to exit the program with an error exit code
when the result is spam. For example, if you want to use @command{spamc}
 instead of @command{spamassassin}, you should specify @code{'("-c")}.

@item elmo-spam-spamassassin-learn-program-arguments
@vindex elmo-spam-spamassassin-lern-program-arguments
The initial setting is @code{nil}.
Specify the arguments to be supplied for @command{sa-learn}.

@item elmo-spamassassin-debug
@vindex elmo-spamassassin-debug
The initial setting is @code{nil}.
If you specify @code{t}, the output from @command{spamassassin} is
stored in the buffer named @code{"*Debug ELMO SpamAssassin*"}.

@end table

@node SpamOracle, Regular Expressions Header Matching, SpamAssassin, Spam Filter Processors
@subsection SpamOracle
@cindex SpamOracle

SpamOracle (@uref{http://pauillac.inria.fr/~xleroy/software.html#spamoracle})
is a spam filter implemented by Objective Caml language.

To use spam filter with @file{spamoracle}, write following setting in
@file{~/.wl} or somewhere else.
(Of course, you have to install SpamOracle beforehand.)

@lisp
@group
(setq elmo-spam-scheme 'spamoracle)
@end group
@end lisp

@subsubsection Customizable Variables

@table @code
@item elmo-spam-spamoracle-program
@vindex elmo-spam-spamoracle-program
The initial setting is @file{spamoracle}.  Specify the name of
executable of spamoracle. If the executable is not in your
environmental variable @env{PATH}, you should set this by full path.

@item elmo-spam-spamoracle-config-filename
@vindex elmo-spam-spamoracle-config-filename
Specify the name of config file.  @code{nil} to use default file
(@file{~/.spamoracle.conf}).  The initial setting is @code{nil}.

@item elmo-spam-spamoracle-database-filename
@vindex elmo-spam-spamoracle-database-filename
The initial setting is @file{~/.elmo/.spamoracle.db}.
It specifies the name of database file.

@item elmo-spam-spamoracle-spam-header-regexp
@vindex elmo-spam-spamoracle-spam-header-regexp
The initial setting is @code{"^X-Spam: yes;"}.  It specifies the regular
expression of the header that indicates spam mail.  Use this setting
when you change the @code{spam_header} parameter in the config file.

@end table

@node Regular Expressions Header Matching,  , SpamOracle, Spam Filter Processors
@subsection Regular Expressions Header Matching
@cindex Regular Expressions Header Matching

Examine if regular expression matches corresponding field in message heaeder,
and decide spam or not. To use this backend, add following setting to @file{~/.wl}.

@lisp
@group
(setq elmo-spam-scheme 'header)
@end group
@end lisp

If you want to check fields not included in the default overview
information, add one into @code{elmo-msgdb-extra-fields}. Then it will
do examination by the overview information and avoid loading whole
message body as far as possible.

@subsubsection Customize Variables

@table @code
@item elmo-spam-header-good-alist
@vindex elmo-spam-header-good-alist
The initial setting is the following list:

@lisp
'(("X-Spam-Flag" . "No"))
@end lisp

Specify a list of regular expressions to match with header field name
for making non-spam decision. It takes precedence over
@code{elmo-spam-header-spam-alist}.

@item elmo-spam-header-spam-alist
@vindex elmo-spam-header-spam-alist
The initial setting is the following list:

@lisp
'(("X-Spam-Flag" . "Yes"))
@end lisp

Specify a list of regular expressions to match with header field name
for making spam decision.
@end table


@node Advanced Issues, Migration, Spam Filter, Top
@chapter Advanced Issues
@cindex Advanced Issues

@menu
* Living with other packages:: Cooperating with other packages
* Highlights::                 Highlights
* Biff::                       Notify Mail arrival
* Password Management::        Manage Passwords
* Split messages::             Splitting messages
* Batch Processing::           Invoke commands in batch mode
* Advanced Settings::          Advanced Settings
* Customizable Variables::     Customizable Variables
* Hooks::                      Hooks
@end menu


@node Living with other packages, Highlights, Advanced Issues, Advanced Issues
@section Living with other packages

Examples with other packages.

@menu
* imput::                       imput (im-wl.el)
* BBDB::                        The Insidious Big Brother Database
* LSDB::                        The Lovely Sister Database
* supercite::                   supercite.el
* mu-cite::                     mu-cite.el
* X-Face::                      x-face,bitmap-mule
* dired-dd::                    dired-dd.el
* MHC::                         MHC
* Addrbook::                    Addrbook
* mime-w3m::                    mime-w3m.el
@end menu


@node imput, BBDB, Living with other packages, Living with other packages
@subsection imput
@pindex imput
@cindex im-wl

Place @file{util/im-wl.el} on the @code{load-path} and do the following
settings.

@lisp
@group
(autoload 'wl-draft-send-with-imput-async "im-wl")
(setq wl-draft-send-function 'wl-draft-send-with-imput-async)
@end group
@end lisp


@node BBDB, LSDB, imput, Living with other packages
@subsection bbdb.el
@pindex BBDB

The Insidious Big Brother Database (@uref{http://savannah.nongnu.org/projects/bbdb/}) supports Wanderlust since 3.2. 
Please ask details of setings to mailing list of Wanderlust of BBDB.
@xref{Mailing List}.


@node LSDB, supercite, BBDB, Living with other packages
@subsection lsdb.el
@pindex LSDB

The following is an example setting to use
The Lovely Sister Database (@uref{http://sourceforge.jp/projects/lsdb/})
with Wanderlust.

@lisp
@group
(require 'lsdb)
(lsdb-wl-insinuate)
(add-hook 'wl-draft-mode-hook
          (lambda ()
             (define-key wl-draft-mode-map "\M-\t" 'lsdb-complete-name)))
@end group
@end lisp

In this example, bind @kbd{M-@key{TAB}} to @code{lsdb-complete-name}
(complete address with LSDB).


@node supercite, mu-cite, LSDB, Living with other packages
@subsection sc.el(supercite), sc-register.el
@pindex sc
@pindex supercite

The same setting as usual mailers should be OK.  The following is an
example of settings:

@lisp
@group
(autoload 'sc-cite-original "supercite" nil t)
(add-hook 'mail-citation-hook 'sc-cite-original)
@end group
@end lisp


@node mu-cite, X-Face, supercite, Living with other packages
@subsection mu-cite.el
@pindex mu-cite

The same setting as usual mailers should be OK.  The following is an
example of settings.

@lisp
@group
(autoload 'mu-cite-original "mu-cite" nil t)
(add-hook 'mail-citation-hook (function mu-cite-original))
@end group
@end lisp

@node X-Face, dired-dd, mu-cite, Living with other packages
@subsection x-face
@pindex x-face

If you have installed one of the following, you can decode
@samp{X-Face:} field in message buffer and you will see face image.

@menu
* x-face-mule::                       Emacs case
@end menu

If there is an encoded X-Face string in a file @file{~/.xface} (the
value of the variable @code{wl-x-face-file}), it is inserted as a
@samp{X-Face:} field in the draft buffer (if
@code{wl-auto-insert-x-face} is non-nil).

@node x-face-mule,  , X-Face, X-Face
@subsubsection x-face-mule
@pindex x-face-mule
@pindex bitmap-mule

If you use @file{x-face-mule.el} in bitmap-mule
(@uref{ftp://ftp.jpl.org/pub/elisp/bitmap/}) 8.0 or later, do the following:

@lisp
@group
(autoload 'x-face-decode-message-header "x-face-mule")
(setq wl-highlight-x-face-function 'x-face-decode-message-header)
@end group
@end lisp

@subsubsection x-face-e21
@pindex x-face-e21

You can use @file{x-face-e21.el}
(@uref{ftp://jpl.org/pub/elisp/}) instead of @file{x-face-mule.el}
to display X-Face. In this case, bitmap-mule is not required.
Do as follows:

@lisp
@group
(autoload 'x-face-decode-message-header "x-face-e21")
(setq wl-highlight-x-face-function 'x-face-decode-message-header)
@end group
@end lisp


@node dired-dd, MHC, X-Face, Living with other packages
@subsection dired-dd(Dired-DragDrop)
@pindex Dired-DragDrop
@pindex Dired-DD
@cindex Drag and Drop

If you embed @file{dired-dd-mime.el} in the dired-dd package, you can
compose multi-part by simple Drag-and-Drop from dired to the draft
buffer being edited in GNU Emacs (this feature is not Wanderlust
specific, but general-purpose for SEMI).

@lisp
@group
;; @r{dired-dd:} http://www.asahi-net.or.jp/~pi9s-nnb/dired-dd-home.html
(add-hook
 'dired-load-hook
 (function
  (lambda ()
    (load "dired-x")
    ;; @r{Set dired-x variables here.}
    ;; @r{To and flo@dots{}}
    (if window-system
        (progn (require 'dired-dd)
               (require 'dired-dd-mime))))))
@end group
@end lisp

@node MHC, Addrbook, dired-dd, Living with other packages
@subsection mhc.el
@pindex MHC

Message Harmonized Calendaring system
(@uref{http://www.quickhack.net/mhc/})

By using MHC, you can make a calendar from the messages.

For mhc-0.25:

@lisp
@group
(setq mhc-mailer-package 'wl)
(autoload 'mhc-mode "mhc" nil t)
(add-hook 'wl-summary-mode-hook 'mhc-mode)
(add-hook 'wl-folder-mode-hook 'mhc-mode)
@end group
@end lisp

For mhc-current:

@lisp
@group
(autoload 'mhc-wl-setup "mhc-wl")
(add-hook 'wl-init-hook 'mhc-wl-setup)
@end group
@end lisp

@node Addrbook, mime-w3m, MHC, Living with other packages
@subsection wl-addrbook.el
@pindex Addrbook

Addrbook of Mew
(@uref{http://www.mew.org/})

Place @file{util/wl-addrbook.el} and @file{util/wl-complete.el} on the
@code{load-path} and do the following settings.

@lisp
@group
(require 'wl-addrbook)
(wl-addrbook-setup)
@end group
@end lisp

@node mime-w3m,  , Addrbook, Living with other packages
@subsection mime-w3m.el
@pindex mime-w3m

You can display html part by using @file{mime-w3m.el}
distributed with emacs-w3m (@uref{http://emacs-w3m.namazu.org/}).
You can find the usage in comment region at the head of @file{mime-w3m.el}.
If you use SEMI-EPG, no additional setting is needed.


@node Highlights, Biff, Living with other packages, Advanced Issues
@section Highlights

@subsection Customizable Variables

@table @code
@item  wl-summary-highlight
@vindex wl-summary-highlight
The initial setting is @code{t}.
If non-nil, the summary is highlighted.

@item  wl-highlight-max-summary-lines
@vindex wl-highlight-max-summary-lines
The initial setting is 10000.
The summary is not highlighted if it has more lines than this value.

@item  wl-summary-highlight-partial-threshold
@vindex wl-summary-highlight-partial-threshold
The initial setting is 1000.
This is a threshold whether the whole summary is highlighted.
If there are more lines of messages in the summary, it is partially
highlighted.

@item  wl-summary-partial-highlight-above-lines
@vindex wl-summary-partial-highlight-above-lines
The initial setting is 30.  If there are more lines of messages than
@code{wl-summary-highlight-partial-threshold} in the summary, messages
after the point that is the same number of lines as this value above the
cursor line are highlighted partially.  (If this value is @code{nil},
the last same number of lines as the value of
@code{wl-summary-highlight-partial-threshold} are highlighted.)

@item wl-highlight-body-too
@vindex  wl-highlight-body-too
The initial setting is @code{t}.
If non-nil, bodies of drafts and messages are also highlighted.

@item  wl-highlight-message-header-alist
@vindex wl-highlight-message-header-alist
When highlighting headers of drafts and messages, this variable
specifies which faces are allocated to important
(@code{wl-highlight-message-important-header-contents}), secondly
important (@code{wl-highlight-message-important-header-contents2}), and
unimportant (@code{wl-highlight-message-unimportant-header-contents})
message headers.
Similarly, it can be used for allocating arbitrary faces to arbitrary
regular expressions.

@item wl-highlight-citation-prefix-regexp
@vindex  wl-highlight-citation-prefix-regexp
Specifies a regular expression to which quoted lines in bodies of
drafts and messages match.
Bodies matching to this regular expression are highlighted by the faces
specified by (@code{wl-highlight-message-cited-text-*}).

@item  wl-highlight-highlight-citation-too
@vindex wl-highlight-highlight-citation-too
The initial setting is @code{nil}.
If non-nil, the quoting regular expression itself given by
@code{wl-highlight-citation-prefix-regexp} is also highlighted.

@item  wl-highlight-citation-header-regexp
@vindex wl-highlight-citation-header-regexp
Specifies a regular expression that denotes beginning of quotation.
Bodies matching to this regular expression are highlighted by the face
specified by @code{wl-highlight-message-headers}.

@item wl-highlight-max-header-size
@vindex wl-highlight-max-header-size
The initial setting is @code{nil}.  If a header size is larger than this
value, it will not be highlighted.  If @code{nil}, always highlighted
(ignore header size).

@item  wl-highlight-max-message-size
@vindex wl-highlight-max-message-size
The initial setting is 10000.
If a message is larger than this value, it will not be highlighted.
With this variable, highlight is suppressed for uuencode or huge digest
messages.

@item  wl-highlight-signature-separator
@vindex wl-highlight-signature-separator
Specifies regular expressions that denotes the boundary of a signature.
It can be a regular expression, or a list of ones.
Messages after the place that matches this regular expression are
highlighted by the face specified by
@code{wl-highlight-message-signature}.

@item  wl-max-signature-size
@vindex wl-max-signature-size
The initial setting is 400.
This is the largest size for a signature to be highlighted.

@item wl-use-highlight-mouse-line
@vindex  wl-use-highlight-mouse-line
The initial setting is @code{t}.
If non-nil, the line pointed by the mouse is highlighted in the folder
mode, summary mode, and the like.
@end table

@subsection Setting Colors and Fonts of the Characters

If you want to change colors or fonts of the characters, you need to
modify faces defined in Wanderlust.  Use @code{set-face-font} if you
want to change fonts, and @code{set-face-foreground} for colors, and so
on.  You cannot write face settings in @file{.emacs}; write in
@file{~/.wl}.

For example, if you want to change the color for signatures to yellow,
write

@lisp
(set-face-foreground 'wl-highlight-message-signature "yellow")
@end lisp

@noindent
in @file{~/.wl}.

Faces defined in Wanderlust:

@table @code
@item wl-highlight-message-headers
The face for field names of message headers.

@item wl-highlight-message-header-contents
The face for field bodies of message headers.

@item wl-highlight-message-important-header-contents
The face for important parts of message headers.
Per default, this face is used for a body of @samp{Subject:} field.
You can change its value by editing
@code{wl-highlight-message-header-alist}.

@item wl-highlight-message-important-header-contents2
The face for secondly important parts of message headers.
Per default, this face is used for bodies of @samp{From:} and @samp{To:}
fields.  You can change its value by editing
@code{wl-highlight-message-header-alist}.

@item wl-highlight-message-unimportant-header-contents
The face for unimportant parts of message headers.
Per default, this face is used for bodies of @samp{X-} fields
@samp{User-Agent:} fields.  You can change its value by editing
@code{wl-highlight-message-header-alist}.

@item wl-highlight-message-citation-header
The face for headers of quoted messages.

@item wl-highlight-message-cited-text-*
The face for texts of quoted messages.  The last @samp{*} is a
@var{single figure} so that 10 different colors can be used according to
citation levels.

@item wl-highlight-message-signature
The face for signatures of messages.  The initial settings are
@samp{khaki} for light background colors, and @samp{DarkSlateBlue} for
dark background colors.

@item wl-highlight-header-separator-face
The face for header separators of draft messages.

@item wl-highlight-summary-important-face
The face for message lines with important marks in the summary.

@item wl-highlight-summary-new-face
The face for message lines with new marks in the summary.

@item wl-highlight-summary-displaying-face
The face for the message line that is currently displayed.
This face is overlaid.

@item wl-highlight-thread-indent-face
The face for the threads that is currently displayed.

@item wl-highlight-summary-unread-face
The face for message lines with unread marks in the summary.

@item wl-highlight-summary-deleted-face
The face for message lines with delete marks in the summary.

@item wl-highlight-summary-refiled-face
The face for message lines with re-file marks in the summary.

@item wl-highlight-refile-destination-face
The face for re-file information part of message lines with re-file
marks in the summary.

@item wl-highlight-summary-copied-face
The face for message lines with copy marks in the summary.

@item wl-highlight-summary-target-face
The face for message lines with target marks @samp{*} in the summary.

@item wl-highlight-summary-thread-top-face
The face for message lines that are on the top of the thread in the
summary.

@item wl-highlight-summary-normal-face
The face for message lines that are not on top of the thread in the
summary.

@item wl-highlight-folder-unknown-face
The face for folders that are not known to have how many unsync messages
in the folder mode.

@item wl-highlight-folder-zero-face
The face for folders that have no unsync messages in the folder mode.

@item wl-highlight-folder-few-face
The face for folders that have some unsync messages in the folder mode.

@item wl-highlight-folder-many-face
The face for folders that have many unsync messages in the folder mode.
The boundary between `some' and `many' is specified by the variable
@code{wl-folder-many-unsync-threshold}.

@item wl-highlight-folder-unread-face
The face for folders that have no unsync but unread messages in the
folder mode.

@item wl-highlight-folder-killed-face
The face for folders that are deleted from the access group in the
folder mode.

@item wl-highlight-folder-opened-face
The face for open groups in the folder mode.
It is meaningful when @code{wl-highlight-folder-by-numbers} is
@code{nil} or a @var{number}.

@item wl-highlight-folder-closed-face
The face for close groups in the folder mode.
It is meaningful when @code{wl-highlight-folder-by-numbers} is
@code{nil} or a @var{number}.

@item wl-highlight-folder-path-face
The face for the path to the currently selected folder in the folder
mode.

@item wl-highlight-logo-face
The face for logo in the demo.

@item wl-highlight-demo-face
The face for strings (for example, a version number) in the demo.
@end table


@node Biff, Password Management, Highlights, Advanced Issues
@section Notify Mail arrival
@cindex Biff

Following setting is to notify mail arrival of @samp{%inbox}
by the indicator on the modeline

@lisp
(setq wl-biff-check-folder-list '("%inbox"))
@end lisp

@subsection Customizable Variables
@table @code
@item wl-biff-check-folder-list
@vindex wl-biff-check-folder-list
The initial setting is @code{nil}.
This is the list of folders to check mail arrival.
If @code{nil}, wl doesn't check mail arrival.

@item wl-biff-check-interval
@vindex wl-biff-check-interval
The initial setting is 40 (in seconds).
Check mail arrival in this period.

@item wl-biff-check-delay
@vindex wl-biff-check-delay
The initial setting is 0 (in seconds).
Check mail when the time spcified by @code{wl-biff-check-interval} has
passed and idling time exceeds specified seconds by this variable.

@item wl-biff-use-idle-timer
@vindex wl-biff-use-idle-timer
The initial setting is @code{nil}.
If it is @code{nil}, check mail arrival when the time specified by
@code{wl-biff-check-interval} has passed.  If it is non-nil, check
mail arrival when idling time exceeds @code{wl-biff-check-interval}.

@item wl-biff-notify-hook
@vindex wl-biff-notify-hook
This hook is run at the arrival of new mail.
To beep with mail arrival (initial setting), set as follows.
@lisp
(setq wl-biff-notify-hook '(ding))
@end lisp
For silence, set to @code{nil}.

@item wl-biff-unnotify-hook
@vindex wl-biff-unnotify-hook
This hook is run if there were new mails at the last check and there is
no new mail at the current check.
@end table


@node Password Management, Split messages, Biff, Advanced Issues
@section Manage Passwords

If you input passwords to connect servers, they are stored in the
variable @code{elmo-passwd-storage} per connection. You should be careful
that others might read your passwords if they can touch your Emacs,
since encoded plain passwords are there.

@findex elmo-passwd-alist-clear
@findex elmo-passwd-alist-save
If you invoke @kbd{M-x elmo-passwd-alist-save} while you have stored
passwords, then they are saved on the file, and it will save you to
input passwords. In this case, the risk that someone reads your
keystroke might decrease, but please note that plain passwords are
stored on a file. You should treat them very carefully.
To remove saved passwords on file, invoke @kbd{M-x elmo-passwd-alist-clear}
and then @kbd{M-x elmo-passwd-alist-save}.

@table @code
@item elmo-passwd-alist-file-name
@vindex elmo-passwd-alist-file-name
The initial setting is @file{passwd}.
This is the name of the file in which passwords are saved.
@code{elmo-passwd-alist-save} saves current passwords to the file.

@item elmo-passwd-life-time
@vindex  elmo-passwd-life-time
The initial setting is @code{nil}.
If the value is some number, timer is set to remove password entry after
@code{elmo-passwd-life-time} seconds since you input the password.
@code{nil} means never to remove passwords.
@end table

@menu
* Auth-source:: Using auth-source for password managament
@end menu


@node Auth-source, , Password Management, Password Management
@subsection Using auth-source for password managament
@cindex auth-source

@vindex elmo-passwd-storage-type
If you write as @code{(setq elmo-passwd-storage-type 'auth-source)} in
your @file{~/.wl}, you can use auth-source (@pxref{Top, , ,auth, Emacs
auth-source}) for password management.


@subsubsection Limitations of using auth-source

Thre are some limitations for auth-source.

@itemize @bullet
@item password is not distinguished by protocol name nor authentication
mechanism.
@item  If you have multiple accounts on the one host,
you have to prepare password entry before use.
In such case, you can't input password interactively.
It is due to auth-sources's bug and fixed in Emacs 28.
@end itemize

@node Split messages, Batch Processing, Password Management, Advanced Issues
@section Message splitting
@cindex Split messages

You can use @code{elmo-split} to split message in folder specified by
the variable @code{elmo-split-folder} a la @command{procmail} according
to some specified rules. To use this feature, set as follows in your
@file{~/.emacs} at first.

@lisp
(autoload 'elmo-split "elmo-split" "Split messages on the folder." t)
@end lisp

Set source folder like following.

@lisp
(setq elmo-split-folder "%inbox")
@end lisp

And specify the rule in the variable @code{elmo-split-rule} (its format
will be is described below).
Then you can invoke @kbd{M-x elmo-split} to split messages according to
@code{elmo-split-rule}. On the other hand, invoke @kbd{C-u M-x elmo-split}
to do a rehearsal and show result (do not split actually).


We will describe how to specify the rule. First of all, see following
example, please.

@lisp
@group
(setq elmo-split-rule
      ;; @r{Store messages from spammers into @samp{+junk}}
      '(((or (address-equal from "i.am@@spammer")
	     (address-equal from "dull-work@@dull-boy")
	     (address-equal from "death-march@@software")
	     (address-equal from "ares@@aon.at")
	     (address-equal from "get-money@@richman"))
	 "+junk")
	;; @r{Store messages from mule mailing list into @samp{%mule}}
	((equal x-ml-name "mule") "%mule")
	;; @r{Store messages from wanderlust mailing list into @samp{%wanderlust}}
	;; @r{and continue evaluating following rules}
	((equal x-ml-name "wanderlust") "%wanderlust" continue)
	;; @r{Store messages from Yahoo user into @samp{+yahoo-@{username@}}}
	((match from "\\(.*\\)@@yahoo\\.com")
	 "+yahoo-\\1")
	;; @r{Store unmatched mails into @samp{+inbox}}
	(t "+inbox")))
@end group
@end lisp

The basic unit of the rule is a combination like

@lisp
(@samp{CONDITION} @samp{ACTION} [@code{continue}])
@end lisp

If @samp{CONDITION} is true, @samp{ACTION} is performed.
The 1st element @samp{CONDITION} is a condition represented by a
balanced expression (sexp). Its grammar will be explained below.
The 2nd element @samp{ACTION} is the name of the folder to split
messages into, or a symbol. When the 3rd element @code{continue} is
specified as symbol, evaluating rules is not stopped even when the
condition is satisfied.

The grammar for @samp{CONDITION} is as follows. See example above to
learn how to write the condition practically.

@enumerate
@item
Functions which accept arguments @samp{FIELD-NAME} and @samp{VALUE}.
(@samp{FIELD-NAME} is a symbol that describes the field name)

@table @code
@item @code{equal}
True if the field value equals to @samp{VALUE}.
Case of the letters are ignored.
@item @code{match}
True if the field value matches to VALUE.
@samp{VALUE} can contain @code{\&} and @code{\N} which will substitute
from matching @code{\(\)} patterns in the previous @samp{VALUE}.
@item @code{address-equal}
True if one of the addresses in the field equals to
@samp{VALUE}. Case of the letters are ignored.
@item @code{address-match}
True if one of the addresses in the field matches to
@samp{VALUE}.
@samp{VALUE} can contain @code{\&} and @code{\N} which will substitute
from matching @code{\(\)} patterns in the previous @samp{VALUE}.
@end table

@item
Functions which accept an integer argument (@samp{SIZE}).

@table @code
@item @code{<}
True if the size of the message is less than @samp{SIZE}.
@item @code{>}
True if the size of the message is greater than @samp{SIZE}.
@end table

@item
Functions which accept any number of arguments.

@table @code
@item @code{or}
True if one of the argument returns true.
@item @code{and}
True if all of the arguments return true.
@end table

@item
A symbol.

When a symbol is specified, it is evaluated.
@end enumerate

You can specify followings as 2nd @samp{ACTION}.

@enumerate
@item
folder name

If some string is specified, it will be regarded as the destination
folder, and the message will be appended to it.

@item
@samp{delete}

If the symbol  @samp{delete} is specified, delete the substance of the
message in @code{elmo-split-folder}

@item
@samp{noop}

If the symbol @samp{noop} is specified, do nothing on the message and
keep it as it is.

@item
function

If some function is specified, execute it.  It is called with two
arugment, folder and message number.  If it returns non-nil value,
@samp{delete} action will be performed additionally.
@end enumerate

If the message passes all rules, it will be dealed along @samp{ACTION}
specified by @code{elmo-split-default-action}.


@node Batch Processing, Advanced Settings, Split messages, Advanced Issues
@section Batch Processing
@cindex Batch Processing

You can request wanderlust to do some job on the command line.
For now, you can invoke prefetching new messages in specified folders.

Specify target folders in @code{wl-batch-prefetch-folder-list} then
invoke as follows to execute prefetching:

@example
@group
% emacs -batch -l wl-batch -f wl-batch-prefetch
@end group
@end example

@subsection Customize Variables

@table @code
@item wl-batch-prefetch-folder-list
@vindex wl-batch-prefetch-folder-list
Target folders of prefetching by @code{wl-batch-prefetch}, specified as
a list of folder names.
@end table


@node Advanced Settings, Customizable Variables, Batch Processing, Advanced Issues
@section Advanced Settings

@menu
* Draft for Reply::             Draft for Reply
* Thread Format::               Appearance of Thread
* User-Agent Field::            @samp{User-Agent:} Header Field
@end menu


@node Draft for Reply, Thread Format, Advanced Settings, Advanced Settings
@subsection Draft for Replay
@vindex wl-draft-reply-with-argument-list
@vindex wl-draft-reply-without-argument-list

If you type @kbd{a} in the Summary Buffer, a draft for reply is prepared.
The addressee for the draft is decided by following rules.

For example, you can set as follows:

@lisp
@group
(setq wl-draft-reply-without-argument-list
      '(("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
        ("Followup-To" . (nil nil ("Followup-To")))
        (("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
        ("From" . (("From") ("To" "Cc") ("Newsgroups")))))
@end group
@end lisp

Where each element of the list  @code{wl-draft-reply-without-argument-list}
is in the form

@example
(key . (to-list cc-list newsgroup-list))
@end example

and if the field designated by @samp{key} exist in the parent message,
parent's field values designated by @samp{to-list} are copied to @samp{To:}
in the draft. Similarly, parent's fields designated by @samp{cc-list} and
@samp{newsgroup-list} are copied to @samp{Cc:} and @samp{Newsgroups:} in
the draft respectively.

Examples:

@lisp
("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups")))
@end lisp

Match if the parent has @samp{Mail-Followup-To} field.
The components of parent's @samp{Mail-Followup-To} and @samp{Newsgroups}
fields are copied to @samp{To} and @samp{Newsgroups} in the draft
respectively.

@lisp
(("X-ML-Name" "Reply-To") . (("Reply-To") nil nil))
@end lisp

Match if the parent has both @samp{X-ML-Name} and @samp{Reply-To} fields.
Parent's @samp{Reply-To} is copied to @samp{To} in the draft.

@lisp
("From" . (("From") ("To" "Cc") ("Newsgroups")))
@end lisp

Copy parent's @samp{From} to @samp{To} in the draft, parent's @samp{To} and
@samp{Cc} to @samp{Cc}, parent's @samp{Newsgroups} to @samp{Newsgroups}
respectively.

These are evaluated in order and first matched one is used.

Moreover, the behavior of @kbd{a} with prefix argument can
be directed by @code{wl-draft-reply-with-argument-list} as well.


By the way, you can use some function (will be evaluated in the parent
message buffer) in the place of @samp{key} or @samp{to-list} etc.

If you want to write a rule for replying to message written by yourself,
specify function @code{wl-draft-self-reply-p} as @samp{key}.

If you only want to reply to mailing lists in
@code{wl-subscribed-mailing-list} if the parent has some of them,
set as follows:

@lisp
@group
(defun wl-mailing-list-addresses ()
  (let (list-addrs)
    (dolist (to (mapcar
		 (lambda (addr)
		   (nth 1 (std11-extract-address-components addr)))
		 (wl-parse-addresses
		  (wl-concat-list
		   (elmo-multiple-fields-body-list (list "To" "Cc"))
		   ","))))
      (when (elmo-string-matched-member to wl-subscribed-mailing-list t)
	(setq list-addrs (cons to list-addrs))))
    (nreverse list-addrs)))

(setq wl-draft-reply-with-argument-list
      '((wl-mailing-list-addresses . (wl-mailing-list-addresses nil nil))
	("Reply-To" . (("Reply-To") nil nil))
	("Mail-Reply-To" . (("Mail-Reply-To") nil nil))
	("From" . (("From") nil nil))))
@end group
@end lisp


@node Thread Format, User-Agent Field, Draft for Reply, Advanced Settings
@subsection Appearance of Threads

@example
@group
  389  09/18(Fri)01:07 [ Teranishi         ] wl-0.6.3
  390  09/18(Fri)07:25 +-[ Tsumura-san       ]
  391  09/18(Fri)19:24 +-[ Murata-san        ]
  392  09/20(Sun)21:49 +-[ Okunishi-san      ]
  396  09/20(Sun)22:11 | +-[ Tsumura-san       ]
  398  09/21(Mon)00:17 |   +-[ Tsumura-san       ]
  408  09/21(Mon)22:37 |     +-[ Okunishi-san      ]
  411  09/22(Tue)01:34 |       +-[ Tsumura-san       ]
  412  09/22(Tue)09:28 |       +-[ Teranishi         ]
  415  09/22(Tue)11:52 |         +-[ Tsumura-san       ]
  416  09/22(Tue)12:38 |           +-[ Teranishi         ]
  395  09/20(Sun)21:49 +-[ Okunishi-san      ]
  397  09/21(Mon)00:15 +-[ Okunishi-san      ]
@end group
@end example

Settings to make appearance of threads like shown above:

@lisp
@group
(setq wl-thread-indent-level 2)
(setq wl-thread-have-younger-brother-str "+")
(setq wl-thread-youngest-child-str       "+")
(setq wl-thread-vertical-str             "|")
(setq wl-thread-horizontal-str           "-")
(setq wl-thread-space-str                " ")
@end group
@end lisp

If you do not want to see branches, do the following:

@lisp
@group
(setq wl-thread-indent-level 2)
(setq wl-thread-have-younger-brother-str " ")
(setq wl-thread-youngest-child-str       " ")
(setq wl-thread-vertical-str             " ")
(setq wl-thread-horizontal-str           " ")
(setq wl-thread-space-str                " ")
@end group
@end lisp


@node User-Agent Field,  , Thread Format, Advanced Settings
@subsection User-Agent Field
@cindex X-Mailer
@cindex User-Agent

If you are eccentric enough to elaborate @samp{X-Mailer:} or
@samp{User-Agent:} fields, define a function that generate appropriate
strings as you like, and set it to variable
@code{wl-generate-mailer-string-function}.

If you do not want verbose @samp{User-Agent:} field, do the following:

@lisp
@group
(setq wl-generate-mailer-string-function
      'wl-generate-user-agent-string-1)
@end group
@end lisp

The following is a example:

@lisp
@group
(setq wl-generate-mailer-string-function nil)
(setq wl-draft-additional-header-alist
      (list
       (cons 'X-Mailer (lambda () (product-string-1 'wl-version)))))
@end group
@end lisp


@node Customizable Variables, Hooks, Advanced Settings, Advanced Issues
@section Customizable Variables

Customizable variables that have not been described yet:

@table @code
@item wl-default-folder
@vindex wl-default-folder
The initial setting is @samp{%inbox}.  This is the default value for moving to
a folder and the like.

@item wl-draft-folder
@vindex wl-draft-folder
The initial setting is @samp{+draft}.  It is the folder to which drafts are
saved.  It must be a writable folder.
You can set IMAP remote folder, Maildir and so on.
Note that variable settings applied by @code{wl-draft-config-exec} is saved
under @code{elmo-msgdb-directory}.  That is to say, if you specified remote
folder as @code{wl-draft-folder}, variable settings which are applied by
@code{wl-draft-config-exec} before saving the draft will not affect on the
draft buffer on another host by invoking @code{wl-summary-reedit}.

@item wl-trash-folder
@vindex wl-trash-folder
The initial setting is @samp{+trash}.  It is the wastebasket folder.
If you changed this variable, you had better restart Wanderlust.

@item wl-interactive-exit
@vindex wl-interactive-exit
The initial setting is @code{t}.
If non-nil, you are asked for confirmation when Wanderlust terminates.

@item wl-interactive-send
@vindex wl-interactive-send
The initial setting is @code{t}.
If non-nil, you are asked for confirmation when mail is sent.

@item wl-default-sync-range
@vindex wl-default-sync-range
The initial setting is @samp{update}.
Default update range of the summary. You can specify
@samp{all}, @samp{update}, @samp{rescan} or @samp{no-sync}.
See description of @code{wl-summary-sync} for the meaning of ranges.

@item wl-folder-sync-range-alist
@vindex wl-folder-sync-range-alist
The initial setting is the alist shown below:

@lisp
@group
(("^&.*$" . "all")
 ("^\\+draft$\\|^\\+queue$" . "all"))
@end group
@end lisp

@noindent
This is an associative list of regular expressions of folder names and
update range of the summary.  Update range is one of the @samp{all},
@samp{update}, @samp{rescan} or @samp{no-sync}. If the folder do not
match any of them, the value of @code{wl-default-sync-range} is used
(@samp{update} by default).
See description of @code{wl-summary-sync} for the meaning of ranges.

@item wl-ask-range
@vindex wl-ask-range
The initial setting is @code{t}.
If @code{nil}, the value of @code{wl-folder-sync-range-alist} is used
for updating the summary when you changed folders.

@item wl-mime-charset
@vindex wl-mime-charset
The initial setting is @code{x-ctext}.
This is the MIME charset for messages that are not MIME (e.g. without
@samp{Content-Type:}). This value also used as default charset for
summary.  (If you want to share Summary on Nemacs and other Emacsen, set
this value as @code{iso-2022-jp}.)

@item wl-highlight-folder-with-icon
@vindex wl-highlight-folder-with-icon
The default value is @code{t}.

@item wl-strict-diff-folders
@vindex wl-strict-diff-folders
This is a list of regular expressions of folders.
Unread messages are checked, for example when you press @kbd{s} in
the folder mode, usually in a brief way (rapidly processed but not
accurate).
The folders matching this variable are seriously checked.
You may want to set this variable so as to match conditional filter
folders for IMAP4 folders.
The initial setting is @code{nil}.

@item wl-folder-use-server-diff
@vindex wl-folder-use-server-diff
When unread messages are checked, for example when you press @kbd{s} in
the folder mode, usually (the number of messages on the server) @minus{}
(the number of local messages) will be the number of unread messages.
However, if this variable is non-nil, the number of unread messages on
the server is checked.  This affects IMAP4 folders only, but IMAP4
folders in mail boxes matching
@code{elmo-imap4-disuse-server-flag-mailbox-regexp} are not checked for
the number of unread messages on the server, even if they matches this
variable.  The initial setting is @code{t}.

@item wl-auto-check-folder-name
@vindex wl-auto-check-folder-name
The initial setting is @code{nil}.
You can specify a folder or a group which is checked for unread message
at the start. You can also specify a list of folders (groups) to be checked.
If the value is @code{nil}, whole Desktop is checked at the start.
If it is @code{none}, no folders are checked.

@item wl-auto-uncheck-folder-list
@vindex wl-auto-uncheck-folder-list
The initial setting is the list shown below:

@lisp
@group
("\\$.*")
@end group
@end lisp

@noindent
You can set a list of regular expressions to specify folders
which are not automatically checked even if they are included
in some groups assigned by @code{wl-auto-check-folder-name}.

@item wl-auto-check-folder-list
@vindex wl-auto-check-folder-list
The initial setting is @code{nil}.
You can set a list of regular expressions to specify exceptions
for @code{wl-auto-uncheck-folder-list}.

@item wl-no-save-folder-list
@vindex wl-no-save-folder-list
The initial setting is the list shown below:

@lisp
@group
("^/.*$")
@end group
@end lisp

@noindent
This is a list of regular expressions of folders not to be saved.

@item wl-save-folder-list
@vindex wl-save-folder-list
The initial setting is @code{nil}.
This is a list of regular expressions of folders to be saved.
This takes precedence over @code{wl-no-save-folder-list}.

@item wl-folder-mime-charset-alist
@vindex wl-folder-mime-charset-alist
The initial setting is the alist shown below:

@lisp
@group
(("^-alt\\.chinese" . big5)
 ("^-relcom\\." . koi8-r)
 ("^-tw\\." . big5)
 ("^-han\\." . euc-kr))
@end group
@end lisp

@noindent
This is an associative list of regular expressions of folder names and
MIME charsets.
If a folder do not match, @code{wl-mime-charset} is used.

@item wl-folder-init-load-access-folders
@vindex wl-folder-init-load-access-folders
The initial setting is @code{nil}.
This is a list of access groups to be loaded specifically at the start.
If it is @code{nil}, @code{wl-folder-init-no-load-access-folders} is referred.

@item wl-folder-init-no-load-access-folders
@vindex wl-folder-init-no-load-access-folders
The initial setting is @code{nil}.
This is a list of access groups not to be loaded specifically at the
start.
It is ignored if @code{wl-folder-init-load-access-folders} is non-nil.

@item wl-dispose-folder-alist
@vindex wl-dispose-folder-alist
The initial setting is the alist shown below:

@lisp
@group
(("^-" . remove)
 ("^@@" . remove))
@end group
@end lisp

@noindent
This list determines disposition of messages with disposal marks.
Each item in the list is a folder and destination; you can specify any
one of the following in the place of destination:

@example
@code{remove} or @code{null} : deletes the messages instantly.
string             : moves the messages to the specific folder.
@code{trash} or others  : moves the messages to @code{wl-trash-folder}.
@end example

@item wl-x-face-file
@vindex wl-x-face-file
The initial setting is @file{~/.xface}.
The name of the file that contains encoded X-Face strings.
@xref{x-face-mule}.

@item wl-demo-display-logo
@vindex wl-demo-display-logo
If non-nil, bitmap image is shown on the opening demo.  If you set
@code{xpm} or @code{xbm}, (if possible) display selected image type
logo.

@item elmo-nntp-list-folders-use-cache
@vindex elmo-nntp-list-folders-use-cache
The initial setting is 600 (in seconds).
This is period in seconds during which results of @samp{list} and
@samp{list active} in NNTP are cached.  If it is @code{nil}, they are
not cached.

@item elmo-nntp-max-number-precedes-list-active
@vindex elmo-nntp-max-number-precedes-list-active
The initial setting is @code{nil}.
If non-nil, the number of article obtained by @samp{list active} in NNTP
are used as the maximum article number of the folder.
Set this to @code{t} if you are using for example INN 2.3 as an NNTP server,
and if the number of read messages is not correct.

@item elmo-nntp-default-use-listgroup
@vindex elmo-nntp-default-use-listgroup
The initial setting is @code{t}.
If non-nil, @samp{listgroup} is used for checking the total number of
articles.  If it is @code{nil}, @samp{group} is used.  In the latter
case, the processing will be a little faster at the sacrifice of
accuracy.

@item elmo-pop3-send-command-synchronously
@vindex elmo-pop3-send-command-synchronously
The initial setting is @code{nil}.
If non-nil, POP3 commands are issued synchronously.  Some implementation
of POP3 server fails to get summary information without this setting.
You may have to set this variable to @code{t}, if the process hangs
while looking up POP3.

@item elmo-dop-flush-confirm
@vindex elmo-dop-flush-confirm
The initial setting is @code{t}.
If non-nil, you are asked for confirmation if accumulated off-line
operations are executed.

@item elmo-network-session-idle-timeout
@vindex elmo-network-session-idle-timeout
The initial setting is @code{nil}.
Idle timeout of the network cache. Specified in seconds.
If elapsed time since last access is larger than this value,
cached session is not reused. If nil, network cache is reused.

@end table


@node Hooks,  , Customizable Variables, Advanced Issues
@section Hooks

(Not yet written)


@node Migration, Terminology, Advanced Issues, Top
@chapter Switch from older version of Wanderlust
@cindex Migration

This chapter explains the important thing for the upgrade,
or migration from the previous version.
It includes the changes of the setup, limitations etc.

@menu
* Before 2.12.0::       From prior to the version 2.12.0 
@end menu

@node Before 2.12.0,  , Migration, Migration
@section Migration from prior to the version 2.12.0 

@subsection The conversion of msgdb 

From version 2.12.0 on, the structure of msgdb is changed.
The msgdb for newly created folder will use this new format when created and saved.
But by writing following line, you may use the old format of the msgdb as it was.

@lisp
@group
(setq elmo-msgdb-default-type 'legacy)
@end group
@end lisp

With the default setup, the old msgdb format is converted to the new
format automatically.  You may change this behavior by writing following
lines in @file{~/.wl}.

@lisp
@group
;; @r{If the format of msgdb is different from} @code{elmo-msgdb-default-type},
;; @r{the format will be converted automatically when}
;; @r{the msgdb is being loaded (default).}
(setq elmo-msgdb-convert-type 'auto)

;; @r{Convert msgdb when hitting @kbd{s all} in Summary mode}
(setq elmo-msgdb-convert-type 'sync)

;; @r{Inhibit conversion}
(setq elmo-msgdb-convert-type nil)
@end group
@end lisp

As is explained in above section, you may continue to use the old format.
But you will have following limitations.

@enumerate
@item
You cannot use forwarded mark (@samp{F}, @samp{f}).
@item
You may only use @samp{important} flag. The other global flags may not
be available.
@end enumerate

@subsection Changes from @samp{'mark} folder to  @samp{'flag}

The folder @samp{'mark} will be automatically converted to @samp{'flag}
folder when you first start the new version of Wanderlust.
But there are some restrictions on this type of migrated folder.

@enumerate
@item
@samp{important} flag attached will not be
removed by deleting the associated message in @samp{'flag} folder.

@item
The message won't be deleted by removing
@samp{important} flag in @samp{'flag} folder.

@item
help-echo will not show you the old message.

@end enumerate

If you have problem with migrating 
from @samp{'mark} folder to the @samp{'flag} folder,
invoking
@kbd{M-x elmo-global-mark-upgrade} will transfer the message
from @samp{'mark} folder to the @samp{'flag} folder.
The duplicated message will not be processed, 
you may issue that command repeatedly.


@node Terminology, Mailing List, Migration, Top
@chapter Terminology around Wanderlust
@cindex Terminology

Here we explain terminologies used in this manual.

@table @samp
@item folder
A container in which messages are stored.

@item group
A set consists of some folders.

@item access group
A special group consists of automatically collected folders under
some specified path.
@xref{Folder Definition}.

@item summary buffer
A buffer for displaying list of messages in some folder.

@item sticky summary
Compared with ordinary summary buffer which will be destroyed after
exiting from it, this type of summary will be remain even after exiting
by @kbd{q} or @kbd{g}.
@xref{Sticky Summary}.

@item expire
To delete or put into the archive expired messages.
@xref{Expire}.

@item score
@xref{Scoring}.

@item prefetch
To cache messages beforehand in order to read messages after you will be
disconnected from the server.
@end table


@node Mailing List, Addition, Terminology, Top
@chapter Wanderlust Mailing List
@cindex Bug report
@cindex Backtrace

Topics related to Wanderlust are discussed in following mailing lists.
The latest version is also announced there.

@display
Wanderlust Mailing List @t{<wl@@ml.gentei.org>}
@end display

In this list Japanese is mainly used for discussion. We also have a list
for discussion in English:

@display
Wanderlust List in English @t{<wl-en@@ml.gentei.org>}
@end display
(Messages posted to this list are also forwarded to the former one.)

A guide can be obtained automatically by sending mail to
@t{wl-ctl@@ml.gentei.org} (or to @t{wl-en-ctl@@ml.gentei.org} for
the English one) with the body

@example
# guide
@end example

Please send bug reports or patches to one of those lists.  You have to
subscribe the mailing list to post a message.

Alternatively, You can also use GitHub.  If you send a pull request,
please embed unindented @file{ChangeLog} entries in commit message like
Emacs's.  See @cite{Commit messages} section of Emacs's CONTRIBUTE file
@footnote{@uref{https://git.savannah.gnu.org/cgit/emacs.git/plain/CONTRIBUTE}}.

If you send a bug report, please attach Backtrace with it.
@footnote{@uref{http://www.jpl.org/elips/BUGS-ja.html} describes how to
in Japanese.}

I would like to express my thanks to the members of the mailing list for
valuable advice and many pieces of code they contributed.

@section Archive

You can read messages posted to the mailing list in NetNews.

Read messages posted to @t{<wl@@ml.gentei.org>}

@example
@uref{news://news.gmane.io/gmane.mail.wanderlust.general.japanese}
@end example

Read messages posted to @t{<wl-en@@ml.gentei.org>}

@example
@uref{news://news.gmane.io/gmane.mail.wanderlust.general}
@end example


@node Addition, Index, Mailing List, Top
@chapter Additional Information

@section Brief History

@example
1998  3/05    Tried to make a prototype that displays MH messages in threads.
      3/10    Made a msgdb mechanism by elisp.
      3/26    IMAP and NNTP can be displayed in threads.
      4/13    Began to assemble thread display modules as elmo.
      5/01    Finished 0.1.0, initial version with many defects.
      6/12    I made a slip of the tongue and said I was writing elisp
              mailer supporting IMAP
      6/16    0.1.3 was announced at tm-ja, elisp ML.
      6/22    Thanks to Kitame-san, the mailing list started at northeye.org.
      7/01    Support for mm-backend (0.3.0).
      8/25    multi folder added (0.5.0).
      8/28    filter folder added (0.5.1).
      9/10    You can open/close threads (0.6.0).
      9/11    fldmgr by Murata-san made editing folders easy.
      9/18    lha folders added by Okunishi-san (0.6.3).
      9/24    Display of branches of threads (0.6.5).
      9/28    Compression folder supporting multiple archivers by Okunishi-san.
     10/28    Off-line operations (0.7.4).
     12/09    Becomes beta version.
     12/21    wl-expire by Murata-san.
1999  2/03    auto-refile by Tsumura-san.
      4/28    wl-template by Murata-san.
      5/18    Released 1.0.0 stable.
      7/05    Scoring by Murata-san (2.1.0).
      9/26    New plugged system by Murata-san (2.2.2).
     12/20    Support Modified UTF7.
2000  3/24    Released 1.1.0 stable.
      4/03    CVS development started.
      5/07    Thread restoration & Its speed up with Murata-san.
      6/12    Address completion with LDAP with Chiba-san & Goto-san.
      7/11    killed message feature.
      7/18    Use UIDL in POP3.
      9/12    biff feature with Satata-san & Yamaoka-san.
     10/17    expire-hide by Okada-san.
     11/08    Released 2.4.0 stable.
2001  7/04    Released 2.6.0 stable.
      8/21    wl-addrmgr by Kitamoto-san.
     12/27    Released 2.8.1 stable.
2002 12/11    Released 2.10.0 stable.
2003  7/05    Released 2.10.1 stable.
      9/18    flag folder is added.
      9/20    New msgdb format (modb-standard) by H.Murata-san.
     10/20    Spam filter by H.Murata-san.
2004  1/06    Background color of the demo become configurable.
      2/09    'file' folder is added.
      9/12    forwarded mark.
              Default value of the mark strings are changed.
     12/24    Released 2.12.0 stable.
@end example

See @file{ChangeLog} for details.

@section The Name

According to a dictionary, Wanderlust has the meaning:

@display
wanderlust
  n eager longing for or impulse towards travelling in distant lands
  [Ger, fr wandern to wander + lust desire, pleasure]
@end display

@noindent
but I had no profound intention.  (if farfetched, IMAP @result{} you can
read mail anywhere @result{} desire to wander ?)

Elmo is the abbreviation of @samp{Elisp Library for Message
Orchestration}.  At first I meant the red puppet in the Sesame Street,
but you may associate it with Wandering @result{} Drifting @result{}
Guidepost @result{} St.@: Elmo's fire @result{} elmo.

@section Code Names

Each versions has code names (they are almost jokes).
Currently they are picked up alphabetically from the top 40 hits of
U.S. Billboard magazines in 1980s.

(@uref{http://ntl.matrix.com.br/pfilho/html/top40/})

@node Index,  , Addition, Top
@unnumbered Index

@menu
* Concept Index::               Concept Index
* Key Index::                   Key Index
* Variable Index::              Variable Index
* Function Index::              Function Index
@end menu

@node Concept Index, Key Index, Index, Index
@unnumberedsec Concept Index
@printindex cp

@node Key Index, Variable Index, Concept Index, Index
@unnumberedsec Key Index
@printindex ky

@node Variable Index, Function Index, Key Index, Index
@unnumberedsec Variable Index
@printindex vr

@node Function Index,  , Variable Index, Index
@unnumberedsec Function Index
@printindex fn

@summarycontents
@contents
@bye

@c Local Variables:
@c fill-column: 72
@c End:
