From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/48402 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: spam.el proposed group parameters Date: Mon, 30 Dec 2002 18:38:24 -0500 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Sender: owner-ding@hpc.uh.edu Message-ID: References: <873ctztyth.fsf@mail.paradoxical.net> <87bs8nsh7g.fsf@mail.paradoxical.net> <87fzxziifw.fsf@wesley.springies.com> <87wulrjiba.fsf@squeaker.lickey.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1041292111 16532 80.91.224.249 (30 Dec 2002 23:48:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 30 Dec 2002 23:48:31 +0000 (UTC) Return-path: Original-Received: from util1.math.uh.edu ([129.7.128.22]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18T9e1-0004IW-00 for ; Tue, 31 Dec 2002 00:48:29 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by util1.math.uh.edu with esmtp (Exim 4.10) id 18T9VR-0008BN-00; Mon, 30 Dec 2002 17:39:37 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 30 Dec 2002 17:40:30 -0600 (CST) Original-Received: from ns3.beld.net (ns3.beld.net [208.229.215.83]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id RAA14914 for ; Mon, 30 Dec 2002 17:40:14 -0600 (CST) Original-Received: from heechee.beld.net (dhcp-0-30-bd-1-93-b2.cpe.beld.net [24.233.65.6]) by ns3.beld.net (Postfix) with ESMTP id CDD273C3B8 for ; Mon, 30 Dec 2002 18:38:06 -0500 (EST) Original-To: ding@hpc.uh.edu X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Followup-To: ding@hpc.uh.edu In-Reply-To: (Ted Zlatanov's message of "Mon, 30 Dec 2002 17:42:34 -0500") User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:48402 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:48402 I'd like to add the following group parameters to gnus.el, but I have very little knowledge of the accepted practices for group parameters. Also, I'll have to define a 'spam' variable group and move all the existing variables to it in spam.el, so ignore the "variable-group nnmail-expire" piece for now. The idea is that these group parameters will work in parallel with the regular spam.el variables. But I'm not sure if I should let the system-wide variables override the group parameters or vice versa. For instance, say a user enabled spam-process-with-ifile for a group, but also has spam-use-ifile set to nil. What's the accepted Gnus behavior in this case? Am I approaching the problem the wrong way? Should I eliminate the system-wide variables and only use group parameters? The existing examples of gnus-define-group-parameter didn't show the code I needed, and I'm not sure how to use that function. I would like to use choices instead of simple booleans, so for instance spam-process-with-ifile and spam-process-with-bogofilter would just be two choices in the list spam-process-backends, and the group type would be 'ham or 'spam. That would be better than booleans, I think. So how do I use gnus-define-group-parameter to define a list of symbolic tags, and then later in other code check whether a tag is in the current list? Any help is greatly appreciated. Thanks Ted ------------------------------------------------------------------------ ;; group parameters for spam processing added by Ted Zlatanov (gnus-define-group-parameter spam :type bool :function gnus-group-spam-p :function-document "Check whether GROUP is designated as a spam group or not." :variable gnus-spam-newsgroups :variable-default nil :variable-document "*Groups in which to automatically mark new articles as spam on summary entry. If non-nil, this should be a regexp that should match all groups in which to do automatic spam tagging. This only makes sense for mail groups." :variable-group nnmail-expire :variable-type '(choice (const nil) regexp) :parameter-type '(const :tag "Group Contents Are Spam" t) :parameter-document "All articles that are unread will be marked as spam on summary entry.") (gnus-define-group-parameter ham :type bool :function gnus-group-ham-p :function-document "Check whether GROUP is designated as a ham (non-spam) group or not." :variable gnus-ham-newsgroups :variable-default nil :variable-document "*Groups in which to automatically process new articles as ham (non-spam) on summary exit. If non-nil, this should be a regexp that should match all groups in which to do automatic ham tagging. This only makes sense for mail groups." :variable-group nnmail-expire :variable-type '(choice (const nil) regexp) :parameter-type '(const :tag "Group Contents Are Not Spam" t) :parameter-document "All articles that are not marked as spam will be processed as such at summary exit.") (gnus-define-group-parameter spam-process :type bool :function gnus-group-spam-process-p :function-document "Check whether GROUP articles will be processed as spam at summary exit." :variable gnus-spam-process-newsgroups :variable-default t :variable-document "*Groups in which to automatically process spam articles on summary exit. If non-nil, this should be a regexp that should match all groups in which to do automatic spam processing. This only makes sense for mail groups." :variable-group nnmail-expire :variable-type '(choice (const nil) regexp) :parameter-type '(const :tag "Group Contents Are Processed As Spam" t) :parameter-document "Articles that are marked as spam will be processed on summary exit.") (gnus-define-group-parameter spam-process-with-ifile :type bool :function gnus-group-spam-process-with-ifile-p :function-document "Check whether GROUP articles will be processed as spam with ifile at summary exit." :variable gnus-spam-process-with-ifile-newsgroups :variable-default nil :variable-document "*Groups in which to automatically process spam articles with ifile on summary exit. If non-nil, this should be a regexp that should match all groups in which to do automatic spam processing with ifile. This only makes sense for mail groups." :variable-group nnmail-expire :variable-type '(choice (const nil) regexp) :parameter-type '(const :tag "Group Contents Are Processed As Spam With Ifile" t) :parameter-document "Articles that are marked as spam will be processed with ifile on summary exit.") (gnus-define-group-parameter spam-process-with-bogofilter :type bool :function gnus-group-spam-process-with-bogofilter-p :function-document "Check whether GROUP articles will be processed as spam with bogofilter at summary exit." :variable gnus-spam-process-with-bogofilter-newsgroups :variable-default nil :variable-document "*Groups in which to automatically process spam articles with bogofilter on summary exit. If non-nil, this should be a regexp that should match all groups in which to do automatic spam processing with bogofilter. This only makes sense for mail groups." :variable-group nnmail-expire :variable-type '(choice (const nil) regexp) :parameter-type '(const :tag "Group Contents Are Processed As Spam With Bogofilter" t) :parameter-document "Articles that are marked as spam will be processed with bogofilter on summary exit.") (gnus-define-group-parameter spam-process-with-blacklist :type bool :function gnus-group-spam-process-with-blacklist-p :function-document "Check whether GROUP articles will be processed as spam, adding senders to the blacklist at summary exit." :variable gnus-spam-process-with-blacklist-newsgroups :variable-default nil :variable-document "*Groups in which to automatically process spam articles, adding senders to the blacklist on summary exit. If non-nil, this should be a regexp that should match all groups in which to do automatic spam processing with the blacklist. This only makes sense for mail groups." :variable-group nnmail-expire :variable-type '(choice (const nil) regexp) :parameter-type '(const :tag "Group Contents Are Processed As Spam With Blacklist" t) :parameter-document "Articles that are marked as spam will be processed with blacklist on summary exit.") (gnus-define-group-parameter spam-process-ham-with-whitelist :type bool :function gnus-group-spam-process-ham-with-whitelist-p :function-document "Check whether GROUP articles will be processed as ham, adding senders to the whitelist at summary exit." :variable gnus-spam-process-ham-with-whitelist-newsgroups :variable-default nil :variable-document "*Groups in which to automatically process ham (non-spam) articles, adding senders to the whitelist on summary exit. If non-nil, this should be a regexp that should match all groups in which to do automatic ham processing with the whitelist. This only makes sense for mail groups." :variable-group nnmail-expire :variable-type '(choice (const nil) regexp) :parameter-type '(const :tag "Group Contents Are Processed As Ham With Whitelist" t) :parameter-document "Ham (non-spam) articles will be processed with whitelist on summary exit.") (gnus-define-group-parameter spam-process-ham-with-BBDB :type bool :function gnus-group-spam-process-ham-with-BBDB-p :function-document "Check whether GROUP articles will be processed as ham, adding senders to the BBDB at summary exit." :variable gnus-spam-process-ham-with-BBDB-newsgroups :variable-default nil :variable-document "*Groups in which to automatically process ham (non-spam) articles, adding senders to the BBDB on summary exit. If non-nil, this should be a regexp that should match all groups in which to do automatic ham processing with the BBDB. This only makes sense for mail groups." :variable-group nnmail-expire :variable-type '(choice (const nil) regexp) :parameter-type '(const :tag "Group Contents Are Processed As Ham With BBDB" t) :parameter-document "Ham (non-spam) articles will be processed with BBDB on summary exit.")