From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/36563 Path: main.gmane.org!not-for-mail From: Dale Hagglund Newsgroups: gmane.emacs.gnus.general Subject: patch: bug in gnus-mlspl.el re generation of restrict clauses Date: 03 Jun 2001 14:49:32 -0600 Sender: rdh@best.com Message-ID: <86elt19tlv.fsf@ponoka.battleriver.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035172127 9227 80.91.224.250 (21 Oct 2002 03:48:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:48:47 +0000 (UTC) Cc: larsi@gnus.org Return-Path: Return-Path: Original-Received: (qmail 2433 invoked from network); 3 Jun 2001 20:51:10 -0000 Original-Received: from mail1.rdc2.ab.home.com (24.64.2.48) by gnus.org with SMTP; 3 Jun 2001 20:51:10 -0000 Original-Received: from best.com ([24.64.121.148]) by mail1.rdc2.ab.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20010603205048.HKFN21674.mail1.rdc2.ab.home.com@best.com>; Sun, 3 Jun 2001 13:50:48 -0700 Original-Received: (from rdh@localhost) by best.com (8.9.3/8.8.5) id OAA65851; Sun, 3 Jun 2001 14:49:32 -0600 (MDT) X-Authentication-Warning: ponoka.battleriver.com: rdh set sender to rdh@best.com using -f Original-To: ding@gnus.org User-Agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/20.3 Original-Lines: 69 Xref: main.gmane.org gmane.emacs.gnus.general:36563 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:36563 I just upgraded to ognus-0.03 after a long time of using gnus 5.8.3. Right away, I ran across a bug in the generation of restrict clauses from the "split-exclude" group property. The code I fixed was introduced on 29 November 2000, in revision 5.8 of gnus-mlspl.el. Basically, the current code only worked for a split-exclude of the form (split-exclude . STRING) and not for anything of the form (split-exclude STRING [STRING...]) which is what I'd used in my group parameters. My split-excludes worked for me in 5.8.3, so I checked the cvs diffs. In the change from rev 5.7 to 5.8 of this file, use of mapcon was deleted for some reason. However even this older code doesn't work if there are two or more strings given in the split-exclude property. I've attached a patch for gnus-mlspl.el, and a corresponding ChangeLog entry. The patches are relative to the 3 June 20:45 GMT 2001 version state of the cvs repository. Please let me know if this isn't the correct venue for mailing patches. Dale. Index: ChangeLog =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v retrieving revision 6.441 diff -u -r6.441 ChangeLog --- ChangeLog 2001/06/01 20:57:07 6.441 +++ ChangeLog 2001/06/02 20:30:08 @@ -1,3 +1,8 @@ +2001-06-03 Dale Hagglund + + * gnus-mlspl.el (gnus-group-split-fancy): fix generation of split + restrict clauses. + 2001-06-02 Simon Josefsson * imap.el (imap-kerberos4-open): Index: gnus-mlspl.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-mlspl.el,v retrieving revision 6.1 diff -u -r6.1 gnus-mlspl.el --- gnus-mlspl.el 2000/11/07 03:27:15 6.1 +++ gnus-mlspl.el 2001/06/02 20:30:08 @@ -196,12 +196,9 @@ (list 'any split-regexp) ;; Generate RESTRICTs for SPLIT-EXCLUDEs. (if (listp split-exclude) - (let ((seq split-exclude) - res) - (while seq - (push (cons '- (pop seq)) - res)) - (apply #'nconc (nreverse res))) + (apply #'append + (mapcar (lambda (arg) (list '- arg)) + split-exclude)) (list '- split-exclude)) (list group-clean)) split)