From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/57259 Path: main.gmane.org!not-for-mail From: TSUCHIYA Masatoshi Newsgroups: gmane.emacs.gnus.general Subject: Re: [spam.el] Misleading messages on group exit Date: Tue, 11 May 2004 06:37:02 +0000 Sender: ding-owner@lists.math.uh.edu Message-ID: <877jvjjwq9.fsf@namazu.org> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1084257456 15210 80.91.224.253 (11 May 2004 06:37:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 May 2004 06:37:36 +0000 (UTC) Original-X-From: ding-owner+M5799@lists.math.uh.edu Tue May 11 08:37:28 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNQtM-0005aG-00 for ; Tue, 11 May 2004 08:37:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1BNQt9-0008TR-00; Tue, 11 May 2004 01:37:15 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1BNQt1-0008TL-00 for ding@lists.math.uh.edu; Tue, 11 May 2004 01:37:07 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1BNQt0-0006iW-Tv for ding@lists.math.uh.edu; Tue, 11 May 2004 01:37:06 -0500 Original-Received: from pine.kuee.kyoto-u.ac.jp (pine.kuee.kyoto-u.ac.jp [130.54.208.130]) by justine.libertine.org (Postfix) with SMTP id 700A13A0026 for ; Tue, 11 May 2004 01:37:05 -0500 (CDT) Original-Received: (qmail 12375 invoked from network); 11 May 2004 06:37:04 -0000 Original-Received: from unknown (HELO pine.kuee.kyoto-u.ac.jp) (130.54.208.130) by pine.kuee.kyoto-u.ac.jp with SMTP; 11 May 2004 06:37:04 -0000 Original-To: ding@gnus.org Mail-Followup-To: ding@gnus.org In-Reply-To: (Reiner Steib's message of "Thu, 06 May 2004 14:08:35 +0200") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) X-Dispatcher: imput version 20031028(IM146) Original-Lines: 84 Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:57259 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:57259 --=-=-= >> On Thu, 06 May 2004 14:08:35 +0200 >> 4.uce.03.r.s@nurfuerspam.de (Reiner Steib) said as follows: >when I quit the summary buffer in a ham group, I get the message >"Marking spam as expired without moving it" although I marked an >article as spam that should have been moved. In fact, the article >was moved, i.e. the message is misleading or wrong. I think that this message is misleading, too. Therefore, I'd like to propose the attached change that makes spam.el quiet slightly. Any comments? -- TSUCHIYA Masatoshi --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- spam.el 30 Apr 2004 17:55:59 -0000 7.34 +++ spam.el 11 May 2004 06:31:30 -0000 @@ -861,16 +861,20 @@ (unless (and spam-move-spam-nonspam-groups-only (spam-group-spam-contents-p gnus-newsgroup-name)) - (gnus-message 6 "Marking spam as expired and moving it to %s" - (gnus-parameter-spam-process-destination - gnus-newsgroup-name)) - (spam-mark-spam-as-expired-and-move-routine - (gnus-parameter-spam-process-destination gnus-newsgroup-name))) + (let ((num + (spam-mark-spam-as-expired-and-move-routine + (gnus-parameter-spam-process-destination gnus-newsgroup-name)))) + (when (> num 0) + (gnus-message 6 "Marking %d spams as expired and moving it to %s" + num (gnus-parameter-spam-process-destination + gnus-newsgroup-name))))) ;; now we redo spam-mark-spam-as-expired-and-move-routine to only ;; expire spam, in case the above did not expire them - (gnus-message 6 "Marking spam as expired without moving it") - (spam-mark-spam-as-expired-and-move-routine nil) + (let ((num (spam-mark-spam-as-expired-and-move-routine nil))) + (when (> num 0) + (gnus-message 6 "Marking %d spams as expired without moving it" + num))) (when (or (spam-group-ham-contents-p gnus-newsgroup-name) (and (spam-group-spam-contents-p gnus-newsgroup-name) @@ -964,7 +968,8 @@ (let ((gnus-novice-user nil)) ; don't ask me if I'm sure (gnus-summary-delete-article nil)))) - (gnus-summary-yank-process-mark)))) + (gnus-summary-yank-process-mark) + (length tomove)))) (defun spam-ham-copy-or-move-routine (copy groups) (gnus-summary-kill-process-mark) @@ -1406,12 +1411,13 @@ gnus-newsgroup-articles classification))) ;; process them - (gnus-message 5 "%s %d %s articles as %s using backend %s" - (if unregister "Unregistering" "Registering") - (length articles) - (if specific-articles "specific" "") - (symbol-name classification) - (symbol-name check)) + (when articles + (gnus-message 5 "%s %d%s articles as %s using backend %s" + (if unregister "Unregistering" "Registering") + (length articles) + (if specific-articles " specific" "") + (symbol-name classification) + (symbol-name check))) (funcall run-function articles) ;; now log all the registrations (or undo them, depending on unregister) (dolist (article articles) --=-=-=--