Hello, I use a little patch[1] since years to split groups not only on group parameters from “newsrc” but from “gnus-parameters” too. I found the later easier to manage. Following is my pull request, if you want it. Regards. The following changes since commit 23c6fe6e28b8b6f356bae60e2fc773c41cd8b540: gnus-msg.el (gnus-setup-message): Fix last commit (2013-12-09 00:35:04 +0000) are available in the git repository at: git://git.baby-gnu.net/gnus.git tags/feature/use-gnus-parameters-in-gnus-group-split-fancy for you to fetch changes up to a0a3183b02ae84a53e266522fbc74d548a7cba00: Use `gnus-parameters' in `gnus-group-split-fancy' (2013-12-14 15:10:06 +0100) ---------------------------------------------------------------- Group splitting does not use `gnus-parameters' I found `gnus-parameters' easier to manage than `newsrc': - human readable file - file is versionned This patch add the `gnus-parameters' to `newsrc' structure before building split. ---------------------------------------------------------------- Daniel Dehennin (1): Use `gnus-parameters' in `gnus-group-split-fancy' lisp/gnus-mlspl.el | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lisp/gnus-mlspl.el b/lisp/gnus-mlspl.el index 3947c67..0690a12 100644 --- a/lisp/gnus-mlspl.el +++ b/lisp/gnus-mlspl.el @@ -94,10 +94,24 @@ See `gnus-group-split-fancy' for more information. (gnus-group-split-update) (nnmail-split-fancy))) +(defun gnus-group-split-prepare-parameters (&optional parameters) + "Convert PARAMETERS alist or `gnus-parameters' to a newsrc +structure usable by `gnus-group-split-fancy'" + (let ((group-params (if parameters + parameters + gnus-parameters)) + newsrc-alist) + (dolist (param-assoc group-params newsrc-alist) + (let ((group (car param-assoc)) + (param (cdr param-assoc))) + (setq newsrc-alist + (append newsrc-alist (list (list group nil nil nil nil param)))))))) + ;;;###autoload (defun gnus-group-split-fancy (&optional groups no-crosspost catch-all) - "Uses information from group parameters in order to split mail. + "Uses information from group parameters and `gnus-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\) @@ -146,7 +160,7 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns: (any \"\\\\(foo@nowhere\\\\.gov\\\\|foo@localhost\\\\|foo-redist@home\\\\)\" - \"bugs-foo\" - \"rambling-foo\" \"mail.foo\")) \"mail.others\")" - (let* ((newsrc (cdr gnus-newsrc-alist)) + (let* ((newsrc (append (cdr gnus-newsrc-alist) (gnus-group-split-prepare-parameters))) split) (dolist (info newsrc) (let ((group (gnus-info-group info)) Footnotes: [1] http://git.baby-gnu.net/gitweb/gitweb.cgi?p=gnus.git;a=tag;h=refs/tags/feature/use-gnus-parameters-in-gnus-group-split-fancy -- Daniel Dehennin Récupérer ma clef GPG: gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF