From: yamaoka Date: Tue, 7 Nov 2000 07:57:11 +0000 (+0000) Subject: Synch with Gnus. X-Git-Tag: t-gnus-6_14-quimby-before-installer-changed-~5 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=e38b8583e06c97ca60e8db4ba9555b9a5bee9214;p=elisp%2Fgnus.git- Synch with Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 94b638c..a92b3bf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2000-02-02 Alexandre Oliva + + * gnus-mlspl.el: Documentation tweaks. + 2000-11-06 22:06:44 ShengHuo ZHU * mm-decode.el (mm-possibly-verify-or-decrypt): Fix. diff --git a/lisp/gnus-mlspl.el b/lisp/gnus-mlspl.el index 3f7d012..46ccc99 100644 --- a/lisp/gnus-mlspl.el +++ b/lisp/gnus-mlspl.el @@ -27,10 +27,13 @@ (require 'nnmail) (defvar gnus-group-split-updated-hook nil - "Hook called just after nnmail-split-fancy is updated by gnus-group-split-update.") + "Hook called just after nnmail-split-fancy is updated by +gnus-group-split-update.") (defvar gnus-group-split-default-catch-all-group "mail.misc" - "Group used by gnus-group-split and gnus-group-split-update as default catch-all group.") + "Group name (or arbitrary fancy split) with default splitting rules. +Used by gnus-group-split and gnus-group-split-update as a fallback +split, in case none of the group-based splits matches.") ;;;###autoload (defun gnus-group-split-setup (&optional auto-update catch-all) @@ -42,7 +45,18 @@ group parameters. If AUTO-UPDATE is non-nil (prefix argument accepted, if called interactively), it makes sure nnmail-split-fancy is re-computed before getting new mail, by adding gnus-group-split-update to -nnmail-pre-get-new-mail-hook." +nnmail-pre-get-new-mail-hook. + +A non-nil CATCH-ALL replaces the current value of +gnus-group-split-default-catch-all-group. This variable is only used +by gnus-group-split-update, and only when its CATCH-ALL argument is +nil. This argument may contain any fancy split, that will be added as +the last split in a `|' split produced by gnus-group-split-fancy, +unless overridden by any group marked as a catch-all group. Typical +uses are as simple as the name of a default mail group, but more +elaborate fancy splits may also be useful to split mail that doesn't +match any of the group-specified splitting rules. See +gnus-group-split-fancy for details." (interactive "P") (setq nnmail-split-methods 'nnmail-split-fancy) (when catch-all @@ -53,8 +67,11 @@ nnmail-pre-get-new-mail-hook." ;;;###autoload (defun gnus-group-split-update (&optional catch-all) - "Computes nnmail-split-fancy from group params. -It does this by calling \(gnus-group-split-fancy nil CROSSPOST DEFAULTGROUP)." + "Computes nnmail-split-fancy from group params and CATCH-ALL, by +calling (gnus-group-split-fancy nil nil CATCH-ALL). + +If CATCH-ALL is nil, gnus-group-split-default-catch-all-group is used +instead. This variable is set by gnus-group-split-setup." (interactive) (setq nnmail-split-fancy (gnus-group-split-fancy @@ -67,13 +84,9 @@ It does this by calling \(gnus-group-split-fancy nil CROSSPOST DEFAULTGROUP)." "Uses information from group parameters in order to split mail. See gnus-group-split-fancy for more information. -If no group is defined as catch-all, the value of -gnus-group-split-default-catch-all-group is used. - gnus-group-split is a valid value for nnmail-split-methods." (let (nnmail-split-fancy) - (gnus-group-split-update - gnus-group-split-default-catch-all-group) + (gnus-group-split-update) (nnmail-split-fancy))) ;;;###autoload @@ -92,11 +105,6 @@ if NO-CROSSPOST is ommitted or nil, a & split will be returned, otherwise, a | split, that does not allow crossposting, will be returned. -if CATCH-ALL is not nil, and there is no selected group whose -SPLIT-REGEXP matches the empty string, nor is there a selected group -whose SPLIT-SPEC is 'catch-all, this group name will be appended to -the returned SPLIT list, as the last element in a '| SPLIT. - For each selected group, a SPLIT is composed like this: if SPLIT-SPEC is specified, this split is returned as-is (unless it is nil: in this case, the group is ignored). Otherwise, if TO-ADDRESS, TO-LIST and/or @@ -106,6 +114,13 @@ SPLIT-REGEXP is specified, the regexp will be extended so that it matches this regexp too, and if SPLIT-EXCLUDE is specified, RESTRICT clauses will be generated. +If CATCH-ALL is nil, no catch-all handling is performed, regardless of +catch-all marks in group parameters. Otherwise, if there is no +selected group whose SPLIT-REGEXP matches the empty string, nor is +there a selected group whose SPLIT-SPEC is 'catch-all, this fancy +split (say, a group name) will be appended to the returned SPLIT list, +as the last element of a '| SPLIT. + For example, given the following group parameters: nnml:mail.bar: diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 01f53bf..2aba2da 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -11294,8 +11294,12 @@ table) に従って完全に合致しなければなりません。正規表現でフィールド名か は @code{gnus-group-split-default-catch-all-group} で指定されているグルー プに保存されます。@var{split-spec} が @code{catch-all} に設定されている グループがある場合は、そのグループが全てを捕獲するグループとして使用され -ます。この場合は、@code{|} 特級分割が @code{&} 分割と全てを捕獲するグルー -プを閉包するように、相互投稿は行われないことに注意してください。 +ます。この変数はしばしば単にグループを指定するために使われますが、任意の +複雑な特級分割をも設定する (結局、グループ名は特級分割なのです) ので、個 +人のメールフォルダーのどのメーリングリストにも当てはまらないメールを分割 +するのに便利でしょう。なおこの特級分割は、@code{|} 分割リストの最後の要 +素 - グループパラメータから抽出された規則を持つ @code{&} 分割を含む - と +して追加されることに注意してください。 そろそろ例を出すべきでしょう。以下のグループパラメータが定義されていると します: @@ -11337,17 +11341,18 @@ nnml:mail.others: @var{groups} は出力の分割を生成するためにパラメータが走査されるグループ 名のリストか正規表現です。@var{no-crosspost} は相互投稿を使用禁止にるた めに使うことができます。その場合、単一の @code{|} 分割が出力されます。 -@var{catch-all} は初期全捕獲グループとして使用されるグループ名です。 -@var{catch-all} が @code{nil} であるか、@var{split-regexp} がどれかの選 -択されたグループ空文字列に合致すると、全捕獲分割は行われません。そうでな -い場合、グループに @var{split-spec} が @code{catch-all} に設定されている -ものがあると、このグループが @var{catch-all} 引数を上書きします。 +@var{catch-all} は @var{gnus-group-split-default-catch-all-group} のよう +に、最後の手段として使われる特級分割です。@var{catch-all} が @code{nil} で +あるか、@var{split-regexp} がどれかの選択されたグループ空文字列に合致す +ると、全捕獲分割は行われません。そうでない場合、グループ +に @var{split-spec} が @code{catch-all} に設定されているものがあると、こ +のグループが @var{catch-all} 引数を上書きします。 @findex gnus-group-split-setup 不運なことに、全てのグルプとパラメータを走査することは非常に遅いです。特 に全てのメッセージに対してなされることを考えると。けれども、絶望しない で! 関数 @code{gnus-group-split-setup} が @code{gnus-group-split} をより -ずっと効率的な方法で選択するように使うことができます。それ +ずっと効率的な方法で使うことができます。それ は @code{nnmail-split-methods} を @code{nnmail-split-fancy} に設定し、 @code{nnmail-split-fancy} を @code{gnus-group-split-fancy} で生成された 分割に設定します。こうしてどんなに分割するメッセージがたくさんあっても、 @@ -11367,9 +11372,8 @@ nnml:mail.others: @var{auto-update} が @code{nil} で無いと、 @code{gnus-group-split-update} が @code{nnmail-pre-get-new-mail-hook} に 追加され、二度と @code{nnmail-split-fancy} の更新を心配する必要はありま -せん。@var{catch-all} を省略しない場合は (それはオプションで -す) @code{gnus-group-split-default-catch-all-group} はその値に設定されま -す。 +せん。@var{catch-all} を省略しない場合は (それはオプションで nil と同じ)、 +@code{gnus-group-split-default-catch-all-group} はその値に設定されます。 @vindex gnus-group-split-updated-hook @code{nnmail-split-fancy} が @code{gnus-group-split-update} で設定された diff --git a/texi/gnus.texi b/texi/gnus.texi index 7bbbb71..37c1fcd 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -11856,9 +11856,13 @@ by defining a single @code{&} fancy split containing one split for each group. If a message doesn't match any split, it will be stored in the group named in @code{gnus-group-split-default-catch-all-group}, unless some group has @var{split-spec} set to @code{catch-all}, in which case -that group is used as the catch-all group. Note that, in this case, -there's no cross-posting, as a @code{|} fancy split encloses the -@code{&} split and the catch-all group. +that group is used as the catch-all group. Even though this variable is +often used just to name a group, it may also be set to an arbitrarily +complex fancy split (after all, a group name is a fancy split), and this +may be useful to split mail that doesn't go to any mailing list to +personal mail folders. Note that this fancy split is added as the last +element of a @code{|} split list that also contains a @code{&} split +with the rules extracted from group parameters. It's time for an example. Assume the following group parameters have been defined: @@ -11899,9 +11903,9 @@ splits like this: @var{groups} may be a regular expression or a list of group names whose parameters will be scanned to generate the output split. @var{no-crosspost} can be used to disable cross-posting; in this case, a -single @code{|} split will be output. @var{catch-all} may be the name -of a group to be used as the default catch-all group. If -@var{catch-all} is @code{nil}, or if @var{split-regexp} matches the +single @code{|} split will be output. @var{catch-all} is the fallback +fancy split, used like @var{gnus-group-split-default-catch-all-group}. +If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the empty string in any selected group, no catch-all split will be issued. Otherwise, if some group has @var{split-spec} set to @code{catch-all}, this group will override the value of the @var{catch-all} argument. @@ -11910,14 +11914,14 @@ this group will override the value of the @var{catch-all} argument. Unfortunately, scanning all groups and their parameters can be quite slow, especially considering that it has to be done for every message. But don't despair! The function @code{gnus-group-split-setup} can be -used to select @code{gnus-group-split} in a much more efficient way. It +used to enable @code{gnus-group-split} in a much more efficient way. It sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets @code{nnmail-split-fancy} to the split produced by @code{gnus-group-split-fancy}. Thus, the group parameters are only scanned once, no matter how many messages are split. @findex gnus-group-split-update -However, if you change group parameters, you have to update +However, if you change group parameters, you'd have to update @code{nnmail-split-fancy} manually. You can do it by running @code{gnus-group-split-update}. If you'd rather have it updated automatically, just tell @code{gnus-group-split-setup} to do it for @@ -11930,7 +11934,7 @@ you. For example, add to your @file{.gnus}: If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update} will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever have to worry about updating @code{nnmail-split-fancy} again. If you -don't omit @var{catch-all} (it's optional), +don't omit @var{catch-all} (it's optional; same as nil), @code{gnus-group-split-default-catch-all-group} will be set to its value. diff --git a/todo b/todo index 2e56251..f3243de 100644 --- a/todo +++ b/todo @@ -44,6 +44,10 @@ should go for both Gnus' own folders and the folders Gnus reads from (e.g. /var/spool/mail/${USER}). All backends this makes sense for. + [John Wiegley's article <200011030445.VAA08277@localhost.dynodns.net>, + posted on gnu.emacs.gnus does this. + Also, gnus-article-encrypt `K E' encrypts the article body.] + * The stuff on "Newest Features" in the manual should be implemented and the node updated (it maybe is?).