@c @documentlanguage ja
 @c %**end of header
 @c Wanderlust \e$B$N\e(B texinfo
-@set Time-stamp: <2000-04-10 09:51:22 teranisi>
+@set Time-stamp: <00/04/12 00:01:23 teranisi>
 @set version 1.1.1
 @synindex pg cp
 @finalout
 @end table
 
 @subsection \e$B<+F0%j%U%!%$%k\e(B
+@vindex elmo-msgdb-extra-fields
+@vindex wl-refile-rule-alist
+@findex wl-summary-auto-refile
 
 \e$B%a%C%;!<%8$N%X%C%@>pJs$+$iG$0U$N%U%)%k%@$X?6$jJ,$1$k<+F0%j%U%!%$%k5!G=$,\e(B
 @kbd{C-o} (@code{wl-summary-auto-refile}) \e$B$G;HMQ$G$-$^$9!#<+F0%j%U%!%$%k$O\e(B 
 @lisp
 (setq elmo-msgdb-extra-fields
       '("x-ml-name"
-      "reply-to"
-      "sender"
-      "mailing-list"
-      "newsgroups"))
+        "reply-to"
+        "sender"
+        "mailing-list"
+        "newsgroups"))
 @end lisp
 
 @noindent
 \e$B$,$"$j$^$9!#\e(B
 
 \e$B<!$K?6$jJ,$1$9$k%k!<%k$r@_Dj$7$^$9!#\e(B
+\e$B<+F0?6$jJ,$1$O!$JQ?t\e(B @code{wl-refile-rule-alist} \e$B$NCM$K4p$E$$$F9T$o$l$^$9!#\e(B
+@code{wl-refile-rule-alist} \e$B$O!"\e(B
+
+@example
+        (\e$B%U%#!<%k%I\e(B (\e$B@55,I=8=\e(B . \e$B?6$jJ,$1@h\e(B)
+                    (\e$B@55,I=8=\e(B . \e$B?6$jJ,$1@h\e(B)
+                    @dots{})
+@end example
+
+\e$B$N$h$&$J%k!<%k$N%j%9%H$H$J$C$F$$$^$9!#3F%k!<%k$O!"!X%U%#!<%k%I!Y$NCM$,\e(B
+\e$B!X@55,I=8=!Y$K%^%C%A$9$k$H$-$K!X?6$jJ,$1@h!Y$K?6$jJ,$1$k$H$$$&0UL#$r;}$A\e(B
+\e$B$^$9!#A0J}$K;XDj$5$l$?%k!<%k$,M%@h$5$l$^$9!#\e(B
+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l")
          ("^Elisp" . "+elisp"))
+        (("To" "Cc")
+         ("\\([a-z]+\\)@@gohome.org" . "+\\1"))
         ("From"
-         ("teranisi@@isl.ntt.co.jp" . "+teranisi"))))
+         ("me@@gohome.org" . ("To" ("you@@gohome.org" . 
+                                    "+from-me-to-you"))))))
 @end lisp
 
