From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/83966 Path: news.gmane.org!not-for-mail From: Daniel Dehennin Newsgroups: gmane.emacs.gnus.general Subject: Group splitting on list headers Date: Sat, 14 Dec 2013 18:03:04 +0100 Message-ID: <87iouruzzr.fsf@hati.baby-gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1387040624 31019 80.91.229.3 (14 Dec 2013 17:03:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Dec 2013 17:03:44 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M32221@lists.math.uh.edu Sat Dec 14 18:03:49 2013 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vrsd3-0001FL-3p for ding-account@gmane.org; Sat, 14 Dec 2013 18:03:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1VrscT-0006K0-KL; Sat, 14 Dec 2013 11:03:13 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1VrscQ-0006Jj-NF for ding@lists.math.uh.edu; Sat, 14 Dec 2013 11:03:10 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1VrscO-0000WO-V5 for ding@lists.math.uh.edu; Sat, 14 Dec 2013 11:03:10 -0600 Original-Received: from zion.baby-gnu.net ([82.225.168.180] helo=zion.baby-gnu.org) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1VrscN-0007Iq-9j for ding@gnus.org; Sat, 14 Dec 2013 18:03:07 +0100 Original-Received: from hati.asgardr.info ([192.168.1.2] helo=hati.baby-gnu.org) by zion.baby-gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1VrscK-0003A9-UN for ding@gnus.org; Sat, 14 Dec 2013 18:03:05 +0100 Organisation: Dark Church of Emacs Mail-Followup-To: ding@gnus.org User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:83966 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, I'm heavily using Group splitting and I have an issue with mailing-list and cross-posting. I'm looking at splitting on mailing-list headers and wonder if this is the correct way of doing it. I first create a new =E2=80=9Clist=E2=80=9D abbrev: #+begin_src diff diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 5be449e..73023df 100644 =2D-- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -517,6 +517,7 @@ Example: (defcustom nnmail-split-abbrev-alist '((any . "from\\|to\\|cc\\|sender\\|apparently-to\\|resent-from\\|resent= -to\\|resent-cc") (mail . "mailer-daemon\\|postmaster\\|uucp") + (list . "List-Post\\|X-BeenThere\\|X-Loop\||X-.*List") (to . "to\\|cc\\|apparently-to\\|resent-to\\|resent-cc") (from . "from\\|sender\\|resent-from") (nato . "to\\|cc\\|resent-to\\|resent-cc") #+end_src And then I use the =E2=80=9Csubscribed=E2=80=9D group parameter to discrimi= nate the use of =E2=80=9Clist=E2=80=9D in place of =E2=80=9Cany=E2=80=9D #+begin_src diff diff --git a/lisp/gnus-mlspl.el b/lisp/gnus-mlspl.el index 3947c67..303aec5 100644 =2D-- a/lisp/gnus-mlspl.el +++ b/lisp/gnus-mlspl.el @@ -177,7 +177,10 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\= ") returns: (to-list (cdr (assoc 'to-list params))) (extra-aliases (cdr (assoc 'extra-aliases params))) (split-regexp (cdr (assoc 'split-regexp params))) =2D (split-exclude (cdr (assoc 'split-exclude params)))) + (split-exclude (cdr (assoc 'split-exclude params))) + (target (if (cdr (assoc 'subscribed params)) + 'list + 'any))) (when (or to-address to-list extra-aliases split-regexp) ;; regexp-quote to-address, to-list and extra-aliases ;; and add them all to split-regexp @@ -198,7 +201,7 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\"= ) returns: "\\)")) ;; Now create the new SPLIT (push (append =2D (list 'any split-regexp) + (list target split-regexp) ;; Generate RESTRICTs for SPLIT-EXCLUDEs. (if (listp split-exclude) (apply #'append #+end_src I wonder if using the =E2=80=9Csubscribed=E2=80=9D is a good thing or maybe= should I define a new group parameter? Regards. =2D-=20 Daniel Dehennin R=C3=A9cup=C3=A9rer ma clef GPG: gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREKAAYFAlKsj0gACgkQFrLRMcygGksgwwD/ar7vG1Ls3mVKlqpCWuOrThoM ylw/HfXbpKDmpPeiXj4A/jiy9E6c6FrLbsPlrRrZBNJ0ZhOlnBMtvMNL4hVxLYYm =fV+U -----END PGP SIGNATURE----- --=-=-=--