Gnus development mailing list
 help / color / mirror / Atom feed
* agent eating article marks
@ 1999-04-22 20:21 Simon Josefsson
  1999-06-12  4:07 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Josefsson @ 1999-04-22 20:21 UTC (permalink / raw)


All article tick marks marked when Gnus is plugged disappear after
I've read some articles in the group when Gnus is unplugged.

Repeat-by:

* (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), read some articles
  (don't tick any), quit the group
* Pressing `G E' now reveals that all tick marks are gone

Is this a known problem?

Am I supposed to only read articles unplugged once I've started to use
the agent?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: agent eating article marks
  1999-04-22 20:21 agent eating article marks Simon Josefsson
@ 1999-06-12  4:07 ` Lars Magne Ingebrigtsen
  1999-06-12 18:51   ` Simon Josefsson
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-06-12  4:07 UTC (permalink / raw)


Simon Josefsson <jas@pdc.kth.se> 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?

> Am I supposed to only read articles unplugged once I've started to use
> the agent?

Nope.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: agent eating article marks
  1999-06-12  4:07 ` Lars Magne Ingebrigtsen
@ 1999-06-12 18:51   ` Simon Josefsson
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Josefsson @ 1999-06-12 18:51 UTC (permalink / raw)


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)))


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-06-12 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-22 20:21 agent eating article marks Simon Josefsson
1999-06-12  4:07 ` Lars Magne Ingebrigtsen
1999-06-12 18:51   ` Simon Josefsson

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).