From: yoichi Date: Sat, 26 Oct 2002 12:13:49 +0000 (+0000) Subject: Describe elmo-split X-Git-Tag: wl-2_11_1~79 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=060405f7e3decb4ce976022989c59b9d28b3387b;p=elisp%2Fwanderlust.git Describe elmo-split --- diff --git a/doc/wl-ja.texi b/doc/wl-ja.texi index f930ca6..925051d 100644 --- a/doc/wl-ja.texi +++ b/doc/wl-ja.texi @@ -144,6 +144,7 @@ into another language, under the above conditions for modified versions. * Disconnected Operations:: $B%*%U%i%$%s=hM}(B * Expire and Archive:: $B%a%C%;!<%8$N<+F0:o=|$H%"!<%+%$%V(B * Scoring:: $B%a%C%;!<%8$N%9%3%"(B +* Split messages:: $B%a%C%;!<%8$N?6$jJ,$1(B * Address Book:: $B%"%I%l%9D"(B * Customization:: $B%+%9%?%^%$%:(B * Terminology:: $BMQ8l$N2r@b(B @@ -1768,9 +1769,11 @@ IMAP $B%U%)%k%@$GD>@\>C$7$?>l9g$@$1%5!<%P>e$N%^!<%/$,>C$($^$9!#(B) $B$3$l$K4^$^$l$k#6$D$N%U%)%k%@$NI=<($r:G?7$N$b$N$K99?7$7$^$9!#(B @subsubsection $B%U%)%k%@$NA*Br(B -$B%U%)%k%@$N9T$K%+!<%=%k$rCV$$$F%j%?!<%s(B($B%9%Z!<%9(B)$B%-!<$r2!$9$H$=$N%U%)%k%@$NFbMF$rI=<($9$k%5%^%j%b!<%I$K0\F0$7$^$9!#(B +$B%U%)%k%@$N9T$K%+!<%=%k$rCV$$$F%j%?!<%s(B($B%9%Z!<%9(B)$B%-!<$r2!$9$H$=$N%U%)%k%@(B +$B$NFbMF$rI=<($9$k%5%^%j%b!<%I$K0\F0$7$^$9!#(B -$B$3$N$H$-!"JQ?t(B @code{wl-stay-folder-window} $B$,(B non-nil $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!#(B +$B$3$N$H$-!"JQ?t(B @code{wl-stay-folder-window} $B$,(B non-nil $B$J$i%5%^%j$K0\F0(B +$B$7$?$H$-$K%U%)%k%@%P%C%U%!$N1&$K%5%^%j$N%P%C%U%!$,8=$l$^$9!#(B @subsection $B%-!<%P%$%s%I(B @@ -5743,7 +5746,7 @@ prefix argument $B$rIU$1$F(B @kbd{C-u M-x wl-summary-archive} $B$G$C$F(B procmail $BIw$K?6$jJ,$1$k$3$H$,$G$-$^$9!#(B +$B$3$N5!G=$r;H$&$K$O!"$^$:(B @file{~/.emacs} $B$K0J2<$N$h$&$K@_Dj$7$F2<$5$$!#(B + +@lisp +(autoload 'elmo-split "elmo-split" "Split messages on the folder." t) +@end lisp + +@kbd{M-x elmo-split} $B$9$k$H(B @code{elmo-split-rule} $B$K=>$C$F?6$jJ,$1$r(B +$B2A$9$k!#(B} + ((equal x-ml-name "wanderlust") "%wanderlust" continue) + ;; @r{Yahoo $BMxMQr7o(B} @samp{$B%U%)%k%@(B} [@code{continue}]) +@end lisp + +$B$H$$$&0lAH$G$9!#(B +$BBh0l$NMWAG(B @samp{$B>r7o(B} $B$O(B sexp $B$G$9!#>\$7$/$O$9$08e$G@bL@$7$^$9!#(B +$BBhFs$NMWAG(B @samp{$B%U%)%k%@(B} $B$O%a%C%;!<%8$N?6$jJ,$1@h$N%U%)%k%@L>$G$9!#(B +$B$b$7Bh;0$NMWAG(B @code{continue} $B$,%7%s%\%k$H$7$FM?$($i$l$k$H!"(B +$B$=$N>r7o$,K~$?$5$l$?$H$7$F$b?6$jJ,$15,B'$NI>2A$rB3$1$^$9!#(B + +@samp{$B>r7o(B} $B$N5-K!$O0J2<$N$h$&$K$J$j$^$9!#e$G5s$2$?Nc$r(B +$B;29M$K$7$F2<$5$$!#(B + +@enumerate +@item +@samp{$B%U%#!<%k%IL>(B} $B$*$h$S(B @samp{$BCM(B} $B$r0z?t$H$7$F(B} $B$O%U%#!<%k%IL>$rI=$9%7%s%\%k$G$9(B) + +@table @code +@item @code{equal} +$B%U%#!<%k%I$NCM$,(B @samp{$BCM(B} $B$KEy$7$1$l$P??!#(B +$BBgJ8;z>.J8;z$N:9$OL5;k$5$l$^$9!#(B +@item @code{match} +$B%U%#!<%k%I$NCM$,(B @samp{$BCM(B} $B$K%^%C%A$9$l$P??!#(B +@samp{$BCM(B} $B$O(B @code{\&} $B$d(B @code{\N} $B$r4^$`$3$H$,$G$-$^$9!#(B +$B$=$l$i$O$=$NA0$N(B @samp{$BCM(B} $B$G(B @code{\(\)} $B$K%^%C%A$7$?%Q%?!<%s$K(B +$BCV$-49$($i$l$^$9!#(B +@item @code{address-equal} +$B$=$N%U%#!<%k%I$K$"$k%"%I%l%9$N$$$:$l$+$,(B @samp{$BCM(B} $B$KEy$7$1$l$P??!#(B +$BBgJ8;z>.J8;z$N:9$OL5;k$5$l$^$9!#(B +@item @code{address-match} +$B$=$N%U%#!<%k%I$K$"$k%"%I%l%9$N$$$:$l$+$,(B @samp{$BCM(B} $B$K%^%C%A$9$l$P??!#(B +@samp{$BCM(B} $B$O(B @code{\&} $B$d(B @code{\N} $B$r4^$`$3$H$,$G$-$^$9!#(B +$B$=$l$i$O$=$NA0$N(B @samp{$BCM(B} $B$G(B @code{\(\)} $B$K%^%C%A$7$?%Q%?!<%s$K(B +$BCV$-49$($i$l$^$9!#(B +@end table + +@item +$BG$0U$N?t$N0z?t$r2A$7$^$9!#(B +@end enumerate + + +@node Address Book, Customization, Split messages, Top @chapter $B%"%I%l%9D"(B @cindex Address Book diff --git a/doc/wl.texi b/doc/wl.texi index 725ba08..ccff474 100644 --- a/doc/wl.texi +++ b/doc/wl.texi @@ -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