Gnus development mailing list
 help / color / mirror / Atom feed
* gnus.el: new group parameters, advice needed (again)
@ 2002-12-31 18:00 Ted Zlatanov
  0 siblings, 0 replies; only message in thread
From: Ted Zlatanov @ 2002-12-31 18:00 UTC (permalink / 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.")




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-31 18:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-31 18:00 gnus.el: new group parameters, advice needed (again) Ted Zlatanov

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).