Describe elmo-split
authoryoichi <yoichi>
Sat, 26 Oct 2002 12:13:49 +0000 (12:13 +0000)
committeryoichi <yoichi>
Sat, 26 Oct 2002 12:13:49 +0000 (12:13 +0000)
doc/wl-ja.texi
doc/wl.texi

index f930ca6..925051d 100644 (file)
@@ -144,6 +144,7 @@ into another language, under the above conditions for modified versions.
 * Disconnected Operations::  \e$B%*%U%i%$%s=hM}\e(B
 * Expire and Archive::       \e$B%a%C%;!<%8$N<+F0:o=|$H%"!<%+%$%V\e(B
 * Scoring::                  \e$B%a%C%;!<%8$N%9%3%"\e(B
+* Split messages::           \e$B%a%C%;!<%8$N?6$jJ,$1\e(B
 * Address Book::             \e$B%"%I%l%9D"\e(B
 * Customization::            \e$B%+%9%?%^%$%:\e(B
 * Terminology::              \e$BMQ8l$N2r@b\e(B
@@ -1768,9 +1769,11 @@ IMAP \e$B%U%)%k%@$GD>@\>C$7$?>l9g$@$1%5!<%P>e$N%^!<%/$,>C$($^$9!#\e(B)
 \e$B$3$l$K4^$^$l$k#6$D$N%U%)%k%@$NI=<($r:G?7$N$b$N$K99?7$7$^$9!#\e(B
 
 @subsubsection \e$B%U%)%k%@$NA*Br\e(B
-\e$B%U%)%k%@$N9T$K%+!<%=%k$rCV$$$F%j%?!<%s\e(B(\e$B%9%Z!<%9\e(B)\e$B%-!<$r2!$9$H$=$N%U%)%k%@$NFbMF$rI=<($9$k%5%^%j%b!<%I$K0\F0$7$^$9!#\e(B
+\e$B%U%)%k%@$N9T$K%+!<%=%k$rCV$$$F%j%?!<%s\e(B(\e$B%9%Z!<%9\e(B)\e$B%-!<$r2!$9$H$=$N%U%)%k%@\e(B
+\e$B$NFbMF$rI=<($9$k%5%^%j%b!<%I$K0\F0$7$^$9!#\e(B
 
-\e$B$3$N$H$-!"JQ?t\e(B @code{wl-stay-folder-window} \e$B$,\e(B non-nil \e$B$J$i%5%^%j$K0\F0$7$?$H$-$K%U%)%k%@%P%C%U%!$N1&$K%5%^%j$N%P%C%U%!$,8=$l$^$9!#\e(B
+\e$B$3$N$H$-!"JQ?t\e(B @code{wl-stay-folder-window} \e$B$,\e(B non-nil \e$B$J$i%5%^%j$K0\F0\e(B
+\e$B$7$?$H$-$K%U%)%k%@%P%C%U%!$N1&$K%5%^%j$N%P%C%U%!$,8=$l$^$9!#\e(B
 
 @subsection \e$B%-!<%P%$%s%I\e(B
 
@@ -5743,7 +5746,7 @@ prefix argument \e$B$rIU$1$F\e(B @kbd{C-u M-x wl-summary-archive} \e$B$G<B9T$9$k$H!
 @end table
 
 
-@node Scoring, Address Book, Expire and Archive, Top
+@node Scoring, Split messages, Expire and Archive, Top
 @chapter \e$B%9%3%"\e(B
 @cindex Scoring
 @c @cindex Kill File
@@ -6230,7 +6233,104 @@ pop3                    \e$B!_\e(B    \e$B"$\e(B    \e$B"$\e(B    \e$B"$\e(B
 @end example
 
 
-@node Address Book, Customization, Scoring, Top
+@node Split messages, Address Book, Scoring, Top
+@chapter \e$B%a%C%;!<%8$N?6$jJ,$1\e(B
+@cindex Split messages
+
+@code{elmo-split} \e$B$r;H$&$H!"%U%)%k%@\e(B @code{elmo-split-folder} \e$BFb$N\e(B
+\e$B%a%C%;!<%8$rFCDj$N5,B'$K=>$C$F\e(B procmail \e$BIw$K?6$jJ,$1$k$3$H$,$G$-$^$9!#\e(B
+\e$B$3$N5!G=$r;H$&$K$O!"$^$:\e(B @file{~/.emacs} \e$B$K0J2<$N$h$&$K@_Dj$7$F2<$5$$!#\e(B
+
+@lisp
+(autoload 'elmo-split "elmo-split" "Split messages on the folder." t)
+@end lisp
+
+@kbd{M-x elmo-split} \e$B$9$k$H\e(B @code{elmo-split-rule} \e$B$K=>$C$F?6$jJ,$1$r\e(B
+\e$B<B9T$7$^$9!#\e(B @kbd{C-u M-x elmo-split} \e$B$H$9$k$H<B:]$K$O?6$jJ,$1$r9T$o$:$K\e(B
+\e$B%j%O!<%5%k$r9T$J$$$^$9!#\e(B
+
+\e$B0J2<$G$O%k!<%k$N5-=R$N;EJ}$r@bL@$7$^$9!#$^$:$O<!$NNc$r8+$F2<$5$$!#\e(B
+
+@lisp
+@group
+(setq elmo-split-rule
+      ;; @r{SPAM \e$B$O\e(B @samp{+junk} \e$B$X\e(B}
+      '(((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{mule \e$B%a!<%j%s%0%j%9%H$+$i$N%a!<%k$r\e(B @samp{%mule} \e$B$X\e(B}
+       ((equal x-ml-name "mule") "%mule")
+       ;; @r{wanderlust \e$B%a!<%j%s%0%j%9%H$+$i$N%a!<%k$r\e(B @samp{%wanderlust} \e$B$X\e(B}
+       ;; @r{\e$B$=$7$FB3$1$F$=$l0J2<$N5,B'$bI>2A$9$k!#\e(B}
+       ((equal x-ml-name "wanderlust") "%wanderlust" continue)
+       ;; @r{Yahoo \e$BMxMQ<T$+$i$N%a%C%;!<%8$r\e(B @samp{+yahoo-{username}} \e$B$X\e(B}
+       ((match from "\\(.*\\)@@yahoo\\.com")
+        "+yahoo-\\1")
+       ;; @r{\e$B%^%C%A$7$J$+$C$?;D$j$r\e(B @samp{+inbox} \e$B$X\e(B}
+       (t "+inbox")))
+@end group
+@end lisp
+
+\e$B5,B'$N4pK\C10L$O\e(B
+
+@lisp
+(@samp{\e$B>r7o\e(B} @samp{\e$B%U%)%k%@\e(B} [@code{continue}])
+@end lisp
+
+\e$B$H$$$&0lAH$G$9!#\e(B
+\e$BBh0l$NMWAG\e(B @samp{\e$B>r7o\e(B} \e$B$O\e(B sexp \e$B$G$9!#>\$7$/$O$9$08e$G@bL@$7$^$9!#\e(B
+\e$BBhFs$NMWAG\e(B @samp{\e$B%U%)%k%@\e(B} \e$B$O%a%C%;!<%8$N?6$jJ,$1@h$N%U%)%k%@L>$G$9!#\e(B
+\e$B$b$7Bh;0$NMWAG\e(B @code{continue} \e$B$,%7%s%\%k$H$7$FM?$($i$l$k$H!"\e(B
+\e$B$=$N>r7o$,K~$?$5$l$?$H$7$F$b?6$jJ,$15,B'$NI>2A$rB3$1$^$9!#\e(B
+
+@samp{\e$B>r7o\e(B} \e$B$N5-K!$O0J2<$N$h$&$K$J$j$^$9!#<B:]$N=q$-J}$O>e$G5s$2$?Nc$r\e(B
+\e$B;29M$K$7$F2<$5$$!#\e(B
+
+@enumerate
+@item
+@samp{\e$B%U%#!<%k%IL>\e(B} \e$B$*$h$S\e(B @samp{\e$BCM\e(B} \e$B$r0z?t$H$7$F<h$k4X?t!#\e(B
+(@samp{\e$B%U%#!<%k%IL>\e(B} \e$B$O%U%#!<%k%IL>$rI=$9%7%s%\%k$G$9\e(B)
+
+@table @code
+@item @code{equal}
+\e$B%U%#!<%k%I$NCM$,\e(B @samp{\e$BCM\e(B} \e$B$KEy$7$1$l$P??!#\e(B
+\e$BBgJ8;z>.J8;z$N:9$OL5;k$5$l$^$9!#\e(B
+@item @code{match}
+\e$B%U%#!<%k%I$NCM$,\e(B @samp{\e$BCM\e(B} \e$B$K%^%C%A$9$l$P??!#\e(B
+@samp{\e$BCM\e(B} \e$B$O\e(B @code{\&} \e$B$d\e(B @code{\N} \e$B$r4^$`$3$H$,$G$-$^$9!#\e(B
+\e$B$=$l$i$O$=$NA0$N\e(B @samp{\e$BCM\e(B} \e$B$G\e(B @code{\(\)} \e$B$K%^%C%A$7$?%Q%?!<%s$K\e(B
+\e$BCV$-49$($i$l$^$9!#\e(B
+@item @code{address-equal}
+\e$B$=$N%U%#!<%k%I$K$"$k%"%I%l%9$N$$$:$l$+$,\e(B @samp{\e$BCM\e(B} \e$B$KEy$7$1$l$P??!#\e(B
+\e$BBgJ8;z>.J8;z$N:9$OL5;k$5$l$^$9!#\e(B
+@item @code{address-match}
+\e$B$=$N%U%#!<%k%I$K$"$k%"%I%l%9$N$$$:$l$+$,\e(B @samp{\e$BCM\e(B} \e$B$K%^%C%A$9$l$P??!#\e(B
+@samp{\e$BCM\e(B} \e$B$O\e(B @code{\&} \e$B$d\e(B @code{\N} \e$B$r4^$`$3$H$,$G$-$^$9!#\e(B
+\e$B$=$l$i$O$=$NA0$N\e(B @samp{\e$BCM\e(B} \e$B$G\e(B @code{\(\)} \e$B$K%^%C%A$7$?%Q%?!<%s$K\e(B
+\e$BCV$-49$($i$l$^$9!#\e(B
+@end table
+
+@item
+\e$BG$0U$N?t$N0z?t$r<h$k4X?t!#\e(B
+
+@table @code
+@item @code{or}
+\e$B0z?t$N$$$:$l$+$,??$rJV$9$J$i$P??!#\e(B
+@item @code{and}
+\e$B0z?t$N$9$Y$F$,??$rJV$9$J$i$P??!#\e(B
+@end table
+
+@item
+\e$B%7%s%\%k!#\e(B
+
+\e$B%7%s%\%k$,;XDj$5$l$k$H!"$=$l$rI>2A$7$^$9!#\e(B
+@end enumerate
+
+
+@node Address Book, Customization, Split messages, Top
 @chapter \e$B%"%I%l%9D"\e(B
 @cindex Address Book
 
index 725ba08..ccff474 100644 (file)
@@ -119,6 +119,7 @@ This manual is for Wanderlust @value{VERSION}.
 * Disconnected Operations::  Off-Line management
 * Expire and Archive::       Automatic expiration and archiving of messages
 * Scoring::                  Score of the messages
+* Split messages::           Splitting messages
 * Address Book::             Management of Address Book
 * Customization::            Customizing Wanderlust
 * Terminology::              Terminologies
@@ -5822,7 +5823,7 @@ Needless to say, you can use your own function.
 @end table
 
 
-@node Scoring, Address Book, Expire and Archive, Top
+@node Scoring, Split messages, Expire and Archive, Top
 @chapter Score of the Messages
 @cindex Scoring
 @c @cindex Kill File
@@ -6320,7 +6321,104 @@ pop3                      N     E     E     E
 @end example
 
 
-@node Address Book, Customization, Scoring, Top
+@node Split messages, Address Book, Scoring, Top
+@chapter Message splitting
+@cindex Split messages
+
+You can use @code{elmo-split} to split message in folder
+@code{elmo-split-folder} a la 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
+
+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 (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{FOLDER} [@code{continue}])
+@end lisp
+
+The 1st element @samp{CONDITION} is a sexp. Its grammar will be
+explained below. The 2nd element @samp{FOLDER} is the name of the folder
+to split messages into. 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 argument @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 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
+
+
+@node Address Book, Customization, Split messages, Top
 @chapter Address Book
 @cindex Address Book