Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: Re: spam splitting  : "already done".
Date: Thu, 27 Jan 2011 20:06:44 -0600	[thread overview]
Message-ID: <87fwsddbnv.fsf@lifelogs.com> (raw)
In-Reply-To: <87tygtx0g5.fsf@gnus.org>

On Thu, 27 Jan 2011 17:48:42 -0800 Lars Ingebrigtsen <larsi@gnus.org> wrote: 

LI> Richard Riley <rileyrg@googlemail.com> writes:
>> Should that say "when nil all unread articles are checked for
>> spam". There may or may not be marking involved.

LI> I see.  Perhaps the spam checking should be running on only the unseen
LI> articles?  Ted?

The spam processors are run on whatever is spam-marked.

spam-marks are applied when you enter the group according to the basic
rules, using `spam-mark-new-messages-in-spam-group-as-spam'[1] and
`spam-mark-only-unseen-as-spam'.  It also matters if the group is a spam
group and if you've customized the group or topic.

The goal is to mark only articles you haven't seen before as spam.  It
sounds like the problem is that you're getting seen but unread articles
marked as spam (and you have spam-mark-only-unseen-as-spam set to t).
The logic is (IMO) very simple, see below.  Can you please add

(debug 1 spam-mark-new-messages-in-spam-group-as-spam 
       2 spam-mark-only-unseen-as-spam
       3 (spam-group-spam-contents-p gnus-newsgroup-name)
       4 gnus-newsgroup-name)

right before the (when...) below, hit `M-C-e' to evaluate, then tell us
what you get in the debug trace?  Hit `q' to abort it or `c' to
continue, then just remove the debug line and use `M-C-e' again to get
back the original behavior.

The reason for this is to make sure that your variables and parameters
are set to what you think.  Can you also confirm my understanding of
your problem is correct, and that you're not getting the results we're
expecting?

Thanks and sorry for the lengthy explanation...
Ted

[1] contender for "longest variable name with a purpose" :)

(defun spam-mark-junk-as-spam-routine ()
  ;; check the global list of group names spam-junk-mailgroups and the
  ;; group parameters
  (when (spam-group-spam-contents-p gnus-newsgroup-name)
    (gnus-message 6 "Marking %s articles as spam"
                  (if spam-mark-only-unseen-as-spam
                      "unseen"
                    "unread"))
    (let ((articles (if spam-mark-only-unseen-as-spam
                        gnus-newsgroup-unseen
                      gnus-newsgroup-unreads)))
      (if spam-mark-new-messages-in-spam-group-as-spam
          (dolist (article articles)
            (gnus-summary-mark-article article gnus-spam-mark))
        (gnus-message 9 "Did not mark new messages as spam.")))))




  reply	other threads:[~2011-01-28  2:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27 20:03 Richard Riley
2011-01-28  0:30 ` Lars Ingebrigtsen
2011-01-28  1:40   ` Richard Riley
2011-01-28  1:48     ` Lars Ingebrigtsen
2011-01-28  2:06       ` Ted Zlatanov [this message]
2011-01-28  9:10         ` Richard Riley

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=87fwsddbnv.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    /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).