From: Simon Josefsson <jas@pdc.kth.se>
Subject: Re: agent eating article marks
Date: 12 Jun 1999 20:51:24 +0200 [thread overview]
Message-ID: <iluwvx9qmkz.fsf@xiphias.pdc.kth.se> (raw)
In-Reply-To: Lars Magne Ingebrigtsen's message of "12 Jun 1999 06:07:41 +0200"
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> > * (gnus-agentize), register some nntp server with the agent
> > * Enter a nntp group with unread articles, read and tick some
> > articles, quit the group
> > * Fetch articles from the group to the agent with `J u'
> > * Go unplugged, `J J'
> > * Enter the group (the ticked articles aren't shown of course, since
> > they are read and not fetched by the agent),
>
> I think the Agent is supposed to fetch ticker articles. It doesn't do
> this?
Nope. It only fetches headers for unread articles
(`gnus-agent-fetch-headers' calls `gnus-list-of-unread-articles' to
find out what article headers it should fetch).
This is my fix, it should be possible to do it simpler and cleaner but
I don't know enough inner details to work something out. The Agent
will now fetch headers for unread articles and articles with marks
(instead of just unread articles), and it will also make them eligible
for downloading. The fix to `gnus-agent-get-undownloaded-list' was
required to make sure it marked a ticked but read articles as
undownloaded (instead of saying that it didn't exist) if that was the
case.
1999-06-12 Simon Josefsson <jas@pdc.kth.se>
(gnus-agent-get-undownloaded-list): Operate on all articles, not
only unread ones.
(gnus-agent-fetch-headers): Fetch headers from unread and marked
articles, not only unread ones.
--- gnus-agent.el.DIST Sat Jun 12 17:49:13 1999
+++ gnus-agent.el Sat Jun 12 20:39:43 1999
@@ -515,7 +515,8 @@
(gnus-agent-method-p gnus-command-method))
(gnus-agent-load-alist gnus-newsgroup-name)
;; First mark all undownloaded articles as undownloaded.
- (let ((articles gnus-newsgroup-unreads)
+ (let ((articles (gnus-uncompress-sequence
+ (gnus-active gnus-newsgroup-name)))
article)
(while (setq article (pop articles))
(unless (or (cdr (assq article gnus-agent-article-alist))
@@ -787,15 +788,21 @@
(pop gnus-agent-group-alist))))
(defun gnus-agent-fetch-headers (group &optional force)
- (let ((articles (if (gnus-agent-load-alist group)
- (gnus-sorted-intersection
- (gnus-list-of-unread-articles group)
- (gnus-uncompress-range
- (cons (1+ (caar (last gnus-agent-article-alist)))
- (cdr (gnus-active group)))))
- (gnus-list-of-unread-articles group)))
+ (let ((articles (gnus-list-of-unread-articles group))
(gnus-decode-encoded-word-function 'identity)
(file (gnus-agent-article-name ".overview" group)))
+ ;; add article with marks to list of article headers we want to fetch
+ (dolist (arts (gnus-info-marks (gnus-get-info group)))
+ (setq articles (union (gnus-uncompress-sequence (cdr arts))
+ articles)))
+ (setq articles (sort articles '<))
+ ;; remove known articles
+ (when (gnus-agent-load-alist group)
+ (setq articles (gnus-sorted-intersection
+ articles
+ (gnus-uncompress-range
+ (cons (1+ (caar (last gnus-agent-article-alist)))
+ (cdr (gnus-active group)))))))
;; Fetch them.
(gnus-make-directory (nnheader-translate-file-chars
(file-name-directory file)))
prev parent reply other threads:[~1999-06-12 18:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-22 20:21 Simon Josefsson
1999-06-12 4:07 ` Lars Magne Ingebrigtsen
1999-06-12 18:51 ` Simon Josefsson [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=iluwvx9qmkz.fsf@xiphias.pdc.kth.se \
--to=jas@pdc.kth.se \
/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).