From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/44134 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: Spam spam spam spam spam Date: Tue, 02 Apr 2002 17:06:15 -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: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1017785296 22288 127.0.0.1 (2 Apr 2002 22:08:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 2 Apr 2002 22:08:16 +0000 (UTC) Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16sWRr-0005nM-00 for ; Wed, 03 Apr 2002 00:08:15 +0200 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 16sWQd-00067V-00; Tue, 02 Apr 2002 16:06:59 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 02 Apr 2002 16:07:07 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id QAA05536 for ; Tue, 2 Apr 2002 16:06:53 -0600 (CST) Original-Received: (qmail 15063 invoked by alias); 2 Apr 2002 22:06:40 -0000 Original-Received: (qmail 15058 invoked from network); 2 Apr 2002 22:06:40 -0000 Original-Received: from liilmtlssm01.mailtask.com (208.203.59.25) by gnus.org with SMTP; 2 Apr 2002 22:06:40 -0000 Original-Received: from LIILMTLSFE02.mailtask.com ([208.203.59.43]) by LIILMTLSSM01.mailtask.com with Microsoft SMTPSVC(5.0.2195.3779); Tue, 2 Apr 2002 16:06:12 -0600 Original-Received: from onyx.nimbus.northernlight.com ([10.128.22.65]) by LIILMTLSFE02.mailtask.com with Microsoft SMTPSVC(5.0.2195.3779); Tue, 2 Apr 2002 16:06:13 -0600 Original-To: ding@gnus.org 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@gnus.org In-Reply-To: (Lars Magne Ingebrigtsen's message of "Tue, 02 Apr 2002 21:52:52 +0200") Original-Lines: 38 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-redhat-linux-gnu) X-OriginalArrivalTime: 02 Apr 2002 22:06:13.0915 (UTC) FILETIME=[9ABB96B0:01C1DA92] Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:44134 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:44134 --=-=-= Lars Magne Ingebrigtsen writes: > Ted Zlatanov writes: > >> Is there anyone who will implement these, or will Lars do it? I'd >> like to get this functionality in place soon, and I can contribute if >> needed. > > Please go ahead. :-) > > The spam.el file contains rudimentary whitelist/blacklist support, > and you can build on that. What features are missing that you wanted to add? Did you want to finish the work? It looks like spam.el is semi-complete already. I don't mind picking up - it's always fun to polish my Lisp. Just let me know what features/functions you wanted. What did you think about the "spam" mark? I've added it to gnus-sum.el; patch attached. I picked the "H" character for the company that brought us the original word, since "S" was taken. I can see it being applied by score or by a splitting-time function. I also added a gnus-summary-mark-as-spam function, which could be augmented to also report the spam to user-defined destinations. I don't think a user would always want spam going to the same folder, as a score would force them to do. That's why the spam mark makes sense. You can apply it to an article; it will be treated as a gnus-killed-mark in most ways. But you can limit the summary to spam only, whereas otherwise you're stuck with differently scored, but otherwise alike articles. Thanks Ted --=-=-= Content-Disposition: attachment; filename=spam-mark.patch Content-Description: gnus-spam-mark addition patch --- gnus-sum.el Tue Apr 2 16:57:30 2002 +++ gnus-sum-tzz.el Tue Apr 2 16:28:46 2002 @@ -420,6 +420,11 @@ :group 'gnus-summary-marks :type 'character) +(defcustom gnus-spam-mark ?H + "*Mark used for spam articles." + :group 'gnus-summary-marks + :type 'character) + (defcustom gnus-souped-mark ?F "*Mark used for souped articles." :group 'gnus-summary-marks @@ -536,7 +541,7 @@ :type 'boolean) (defcustom gnus-auto-expirable-marks - (list gnus-killed-mark gnus-del-mark gnus-catchup-mark + (list gnus-spam-mark gnus-killed-mark gnus-del-mark gnus-catchup-mark gnus-low-score-mark gnus-ancient-mark gnus-read-mark gnus-souped-mark gnus-duplicate-mark) "*The list of marks converted into expiration if a group is auto-expirable." @@ -2326,15 +2331,10 @@ (defvar gnus-summary-tool-bar-map nil) ;; Emacs 21 tool bar. Should be no-op otherwise. -;; NB: A new function tool-bar-local-item-from-menu is added in Emacs -;; 21.2.50+. Considering many users use Emacs 21, use -;; tool-bar-add-item-from-menu here. (defun gnus-summary-make-tool-bar () - (if (and - (condition-case nil (require 'tool-bar) (error nil)) - (fboundp 'tool-bar-add-item-from-menu) - (default-value 'tool-bar-mode) - (not gnus-summary-tool-bar-map)) + (if (and (fboundp 'tool-bar-add-item-from-menu) + (default-value 'tool-bar-mode) + (not gnus-summary-tool-bar-map)) (setq gnus-summary-tool-bar-map (let ((tool-bar-map (make-sparse-keymap)) (load-path (mm-image-load-path))) @@ -7248,7 +7248,7 @@ ;; Concat all the marks that say that an article is read and have ;; those removed. (list gnus-del-mark gnus-read-mark gnus-ancient-mark - gnus-killed-mark gnus-kill-file-mark + gnus-killed-mark gnus-spam-mark gnus-kill-file-mark gnus-low-score-mark gnus-expirable-mark gnus-canceled-mark gnus-catchup-mark gnus-sparse-mark gnus-duplicate-mark gnus-souped-mark) @@ -9133,6 +9133,13 @@ the actual number of articles marked is returned." (interactive "p") (gnus-summary-mark-forward n gnus-expirable-mark)) + +(defun gnus-summary-mark-as-spam (n) + "Mark N articles forward as spam. +If N is negative, mark backward instead. The difference between N and +the actual number of articles marked is returned." + (interactive "p") + (gnus-summary-mark-forward n gnus-spam-mark)) (defun gnus-summary-mark-article-as-replied (article) "Mark ARTICLE as replied to and update the summary line. --=-=-=--