Function: gnus-group-split-fancy

Uses information from group parameters in order to split mail.
It can be embedded into `nnmail-split-fancy' lists with the SPLIT

(: gnus-group-split-fancy GROUPS NO-CROSSPOST CATCH-ALL)

GROUPS may be a regular expression or a list of group names, that will
be used to select candidate groups. If it is omitted or nil, all
existing groups are considered.

if NO-CROSSPOST is omitted or nil, a & split will be returned,
otherwise, a | split, that does not allow crossposting, will be
returned.

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
EXTRA-ALIASES are specified, a regexp that matches any of them is
constructed (extra-aliases may be a list). Additionally, if
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:
((to-address . "bar@femail.com")
(split-regexp . ".*@femail\\.com"))
nnml:mail.foo:
((to-list . "foo@nowhere.gov")
(extra-aliases "foo@localhost" "foo-redist@home")
(split-exclude "bugs-foo" "rambling-foo")
(admin-address . "foo-request@nowhere.gov"))
nnml:mail.others:
((split-spec . catch-all))

Calling (gnus-group-split-fancy nil nil "mail.others") returns:

(| (& (any "\\(bar@femail\\.com\\|.*@femail\\.com\\)"
"mail.bar")
(any "\\(foo@nowhere\\.gov\\|foo@localhost\\|foo-redist@home\\)" - "bugs-foo" - "rambling-foo" "mail.foo")) "mail.others") (fn &optional GROUPS NO-CROSSPOST CATCH-ALL)