Gnus development mailing list
 help / color / mirror / Atom feed
* problems with nnvirtual and marks
@ 2002-01-03 13:18 dme
  2002-01-07 16:24 ` dme
  0 siblings, 1 reply; 4+ messages in thread
From: dme @ 2002-01-03 13:18 UTC (permalink / raw)


Recently I've been playing with reading most of my (new) mail/news
through nnvirtual groups.  The behaviour of ticked articles in these
groups seems erratic.

Some times I can enter an nnvirtual group where there should be 2
ticked articles (I ticked them and the group list shows me that there
are two ticked), but none of the ticked articles are listed.  If I
exit the summary the ticked article count in the group list goes to
zero.

In some cases I can now quit and restart gnus and the ticked articles
come back.  Sometimes they don't.

Occasionally things go rather more wild, and a random selection of
articles get ticked, some previously seen articles are marked unseen
(and vice versa).

All in all, a disconcerting experience !

Any suggestions as to how to track down this problem ?  Initially I
thought that perhaps it was because I had:
        (gnus-demon-add-handler 'gnus-demon-scan-news 20 20)
in my .gnus.el (as the corruption somewhat coincided with me leaving
Summary buffers visible when new mail was incorporated).  I turned
that off and things improved for a while, but it's doing it again now.

I tried:
        (setq nnml-marks-is-evil t)
but that didn't seem to have any effect.

Configuration:
        - GNU Emacs 21.1.2 (i386-debian-linux-gnu, X toolkit) of
          2001-10-22 on peppermint
        - Oort Gnus v0.05 (cvs update this morning)
        - mail in nnml groups
        - news on a local nntp server (leafnode).

Any suggestions as to possible causes or how to debug ?  The fact that
I can run for a few days without seeing the problem is making it
frustrating.

dme.



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

* Re: problems with nnvirtual and marks
  2002-01-03 13:18 problems with nnvirtual and marks dme
@ 2002-01-07 16:24 ` dme
  2002-01-19 19:45   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: dme @ 2002-01-07 16:24 UTC (permalink / raw)


* dme@dme.org [2002-01-03 13:18:40]
> Recently I've been playing with reading most of my (new) mail/news
> through nnvirtual groups.  The behaviour of ticked articles in these
> groups seems erratic.

After spending some more time looking, I came to the conclusion that
some of the (mark related) changes that I initiate in an nnvirtual
group are not getting passed through to component groups.

For example, if a virtual group comprised of various nnml groups has a
ticked article, pressing "d" on the article in the nnvirtual group
doesn't result in the "tick" mark being removed from the corresponding
nnml group's .marks file (after quitting the group, gnus, emacs, etc).

Based on my poor and particularly incomplete knowledge of gnus
internals, I decided that this might be because nnvirtual is missing a
"request-set-mark" function.  So I wrote one:

(deffoo nnvirtual-request-set-mark (group actions &optional server)
  (nnvirtual-possibly-change-server server)
  (dolist (action actions)
      (let ((range (nth 0 action))
	    (what  (nth 1 action))
	    (marks (nth 2 action)))
	(assert (or (eq what 'add) (eq what 'del)) t
		"Unknown request-set-mark action: %s" what)
	(dolist (article (gnus-uncompress-range range))
	  (let* ((amap (nnvirtual-map-article article))
		 (cgroup (car amap)))
	    (dolist (mark marks)
	      (gnus-request-set-mark cgroup (list (list (list (cdr amap)) what marks)))))))))

This improves the specific problem mentioned above - the removal of
"tick" marks now passes through from nnvirtual to nnml and the .marks
file gets updated.

However, when nnvirtual-request-set-mark is called with a large range
(over a couple of thousand articles), which seems to happen when I
enter a group sometimes, the iteration over the expanded range causes
emacs to go away and hide for a while (not sure how long - enough to
be "irritating", which probably means >10 seconds :-).

Is it possible that I'm anywhere near the source of my problems ?

Of course, I don't understand how this explains the random corruption
of seen/unseen marks which I've seen.

dme.



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

* Re: problems with nnvirtual and marks
  2002-01-07 16:24 ` dme
@ 2002-01-19 19:45   ` Lars Magne Ingebrigtsen
  2002-01-21 22:31     ` Paul Jarc
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-19 19:45 UTC (permalink / raw)


dme@dme.org writes:

> For example, if a virtual group comprised of various nnml groups has a
> ticked article, pressing "d" on the article in the nnvirtual group
> doesn't result in the "tick" mark being removed from the corresponding
> nnml group's .marks file (after quitting the group, gnus, emacs, etc).

[...]

> (deffoo nnvirtual-request-set-mark (group actions &optional server)
>   (nnvirtual-possibly-change-server server)
>   (dolist (action actions)
>       (let ((range (nth 0 action))
> 	    (what  (nth 1 action))
> 	    (marks (nth 2 action)))
> 	(assert (or (eq what 'add) (eq what 'del)) t
> 		"Unknown request-set-mark action: %s" what)
> 	(dolist (article (gnus-uncompress-range range))
> 	  (let* ((amap (nnvirtual-map-article article))
> 		 (cgroup (car amap)))
> 	    (dolist (mark marks)
> 	      (gnus-request-set-mark cgroup (list (list (list (cdr amap)) what marks)))))))))

> This improves the specific problem mentioned above - the removal of
> "tick" marks now passes through from nnvirtual to nnml and the .marks
> file gets updated.
>
> However, when nnvirtual-request-set-mark is called with a large range
> (over a couple of thousand articles), which seems to happen when I
> enter a group sometimes, the iteration over the expanded range causes
> emacs to go away and hide for a while (not sure how long - enough to
> be "irritating", which probably means >10 seconds :-).

Yes, this sounds like the right solution to the problems.  But there
should be a more efficient way of iterating over the articles than
that... 

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



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

* Re: problems with nnvirtual and marks
  2002-01-19 19:45   ` Lars Magne Ingebrigtsen
@ 2002-01-21 22:31     ` Paul Jarc
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Jarc @ 2002-01-21 22:31 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:
> dme@dme.org writes:
>> 	(dolist (article (gnus-uncompress-range range))
...
> Yes, this sounds like the right solution to the problems.  But there
> should be a more efficient way of iterating over the articles than
> that...

nnmaildir iterates over a range list sort of like this:
(while articles   ;; "articles" is a range list
  (setq range (car articles) articles (cdr articles)) ;; pop off the first one
  (while (eq range (car articles))
    (setq articles (cdr articles))) ;; skip duplicates
  ;; Set "num" to the first one in this range and "stop" to the last.
  (if (numberp range) (setq num range stop range)
      (setq num (car range) stop (cdr range)))
  ;; Process each one between "num" and "stop"
  (while (<= num stop)
    ... ;; do something with "num"
    (setq num (1+ num))))


paul



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

end of thread, other threads:[~2002-01-21 22:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-03 13:18 problems with nnvirtual and marks dme
2002-01-07 16:24 ` dme
2002-01-19 19:45   ` Lars Magne Ingebrigtsen
2002-01-21 22:31     ` Paul Jarc

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