Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: marking articles at group exit
Date: Fri, 14 Feb 2003 14:05:09 -0500	[thread overview]
Message-ID: <4nof5eadju.fsf@lockgroove.bwh.harvard.edu> (raw)
In-Reply-To: <uk7g2q4qc.fsf@axis.com> (Niklas Morberg's message of "Fri, 14 Feb 2003 16:08:59 +0100")

On Fri, 14 Feb 2003, niklas.morberg@axis.com wrote:
> Ted Zlatanov <tzz@lifelogs.com> writes:
> 
>> I have the following in spam.el:
>>
>>   (let ((articles gnus-newsgroup-articles)
>> 	article tomove)
>>     (dolist (article articles)
>>       (gnus-summary-remove-process-mark article)
>>       (when (eq (gnus-summary-article-mark article) gnus-spam-mark)
>> 	(gnus-summary-mark-article article gnus-expirable-mark)
>> 	(push article tomove))))
>>
>> but it produces errors "Can't find article %d" for every article
>> that is in the newsgroup, but is not visible when
>> gnus-summary-remove-process-mark runs (at least, I think that's the
>> problem).  Is there a better way of doing the removal of the
>> process mark from all articles?
> 
> I don't know this at all, but greping for g-s-r-p-m seems to
> indicate that you don't populate articles in the same way as
> most other implementations in gnus. The common case seems to
> be:
> 
>   (let ((articles (gnus-summary-work-articles n))
> 
> Could that be it?

This is what you call when you want to get the articles the user wants
you to work with; gnus-summary-move-article would use this for
instance.  What I want instead is the list of articles in the group
that are visible to the user, assuming that the user only cares about
those articles to be processed when he exits the group.  It seems,
from looking at the gnus-summary-work-articles source, that I have to
go through the summary buffer line by line and ask for the article
number of each line.  That seems like a very clumsy way to do it, and
I would like to avoid it in favor of a more reusable approach if one
exists.

To sum up what I need: I need to go through the articles visible in
the summary buffer and a) take the process-mark off, and b) set the
process-mark on those that match some criteria.  Later I call
gnus-summary-move-article and it will operate on those process-marked
articles.

Thanks
Ted



  reply	other threads:[~2003-02-14 19:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-14 14:50 Ted Zlatanov
2003-02-14 15:08 ` Niklas Morberg
2003-02-14 19:05   ` Ted Zlatanov [this message]
2003-02-16  4:56     ` Kevin Greiner
2003-02-18 17:56       ` Ted Zlatanov

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=4nof5eadju.fsf@lockgroove.bwh.harvard.edu \
    --to=tzz@lifelogs.com \
    /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).