From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/50119 Path: main.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: marking articles at group exit Date: Fri, 14 Feb 2003 14:05:09 -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: <4nof5eadju.fsf@lockgroove.bwh.harvard.edu> References: <4nvfzmdigq.fsf@lockgroove.bwh.harvard.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1045249469 3149 80.91.224.249 (14 Feb 2003 19:04:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 14 Feb 2003 19:04:29 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18jl8N-0000oD-00 for ; Fri, 14 Feb 2003 20:04:27 +0100 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 18jl9L-0006LG-00; Fri, 14 Feb 2003 13:05:27 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 14 Feb 2003 13:06:25 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id NAA10345 for ; Fri, 14 Feb 2003 13:06:12 -0600 (CST) Original-Received: (qmail 47009 invoked by alias); 14 Feb 2003 19:05:11 -0000 Original-Received: (qmail 47004 invoked from network); 14 Feb 2003 19:05:10 -0000 Original-Received: from clifford.bwh.harvard.edu (134.174.9.41) by 66.230.238.6 with SMTP; 14 Feb 2003 19:05:10 -0000 Original-Received: from lockgroove.bwh.harvard.edu (lockgroove [134.174.9.133]) by clifford.bwh.harvard.edu (8.10.2+Sun/8.11.0) with ESMTP id h1EJ59j20435 for ; Fri, 14 Feb 2003 14:05:09 -0500 (EST) Original-Received: (from tzz@localhost) by lockgroove.bwh.harvard.edu (8.11.6+Sun/8.11.0) id h1EJ59T07366; Fri, 14 Feb 2003 14:05:09 -0500 (EST) 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: (Niklas Morberg's message of "Fri, 14 Feb 2003 16:08:59 +0100") User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:50119 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:50119 On Fri, 14 Feb 2003, niklas.morberg@axis.com wrote: > Ted Zlatanov 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