Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
Cc: ding@gnus.org
Subject: Re: spam.el not moving ham message from spam group
Date: Mon, 27 Jan 2003 14:37:03 -0500	[thread overview]
Message-ID: <4nel6yv0yo.fsf@lockgroove.bwh.harvard.edu> (raw)
In-Reply-To: <87r8aywgpy.fsf@myrkr.in-berlin.de> (Torsten Hilbrich's message of "Mon, 27 Jan 2003 20:11:21 +0100")

On Mon, 27 Jan 2003, gnus@myrkr.in-berlin.de wrote:
> Niklas Morberg <niklas.morberg@axis.com> writes:
> 
> [...]
> 
>> It's very easy to reproduce:
>>
>> Move any ham message to the spam group
>> Go to the spam group, mark the message as read
>> Exit spam group
>> Ham message has not been moved.
> 
> Yesterday I reported a bug regarding the same problem.  Here is the
> patch I included:
> 
> --- /home/torsten/CVS/gnus/lisp/spam.el 2003-01-24
>     18:47:41.000000000 +0100
> +++ lisp/spam.el        2003-01-26 12:46:55.000000000 +0100
> @@ -408,7 +408,7 @@
>  
>      (while articles
>        (setq article (pop articles))
> -      (when (and (memq mark ham-mark-values)
> +      (when (and (memq (gnus-summary-article-mark article)
> +      ham-mark-values)
>                  (stringp group))
>           (let ((gnus-current-article article))
>             (gnus-summary-move-article nil group))))))
> 
> The function patched is spam-ham-move-routine.

I was just testing that (thanks for the patch!).  There's one more bug
here I want to resolve before committing.

Now, the *first* article is processed OK, but the others are left
behind.  Very strange.  This is the current spam-ham-move-routine:

(defun spam-ham-move-routine (&optional group)
  (let ((articles gnus-newsgroup-articles)
	article ham-mark-values mark)

    (dolist (mark spam-ham-marks)
      (push (symbol-value mark) ham-mark-values))
    
    (dolist (article articles)
      (when (and (memq (gnus-summary-article-mark article) ham-mark-values)
		 (stringp group))
	(let ((gnus-current-article article))
	  (gnus-summary-move-article nil group))))))

Using debug statements shows nothing wrong.  Doing the
gnus-summary-move-article on each article in turn works OK.  But when
the function is run on its own, it only processes the first article in
the articles list.

I'm very puzzled.

Ted



      reply	other threads:[~2003-01-27 19:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-24 13:36 Niklas Morberg
2003-01-24 17:22 ` Ted Zlatanov
2003-01-24 19:31   ` David Z Maze
2003-01-27  8:35   ` Niklas Morberg
2003-01-27 19:11     ` Torsten Hilbrich
2003-01-27 19:37       ` Ted Zlatanov [this message]

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=4nel6yv0yo.fsf@lockgroove.bwh.harvard.edu \
    --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).