Hello, This version of the patch[1] fixes two problems of the previous one: 1. some SPLIT where duplicated because the group name was present in “gnus-newsrc-alist” and in “gnus-parameters” 2. using only groups from “gnus-newsrc-alist” avoid creating new ones automatically when splitting, now, a user just need to: 1. add a new entry to “gnus-parameters” 2. update “nnmail-split-fancy” with “gnus-group-split-update” 3. subscribe to the new mailing list 4. the splitting will create the new group automatically when the first mail arrives Regards. The following changes since commit b4bc300f0dcddc2b17bb50a3501ed6e6db1ef12c: Update copyright year to 2014 (2014-01-01 10:39:44 +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 b612682b8df60b5b4a2a854639f1cfb6d6fb28a3: Use `gnus-parameters' in `gnus-group-split-fancy' (2014-01-02 23:25:17 +0100) ---------------------------------------------------------------- Group splitting does not use “gnus-parameters” This version of the patch build the list of all unique group names gathered from “gnus-newsrc-alist” and “gnus-parameters” and then use “gnus-group-find-parameter” to get each group parameters. Using only “gnus-newsrc-alist” avoids the automatic creation of new group during splitting when only “gnus-parameters” is configured. Filter the groups during the build of group names, this avoid calculation if user pass a list of group names. ---------------------------------------------------------------- Daniel Dehennin (1): Use `gnus-parameters' in `gnus-group-split-fancy' lisp/gnus-mlspl.el | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/lisp/gnus-mlspl.el b/lisp/gnus-mlspl.el index 8dec6f2..2d86d0b 100644 --- a/lisp/gnus-mlspl.el +++ b/lisp/gnus-mlspl.el @@ -146,20 +146,27 @@ 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)) - split) - (dolist (info newsrc) - (let ((group (gnus-info-group info)) - (params (gnus-info-params info))) - ;; For all GROUPs that match the specified GROUPS - (when (or (not groups) - (and (listp groups) - (memq group groups)) - (and (stringp groups) - (string-match groups group))) - (let ((split-spec (assoc 'split-spec params)) group-clean) - ;; Remove backend from group name - (setq group-clean (string-match ":" group)) + (let ((group-names (if (and (listp groups) + (not (null groups))) + groups + (delete-dups + (delq nil + (mapcar + (lambda (info) + (let ((group (gnus-info-group info))) + (if (or (not groups) + (and (stringp groups) + (string-match groups group))) + group))) + (append gnus-newsrc-alist gnus-parameters)))))) + split) + (dolist (group group-names) + (let ((params (gnus-group-find-parameter group))) + ;; Skip groups without param (or nonexistent) + (when (not (null params)) + (let ((split-spec (assoc 'split-spec params)) group-clean) + ;; Remove backend from group name + (setq group-clean (string-match ":" group)) (setq group-clean (if group-clean (substring group (1+ group-clean)) 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