Synch to No Gnus 200603080905.
authoryamaoka <yamaoka>
Wed, 8 Mar 2006 09:06:15 +0000 (09:06 +0000)
committeryamaoka <yamaoka>
Wed, 8 Mar 2006 09:06:15 +0000 (09:06 +0000)
lisp/ChangeLog
lisp/nnmail.el
texi/ChangeLog
texi/gnus-ja.texi
texi/gnus.texi

index 3ffb333..1b44fac 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-08  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * nnmail.el (nnmail-split-it): Invert match-partial-words behavior
+       if optional last element is specified in splits (FIELD VALUE...).
+
 2006-03-07  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * message.el (message-make-tool-bar): Rename gmm-image-load-path
index c16dc46..a41d292 100644 (file)
@@ -1419,11 +1419,12 @@ See the documentation for the variable `nnmail-split-fancy' for details."
 
      ;; Not in cache, compute a regexp for the field/value pair.
      (t
-      (let* ((field (nth 0 split))
-            (value (nth 1 split))
-            partial-front
-            partial-rear
-            regexp)
+      (let ((field (nth 0 split))
+           (value (nth 1 split))
+           (split-rest (cddr split))
+           partial-front
+           partial-rear
+           regexp)
        (if (symbolp value)
            (setq value (cdr (assq value nnmail-split-abbrev-alist))))
        (if (and (>= (length value) 2)
@@ -1435,7 +1436,13 @@ See the documentation for the variable `nnmail-split-fancy' for details."
                 (string= ".*" (substring value -2)))
            (setq value (substring value 0 -2)
                  partial-rear ""))
-       (when nnmail-split-fancy-match-partial-words
+       ;; Invert the match-partial-words behavior if the optional
+       ;; last element is specified.
+       (while (eq (car split-rest) '-)
+         (setq split-rest (cddr split-rest)))
+       (when (if (cadr split-rest)
+                 (not nnmail-split-fancy-match-partial-words)
+               nnmail-split-fancy-match-partial-words)
          (setq partial-front ""
                partial-rear ""))
        (setq regexp (concat "^\\(\\("
index 3bd26fd..8cfde7d 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-08  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus.texi (Fancy Mail Splitting): Improve descriptions about
+       partial-words matching.
+
 2006-03-07  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * emacs-mime.texi (Display Customization): Reword image/.* stuff.
index 3e14f1f..f67aef2 100644 (file)
@@ -13664,14 +13664,21 @@ UNDELETED} \e$B$O$*$=$i$/$?$$$F$$$N?M$K$O:GNI$NA*Br$G$7$g$&$,!"$H$-$I\e(B
 \e$B8=$NE83+$,9T$J$o$l$^$9!#8e=R$NNc\e(B (\e$BLuCm\e(B: @samp{\\&},
 @samp{\\1}\e$B!A\e(B@samp{\\9}) \e$B$r8+$F2<$5$$!#\e(B
 
-@item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split})
-\e$B$b$7J,3d$,%j%9%H$G!":G=i$NMWAG$,J8;zNs$G$"$j!"%X%C%@!<$N\e(B @var{field} (\e$B@5\e(B
-\e$B5,I=8=\e(B) \e$B$,\e(B @var{value} (\e$B$3$l$b@55,I=8=\e(B) \e$B$r4^$s$G$$$k>l9g!"%a%C%;!<%8\e(B
-\e$B$r\e(B @var{split} \e$B$G;XDj$5$l$?%0%k!<%W$K3JG<$7$^$9!#\e(B@var{field} \e$B$N8e$K$"$C\e(B
-\e$B$F$7$+$b9gCW$7$?\e(B @var{value} \e$B$N:G8eHx$h$jA0$K$"$k2?$+$NJ8;zNs\e(B
-\e$B$K\e(B @var{restrict} (\e$B$3$l$b$^$?@55,I=8=\e(B) \e$B$,9gCW$7$?$i!"\e(B@var{split} \e$B$OL5;k\e(B
-\e$B$5$l$^$9!#$$$/$D$+$N\e(B @var{restrict} \e$B$N$I$l$b$,9gCW$7$J$1$l\e(B
-\e$B$P\e(B @var{split} \e$B$,<B9T$5$l$^$9!#\e(B
+@c \e$B$3$N9T$r@^$jJV$5$J$$$G2<$5$$!#\e(B
+@item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split} [@var{invert-match-partial-words}])
+\e$B$b$7J,3d$,%j%9%H$G!":G=i$NMWAG$,J8;zNs$G$"$j!"\e(B@var{field} (\e$B@55,I=8=\e(B) \e$B$K\e(B
+\e$B9gCW$9$k%X%C%@!<$,\e(B @var{value} (\e$B$3$l$b@55,I=8=\e(B) \e$B$K9gCW$9$kJ8;zNs$r4^$s$G\e(B
+\e$B$$$?$J$i$P!"\e(B@var{split} \e$B$G;XDj$5$l$?%0%k!<%W$K%a%C%;!<%8$r3JG<$7$^$9!#\e(B
+@var{field} \e$B$N8e$K$"$C$F!"$7$+$b9gCW$7$?\e(B @var{value} \e$B$N:G8eHx$h$jA0$K$"\e(B
+\e$B$k2?$+$NJ8;zNs$K\e(B @var{restrict} (\e$B$3$l$b$^$?@55,I=8=\e(B) \e$B$,9gCW$7$?$i!"\e(B
+@var{split} \e$B$OL5;k$5$l$^$9!#$$$/$D$+$N\e(B @var{restrict} \e$B$N$I$l$b$,9gCW$7$J\e(B
+\e$B$1$l$P\e(B @var{split} \e$B$,<B9T$5$l$^$9!#\e(B
+
+\e$B:G8e$NMWAG\e(B @var{invert-match-partial-words} \e$B$OG$0U$G$9!#$3$l$,>JN,$5$l$F\e(B
+\e$B$$$J$/$F!"$7$+$bCM$,\e(B @code{nil} \e$B$G$J$1$l$P!"8l\e(B (word) \e$B$N6-3&$r$^$?$$$G@5\e(B
+\e$B5,I=8=$N9gCW$r9T$J$&$+$I$&$+$N?6$kIq\e(B
+\e$B$$\e(B (@code{nnmail-split-fancy-match-partial-words} \e$BJQ?t$K$h$C$F@)8f$5$l$^\e(B
+\e$B$9\e(B) \e$B$,H?E>$7$^$9\e(B (\e$B2<5-;2>H\e(B)\e$B!#\e(B
 
 @item (| @var{split} @dots{})
 \e$BJ,3d$,%j%9%H$G!":G=i$NMWAG$,\e(B @code{|} (\e$B?bD>K@\e(B) \e$B$@$C$?$i!"$=$l$>$l\e(B
@@ -13723,39 +13730,50 @@ UNDELETED} \e$B$O$*$=$i$/$?$$$F$$$N?M$K$O:GNI$NA*Br$G$7$g$&$,!"$H$-$I\e(B
 \e$BJ,3d$,\e(B @code{nil} \e$B$@$C$?$i!"$=$l$OL5;k$5$l$^$9!#\e(B
 @end table
 
-\e$B$3$l$i$NJ,3d$G!"\e(B@var{fileld} \e$B$O40A4$J%U%#!<%k%IL>$K9gCW$7$J$1$l$P$J$j$^\e(B
-\e$B$;$s!#\e(B@var{value} \e$B$O4pAC%b!<%I\e(B (fundamental mode) \e$B9=J8%F!<%V%k\e(B (syntax
-table) \e$B$K=>$C$F40A4$K9gCW$7$J$1$l$P$J$j$^$;$s!#%U%#!<%k%IL>$+8l$N0lItJ,\e(B
-\e$B$K9gCW$5$;$k$?$a$K!"@55,I=8=$G\e(B @code{.*} \e$B$r;H$&$3$H$,$G$-$^$9!#8@$$49$(\e(B
-\e$B$l$P!"$9$Y$F$N\e(B @var{value} \e$B$O\e(B @samp{\<} \e$B$H\e(B @samp{\>} \e$B$NBP$G0O$^$l$^$9!#\e(B
+\e$B$3$l$i$NJ,3d$G\e(B @var{fileld} \e$B$O40A4$J%U%#!<%k%IL>\e(B (\e$B$H8@$&$+%X%C%@!<L>\e(B) \e$B$K\e(B
+\e$B9gCW$7$J$1$l$P$J$j$^$;$s!#\e(B
 
-@quotation
-\e$BLuCm\e(B: \e$B$3$N7o$OHs>o$K=EMW$G$9!#Nc$($P0J2<$NJ,3d$O!"%G%#%U%)%k%H$G$O1J5W\e(B
-\e$B$K\e(B @samp{foo@@example.com} \e$B$H$$$&%a!<%k%"%I%l%9$K9gCW$9$k$3$H$O$"$j$^$;\e(B
-\e$B$s\e(B:
+\e$BDL>o$3$l$i$NJ,3d$K$*$1$k\e(B @var{value} \e$B$O!"4pAC%b!<%I\e(B (fundamental
+mode) \e$B9=J8%F!<%V%k\e(B (syntax table) \e$B$K=>$C$F!"40A4$K\e(B @emph{\e$B8l\e(B} (word) \e$B$K9g\e(B
+\e$BCW$7$J$1$l$P$J$j$^$;$s!#8@$$49$($l$P!"$9$Y$F$N\e(B @var{value} \e$B$O0E\e(B
+\e$B$K\e(B @code{\<...\>} \e$B0u\e(B (\e$B8l$N6h@Z$j5-9f\e(B) \e$B$G0O$^$l$^$9!#$7$?$,$C$F!"Nc$($P0J\e(B
+\e$B2<$NJ,3d$r;H$&$H!"\e(B
 
-@lisp
-;; @r{@@example.com} \e$B$+$iMh$?$9$Y$F$N%a!<%k$r\e(B example \e$B%0%k!<%W$KF~$l$k!#\e(B
-(from "@@example\\.com" "example")
-@end lisp
+@example
+(any "joe" "joemail")
+@end example
 
-\e$B$J$<$+$H8@$&$H!"<B:]$K9T$J$o$l$k=hM}$O\e(B
+@noindent
+@samp{joedavis@@foo.org} \e$B$+$i$d$C$FMh$?%a%C%;!<%8$O!"DL\e(B
+\e$B>o\e(B @samp{joemail} \e$B$K$O3JG<$5$l$J$$$G$7$g$&!#$3$N?6$kIq$$$rJQ99$7$?$1$l$P!"\e(B
+\e$B0J2<$N;0$D$N$d$jJ}$N$I$l$G$b$r;H$&$3$H$,$G$-$^$9\e(B:
 
-@lisp
-(string-match "@@example\\.com" "foo@@example.com")
-@end lisp
+@enumerate
+@item
+@vindex nnmail-split-fancy-match-partial-words
+@code{nnmail-split-fancy-match-partial-words} \e$BJQ?t$r\e(B @code{nil} \e$B$G$O$J$$\e(B
+\e$BCM$K@_Dj$9$k$3$H$K$h$C$F!"8l$N6-3&$rL5;k$5$;$k$3$H$,$G$-$^$9!#$9$k$H!"9g\e(B
+\e$BCW$O$h$j\e(B grep \e$B$U$&$K$J$j$^$9!#$3$NJQ?t$O!"FC5iJ,3d$G8l$N6-3&$r$^$?$$$@9g\e(B
+\e$BCW$r9T$J$&$+$I$&$+$r@)8f$7$^$9!#%G%#%U%)%k%HCM$O\e(B @code{nil} \e$B$G$9!#\e(B
 
-\e$B$G$O$J$/$F!"\e(B
+\e$BJ,3d$N5,B'$N$9$Y$F$N\e(B @var{value} \e$B$K1F6A$9$k$3$H$KCm0U$7$F2<$5$$!#\e(B
 
-@lisp
-(string-match "\\<@@example\\.com\\>" "foo@@example.com")
-@end lisp
+@item
+@code{.*} \e$B$G;O$^$k\e(B @var{value} \e$B$O!"8l$NA0$K$"$k8l$N6-3&$rL5;k$5$;$^$9!#\e(B
+\e$BF1MM$K\e(B @code{.*} \e$B$G=*$o$k\e(B @var{value} \e$B$O!"8l$N8e$m$K$"$k8l$N6-3&$rL5;k$5\e(B
+\e$B$;$^$9!#Nc$($P\e(B @code{"@@example\\.com"} \e$B$H$$\e(B
+\e$B$&\e(B @var{value} \e$B$O\e(B @samp{foo@@example.com} \e$B$K9gCW$7$^$;$s$,!"\e(B
+@code{".*@@example\\.com"} \e$B$J$i$P9gCW$7$^$9!#\e(B
 
-\e$B$@$+$i$G$9!#\e(B
-@code{nnmail-split-fancy-match-partial-words} (\e$B8e=R\e(B) \e$B$r\e(B @code{nil} \e$B$G$O\e(B
-\e$B$J$$CM$K@_Dj$9$l$P!"$"$J$?$,@_Dj$7$?@55,I=8=$O\e(B @samp{\<} \e$B$H\e(B @samp{\>} \e$B$N\e(B
-\e$BBP$G0O$^$l$^$;$s!#\e(B
-@end quotation
+@item
+\e$B$3$N>O$N:G=i$NJ}$G=R$Y$?\e(B @var{invert-match-partial-words} \e$B%U%i%0$r!"\e(B
+@samp{(@var{field} @var{value} @dots{})} \e$B7?$NJ,3d5,B'$G;H$&$3$H$,$G$-$^\e(B
+\e$B$9!#$3$N%U%i%0$,@_Dj$5$l$F$$$k$H!"\e(B
+@code{nnmail-split-fancy-match-partial-words} \e$B$,\e(B @code{nil} \e$B$G$"$C$F$b!"\e(B
+\e$B8l$NN>B&$K$"$k8l$N6-3&$OL5;k$5$l$^$9!#5U$K!"$3$N%U%i%0$,@_Dj$5$l$F$$$k$H!"\e(B
+@code{nnmail-split-fancy-match-partial-words} \e$B$,\e(B @code{nil} \e$B$G$O$J$$CM$G\e(B
+\e$B$"$C$F$b!"8l$N6-3&$OL5;k$5$l$^$;$s!#\e(B
+@end enumerate
 
 @vindex nnmail-split-abbrev-alist
 @var{field} \e$B$H\e(B @var{value} \e$B$O\e(B Lisp \e$B%7%s%\%k$G$"$k$3$H$b$G$-$^$9!#$=$N>l\e(B
@@ -13805,24 +13823,6 @@ table) \e$B$K=>$C$F40A4$K9gCW$7$J$1$l$P$J$j$^$;$s!#%U%#!<%k%IL>$+8l$N0lItJ,\e(B
 \e$B$b!"J#?t$N%0%k!<%W$,@8@.$5$l$F$7$^$&$3$H$rHr$1$k$3$H$,$G$-$^$9!#%G%#%U%)\e(B
 \e$B%k%H$O\e(B @code{t} \e$B$G$9!#\e(B
 
-@vindex nnmail-split-fancy-match-partial-words
-@code{nnmail-split-fancy-match-partial-words} \e$B$O!"FC5iJ,3d$GItJ,E*$J8l$,\e(B
-\e$B9gCW$9$k$+$I$&$+$r@)8f$7$^$9!#\e(B
-
-\e$BDL>o\e(B @code{nnmail-split-fancy} \e$B$GM?$($i$l$k@55,I=8=$O!"0E$K8l$N6h@Z$j$r\e(B
-\e$BI=$9\e(B @code{\<...\>} \e$B0u$G0O$^$l$F$$$^$9!#$3$NJQ?t$,??$G$"$k$H!"$=$l$i$O2?\e(B
-\e$B$K$h$C$F$b0E$K0O$^$l$^$;$s!#\e(B
-
-@example
-(any "joe" "joemail")
-@end example
-
-\e$B$3$NNc$G$O!"\e(B@samp{joedavis@@foo.org} \e$B$+$iMh$?%a%C%;!<%8$O!"%G%#%U%)%k%H\e(B
-\e$B$G$O\e(B @samp{joemail} \e$B$K3JG<$5$l$^$;$s!#$7$+$7!"\e(B
-@code{nnmail-split-fancy-match-partial-words} \e$B$r\e(B @code{t} \e$B$K@_Dj$9$k$H9g\e(B
-\e$BCW$,5/$-$^$9!#MW$9$k$K!"8l$r6h@Z$k>r7o$,:o=|$5$l!"Be$o$j$K9gCW$,$h\e(B
-\e$B$j\e(B grep \e$B$i$7$/$J$k$N$G$9!#\e(B
-
 @findex nnmail-split-fancy-with-parent
 \e$B4X?t\e(B @code{nnmail-split-fancy-with-parent} \e$B$O!"%U%)%m!<%"%C%W5-;v$r?F5-\e(B
 \e$B;v$HF1$8%0%k!<%W$K?6$jJ,$1$k$?$a$K;H$$$^$9!#%a!<%k$N?6$jJ,$1$r0l@87|L?@_\e(B
@@ -13864,7 +13864,7 @@ table) \e$B$K=>$C$F40A4$K9gCW$7$J$1$l$P$J$j$^$;$s!#%U%#!<%k%IL>$+8l$N0lItJ,\e(B
 \e$B8=\e(B @code{nnmail-split-fancy-with-parent-ignore-groups} \e$B$K9gCW$7$J$1$l$P!"\e(B
 \e$B$3$N4X?t$OBP1~$9$k%0%k!<%WL>$rJV$9$o$1$G$9!#$3$3$G!"JQ\e(B
 \e$B?t\e(B @code{nnmail-message-id-cache-length} \e$B$NCM$r%G%#%U%)%k%H$h$j$b4v$i$+\e(B
-\e$BBg$-$JCM$K@_Dj$9$k$3$H$r$*4+$a$7$^$9!#$=$&$9$k$H!":#D4$Y$i$l$?%a%C%;!<\e(B
+\e$BBg$-$JCM$K@_Dj$9$k$3$H$r4+$a$^$9!#$=$&$9$k$H!":#D4$Y$i$l$?%a%C%;!<\e(B
 \e$B%8\e(B ID \e$B$?$A$O:#$7$P$i$/%-%c%C%7%e$NCf$KB8B3$G$-$^$9\e(B (5000 \e$B$K@_Dj$9$k$H%-%c%C\e(B
 \e$B%7%e%U%!%$%k$NBg$-$5$O$@$$$?$$\e(B 300 \e$B%-%m%P%$%H$0$i$$$K$J$k$_$?$$$G$9\e(B)\e$B!#\e(B
 @vindex nnmail-cache-accepted-message-ids
index 486152f..d223a7b 100644 (file)
@@ -14248,7 +14248,8 @@ splits.  Here are the possible split syntaxes:
 If the split is a string, that will be taken as a group name.  Normal
 regexp match expansion will be done.  See below for examples.
 
-@item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split})
+@c Don't fold this line.
+@item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split} [@var{invert-match-partial-words}])
 If the split is a list, the first element of which is a string, then
 store the message as specified by @var{split}, if header @var{field}
 (a regexp) contains @var{value} (also a regexp).  If @var{restrict}
@@ -14256,6 +14257,11 @@ store the message as specified by @var{split}, if header @var{field}
 the end of the matched @var{value}, the @var{split} is ignored.  If
 none of the @var{restrict} clauses match, @var{split} is processed.
 
+The last element @var{invert-match-partial-words} is optional.  If it is
+not omitted and the value is non-nil, the match-partial-words behavior
+controlled by the @code{nnmail-split-fancy-match-partial-words} variable
+(see below) will be inverted.
+
 @item (| @var{split} @dots{})
 If the split is a list, and the first element is @code{|} (vertical
 bar), then process each @var{split} until one of them matches.  A
@@ -14309,10 +14315,49 @@ If the split is @code{nil}, it is ignored.
 @end table
 
 In these splits, @var{field} must match a complete field name.
-@var{value} must match a complete word according to the fundamental mode
-syntax table.  You can use @code{.*} in the regexps to match partial
-field names or words.  In other words, all @var{value}'s are wrapped in
-@samp{\<} and @samp{\>} pairs.
+
+Normally, @var{value} in these splits must match a complete @emph{word}
+according to the fundamental mode syntax table.  In other words, all
+@var{value}'s will be implicitly surrounded by @code{\<...\>} markers,
+which are word delimiters.  Therefore, if you use the following split,
+for example,
+
+@example
+(any "joe" "joemail")
+@end example
+
+@noindent
+messages sent from @samp{joedavis@@foo.org} will normally not be filed
+in @samp{joemail}.  If you want to alter this behavior, you can use any
+of the following three ways:
+
+@enumerate
+@item
+@vindex nnmail-split-fancy-match-partial-words
+You can set the @code{nnmail-split-fancy-match-partial-words} variable
+to non-@code{nil} in order to ignore word boundaries and instead the
+match becomes more like a grep.  This variable controls whether partial
+words are matched during fancy splitting.  The default value is
+@code{nil}.
+
+Note that it influences all @var{value}'s in your split rules.
+
+@item
+@var{value} beginning with @code{.*} ignores word boundaries in front of
+a word.  Similarly, if @var{value} ends with @code{.*}, word boundaries
+in the rear of a word will be ignored.  For example, the @var{value}
+@code{"@@example\\.com"} does not match @samp{foo@@example.com} but
+@code{".*@@example\\.com"} does.
+
+@item
+You can set the @var{invert-match-partial-words} flag in your split
+rules of the @samp{(@var{field} @var{value} @dots{})} types,
+aforementioned in this section.  If the flag is set, word boundaries on
+both sides of a word are ignored even if
+@code{nnmail-split-fancy-match-partial-words} is @code{nil}.
+Contrarily, if the flag is set, word boundaries are not ignored even if
+@code{nnmail-split-fancy-match-partial-words} is non-@code{nil}.
+@end enumerate
 
 @vindex nnmail-split-abbrev-alist
 @var{field} and @var{value} can also be Lisp symbols, in that case
@@ -14360,25 +14405,6 @@ groups when users send to an address using different case
 (i.e. mailing-list@@domain vs Mailing-List@@Domain).  The default value
 is @code{t}.
 
-@vindex nnmail-split-fancy-match-partial-words
-@code{nnmail-split-fancy-match-partial-words} controls whether partial
-words are matched during fancy splitting.
-
-Normally, regular expressions given in @code{nnmail-split-fancy} are
-implicitly surrounded by @code{\<...\>} markers, which are word
-delimiters.  If this variable is true, they are not implicitly
-surrounded by anything.
-
-@example
-(any "joe" "joemail")
-@end example
-
-In this example, messages sent from @samp{joedavis@@foo.org} will
-normally not be filed in @samp{joemail}.  With
-@code{nnmail-split-fancy-match-partial-words} set to @code{t},
-however, the match will happen.  In effect, the requirement of a word
-boundary is removed and instead the match becomes more like a grep.
-
 @findex nnmail-split-fancy-with-parent
 @code{nnmail-split-fancy-with-parent} is a function which allows you to
 split followups into the same groups their parents are in.  Sometimes