-\e$B$3$N$h$&$J@_Dj$r$7\e(B @kbd{C-o} (@code{wl-summary-auto-refile}) \e$B$G>r7o$K\e(B
-\e$B%^%C%A$7$?%a%C%;!<%8$K%j%U%!%$%k%^!<%/$,IU2C$5$l$^$9!#\e(B@kbd{x} \e$B$G%j%U%!%$\e(B
-\e$B%k$r<B9T$7$^$9!#%k!<%k$NA0J}$K$"$k?6$jJ,$1>r7o$,M%@h$5$l$^$9!#\e(B
+@kbd{C-o} (@code{wl-summary-auto-refile}) \e$B$G>r7o$K%^%C%A$7$?%a%C%;!<%8$K\e(B
+\e$B%j%U%!%$%k%^!<%/$,IU2C$5$l$^$9!#\e(B@kbd{x} \e$B$G%j%U%!%$%k$r<B9T$7$^$9!#\e(B
 
 @code{wl-summary-auto-refile-skip-marks} \e$B$r@_Dj$9$k$3$H$K$h$j!"\e(B
 \e$B<+F0%j%U%!%$%k$NBP>]$H$9$k%a%C%;!<%8$rJQ99$9$k$3$H$,$G$-$^$9!#\e(B
 @noindent
 \e$B$NMM$K\e(B @code{wl-summary-auto-refile-skip-marks} \e$B$r\e(B nil \e$B$K$7$^$9!#\e(B
 
-
 @subsection \e$B%9%F%#%C%-!<%5%^%j\e(B
 @cindex Summary, Sticky
 @cindex Sticky Summary
 @kindex N (Summary)
 @findex wl-summary-down
 \e$B2<J}8~$K$"$kL$FI$b$7$/$O\e(B @samp{$}\e$B%^!<%/$D$-$N%a%C%;!<%8$X0\F0$7$^$9!#\e(B
+\e$B%*%U%i%$%s%b!<%I$N$H$-$K$O!"%-%c%C%7%e$5$l$F$$$J$$%a%C%;!<%8$K0\F0$7$^$;$s!#\e(B
 (@code{wl-summary-down})
 
 @item P
 @kindex P (Summary)
 @findex wl-summary-up
 \e$B>eJ}8~$K$"$kL$FI$b$7$/$O\e(B @samp{$}\e$B%^!<%/$D$-$N%a%C%;!<%8$X0\F0$7$^$9!#\e(B
+\e$B%*%U%i%$%s%b!<%I$N$H$-$K$O!"%-%c%C%7%e$5$l$F$$$J$$%a%C%;!<%8$K0\F0$7$^$;$s!#\e(B
 (@code{wl-summary-up})
 
 @item w
 
 @c @documentlanguage en
 @c %**end of header
 @c texinfo of Wanderlust
-@set Time-stamp: <2000-04-10 09:57:19 teranisi>
+@set Time-stamp: <00/04/12 00:04:16 teranisi>
 @set version 1.1.1
 @synindex pg cp
 @finalout
 @end lisp
 
 @noindent
-
 @subsection Install as a XEmacs package
 @cindex XEmacs package
 @cindex XEmacs package install
 @end example
 
 @noindent
-
 One line defines one persons description.
 
 Actually, in default setup, "nickname" is used in summary-mode and "real name"
 @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
 @end lisp
 
 @noindent
-
-
 @node Archive Vars,  , Archive Tips, Archive Folder
 @subsection Variables About Archive Folder
 @cindex Archive variables
 @end example
 
 @noindent
-
 @kbd{s} key on the folder line updates these numbers.
 It changes its color if it has many new messages.
 
 @end example
 
 @noindent
-
 If you type @kbd{/} on this line, the thread is opened and it changes
 the appearance like following.
 
 @end example
 
 @noindent
-
 The command deletes cache files to the specified size by the order of
 last accessed time.
 
 @end table
 
 @subsection Auto Refile
+@vindex elmo-msgdb-extra-fields
+@vindex wl-refile-rule-alist
+@findex wl-summary-auto-refile
 
-You refile messages automatically, by typing @kbd{C-o}
+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).
 
 @lisp
 (setq elmo-msgdb-extra-fields
       '("x-ml-name"
-      "reply-to"
-      "sender"
-      "mailing-list"
-      "newsgroups"))
+        "reply-to"
+        "sender"
+        "mailing-list"
+        "newsgroups"))
 @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 exists in the summary.
 
-Then, specify the refile rule in the @code{wl-refile-rule-alist} like
-following.
+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
+        (FIELD (REGEXP . TARGET)
+               (REGEXP . TARGET)
+               @dots{})
+@end example
+
+Each rule means `if FIELD value matches REGEXP, then refile to TARGET folder'.
+The rule matched first is applied.
+
+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).
+
+REGEXP is a regular expression for field value.  TARGET is a target
+folder string. You can specify a rule at 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).
+
+In TARGET part, you can refer matched substring of REGEXP.
+To refer substring, specify following in TARGET:
+
+@example
+\&            means substitute original matched text.
+\N (number)   means substitute what matched the Nth `\(...\)'.
+@end example
+
+Following is an example of @code{wl-refile-rule-alist}.
 
 @lisp
 (setq wl-refile-rule-alist
-      '(
-        ("x-ml-name"
+      '(("x-ml-name"
          ("^Wanderlust" . "+wl")
          ("^Elisp" . "+elisp"))
+        (("To" "Cc")
+         ("\\([a-z]+\\)@@gohome.org" . "+\\1"))
         ("From"
-         ("teranisi@@isl.ntt.co.jp" . "+teranisi"))))
+         ("me@@gohome.org" . ("To" ("you@@gohome.org" . 
+                                    "+from-me-to-you"))))))
 @end lisp
 
-After these setting, refile marks are automatically put on the condition
+After these settings, refile marks are automatically put on the condition
 matched messages by typing @kbd{C-o} (@code{wl-summary-auto-refile}).
-The rule matched first is applied.
 
 Messages which have @code{wl-summary-auto-refile-skip-marks} is skipped
 auto refiling. 
 @end example
 
 @noindent
-
 @subsection Sending mail by POP-before-SMTP
 @cindex POP-before-SMTP
 
 @end example
 
 @noindent
-
 The folder is examined if it matches "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.