From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66911 Path: news.gmane.org!not-for-mail From: Joao Cachopo Newsgroups: gmane.emacs.gnus.general Subject: Problem with gnus-registry-grep-in-list Date: Mon, 05 May 2008 19:38:56 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1210016501 27087 80.91.229.12 (5 May 2008 19:41:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 May 2008 19:41:41 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M15391@lists.math.uh.edu Mon May 05 21:42:16 2008 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jt6YV-0002Il-UL for ding-account@gmane.org; Mon, 05 May 2008 21:41:00 +0200 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 1Jt6Wx-0003oI-8V; Mon, 05 May 2008 14:39:23 -0500 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 1Jt6Sr-0003mn-6F for ding@lists.math.uh.edu; Mon, 05 May 2008 14:35:09 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1Jt6Sl-00037v-BZ for ding@lists.math.uh.edu; Mon, 05 May 2008 14:35:09 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Jt6Sy-0001HU-00 for ; Mon, 05 May 2008 21:35:16 +0200 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Jt6Sk-0007A9-Il for ding@gnus.org; Mon, 05 May 2008 19:35:02 +0000 Original-Received: from 89.181.56.66 ([89.181.56.66]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 May 2008 19:35:02 +0000 Original-Received: from joao by 89.181.56.66 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 05 May 2008 19:35:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 67 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 89.181.56.66 User-Agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.1.91 (darwin) Cancel-Lock: sha1:x2ZtoL+H9rId+JRg39OBVn8YAhw= X-Spam-Score: -1.1 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:66911 Archived-At: Hi! Today I've tracked down a problem that has been bugging me for some time now. I use gnus-registry-split-fancy-with-parent to split the replies to the messages that I send into the proper folder. Most of the times, my original message is GCCed into some specific group, but sometimes it is archived into my nnml:sent.mail.* groups. In this last case, however, I don't want to split the replies into the sent.mail group. Therefore, I added "sent.mail" to gnus-registry-unfollowed-groups. But still, the replies are split into the sent.mail group. I've found the problem in the function gnus-registry-grep-in-list, which is called by the function gnus-registry-follow-group-p: (defun gnus-registry-follow-group-p (group) "Determines if a group name should be followed. Consults `gnus-registry-unfollowed-groups' and `nnmail-split-fancy-with-parent-ignore-groups'." (not (or (gnus-registry-grep-in-list group gnus-registry-unfollowed-groups) (gnus-registry-grep-in-list group nnmail-split-fancy-with-parent-ignore-groups)))) As you can see, the gnus-registry-grep-in-list is called twice with the group that we want to see whether it should be followed or not and a list of regexps to ignore. Yet, if we look into the gnus-registry-grep-in-list function: (defun gnus-registry-grep-in-list (word list) (when word (memq nil (mapcar 'not (mapcar (lambda (x) (string-match word x)) list))))) The string-match function is called with the regexp in the second argument, rather than the first. Actually, according to the CVS logs, this was a deliberate change made in revision 7.37: date: 2007/09/12 09:16:25; author: tzz; state: Exp; lines: +3 -3 (gnus-registry-unfollowed-groups): Add INBOX to the list of groups not followed by default. Fix type to be regexp. (gnus-registry-grep-in-list): Fix inverted parameters to string-match. As the gnus-registry-grep-in-list function is used in one more place (the function gnus-registry-find-keywords), I'm not sure that swapping the arguments of the string-match again will not break this other functionality. Can someone comment on this (and fix it, please)? Best regards, -- Joćo Cachopo