Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: gnus.el: new group parameters, advice needed (again)
Date: Tue, 31 Dec 2002 13:00:18 -0500	[thread overview]
Message-ID: <m37kdqqdal.fsf@heechee.beld.net> (raw)

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 <tzz@lifelogs.com>
(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.")




                 reply	other threads:[~2002-12-31 18:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m37kdqqdal.fsf@heechee.beld.net \
    --to=tzz@lifelogs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).