From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/48464 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: gnus.el: new group parameters, advice needed (again) Date: Tue, 31 Dec 2002 13:00:18 -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: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1041357613 20925 80.91.224.249 (31 Dec 2002 18:00:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 31 Dec 2002 18:00:13 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18TQgQ-0005Qg-00 for ; Tue, 31 Dec 2002 19:00:06 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18TQgS-00034G-00; Tue, 31 Dec 2002 12:00:08 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 31 Dec 2002 12:01:01 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id MAA17878 for ; Tue, 31 Dec 2002 12:00:49 -0600 (CST) Original-Received: (qmail 81952 invoked by alias); 31 Dec 2002 17:59:51 -0000 Original-Received: (qmail 81947 invoked from network); 31 Dec 2002 17:59:51 -0000 Original-Received: from ns1.beld.net (208.229.215.81) by 66.230.238.6 with SMTP; 31 Dec 2002 17:59:51 -0000 Original-Received: from heechee.beld.net (dhcp-0-30-bd-1-93-b2.cpe.beld.net [24.233.65.6]) by ns1.beld.net (Postfix) with ESMTP id 0BF5E3BB38 for ; Tue, 31 Dec 2002 12:59:51 -0500 (EST) Original-To: ding 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 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:48464 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:48464 After some thought, I sort of distilled the ideas for the group parameters into two parametrs, spam-contents and spam-process. Each one has a corresponding global alist, as documented below. All this will go into gnus.el. spam-contents is a parameter for the group type. Spam groups will get their unread articles automatically spam-marked on summary entry. Ham and unclassified groups don't do anything on summary entry. spam-process is a list of backend processors for the spam or ham in the group. The group has to be a ham group for ham processors (whitelist and BBDB) to work, and the spam processors will work for any group. The spam processors work on explicitly marked spam articles whereas the ham processors work on implicit ham (unread articles and such), that's why. I need advice on how to define processor type symbols for spam-process, so the choice of spam/ham processor can be a symbol instead of a string. I understand the symbol type, I don't know where and how to define the symbols themselves properly. Also, if anyone spots inaccuracies or errors, please let me know. This is going into gnus.el (can it go into spam.el? should it?), so I'm being extra careful. Sorry for the lengthy e-mails. Ted ----------------------------------------------------------- ;; group parameters for spam processing added by Ted Zlatanov (gnus-define-group-parameter spam-contents :function-document "The spam type (spam, ham, or neither) of the group." :variable gnus-spam-newsgroup-contents :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 list of group name regexps that should match all groups in which to do automatic spam tagging, associated with a classification (spam, ham, or neither). This only makes sense for mail groups." :variable-group spam :variable-type '(alist :key-type regexp :value-type (choice :tag "Type" (const :tag "Spam" t) (const :tag "Unclassified" nil) (const :tag "Ham" ask))) :parameter-type '(choice (const :tag "Spam" t) (const :tag "Unclassified" nil) (const :tag "Ham" ask)) :parameter-document "The spam classification (spam, ham, or neither) of this group. When a spam group is entered, all unread articles are marked as spam.") (gnus-define-group-parameter spam-process :parameter-type '(repeat '(choice (string :tag "Ifile" "ifile") (string :tag "Bogofilter" "bogofilter") (string :tag "Blacklist" "blacklist") (string :tag "Ham Whitelist" "whitelist") (string :tag "Ham BBDB" "bbdb"))) :function-document "Which spam or ham processors will be applied to the GROUP articles at summary exit." :variable gnus-spam-process-newsgroups :variable-default nil :variable-document "*Groups in which to automatically process spam or ham articles with a backend on summary exit. If non-nil, this should be a list of group name regexps that should match all groups in which to do automatic spam processing, associated with the appropriate processor. This only makes sense for mail groups." :variable-group spam :variable-type '(alist :key-type regexp :value-type (choice :tag "Processor" (string :tag "Ifile" "ifile") (string :tag "Bogofilter" "bogofilter") (string :tag "Blacklist" "blacklist") (string :tag "Ham Whitelist" "whitelist") (string :tag "Ham BBDB" "bbdb"))) :parameter-document "Which spam processors will be applied to the spam or ham GROUP articles at summary exit.")