Gnus development mailing list
 help / color / mirror / Atom feed
* Re: gnus-summary-insert-old-articles marks articles as read
       [not found] ` <yoijwswavglw.fsf@remote5.student.chalmers.se>
@ 2007-08-06 10:12   ` Katsumi Yamaoka
  0 siblings, 0 replies; only message in thread
From: Katsumi Yamaoka @ 2007-08-06 10:12 UTC (permalink / raw)
  To: bugs; +Cc: ding

[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]

Hi,

(I added Cc:ding for archiving this article in the Gmane server.
 I agree with changing the bug-report address to ding as Reiner
 wrote in: http://article.gmane.org/gmane.emacs.pretest.bugs/19472)

>>>>> Johan Bockgård wrote:

> [Resending]

> `/ o' (gnus-summary-insert-old-articles) marks the newly inserted
> articles as "old", causing the following highly annoying behavior:

>     Go to a group where the latest bunch of articles are unread.

>     3 RET    ; (1) enter group
>     4 / o    ; (2) insert old articles
>     q        ; (3) exit group
>     P RET    ; (4) re-enter group
>     q        ; (5) exit

> The 4 articles inserted by `/ o' are marked `O' in step (2) even if
> they were previously unread. After re-entering the group (4) they are
> marked `M' (duplicate suppression). After exiting (5) they will be
> marked permanently read although the user has never read them or asked
> for them to be marked.

The cause is that Gnus doesn't check whether inserted articles are
unread or not when `gnus-fetch-old-headers' is nil (the default).
And articles that have no mark and are not recognized as unread
are marked with `gnus-ancient-mark' (i.e., `O').  Although, in a
sense, recognizing them as ancient might not necessarily be wrong,
it's indeed useless.  In addition to this, it needs to be improved
further so that the information of marks having been changed on
inserted articles may be updated (internally in Gnus and in the
newsrc file afterward).

I've tried fixing it in the CVS trunk, though I'm not quite sure
this is the right fix and does not enbug.  Could you try it?
The patch for No Gnus v0.6 that you use is below:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1372 bytes --]

--- gnus-sum.el~	2007-04-27 08:39:17 +0000
+++ gnus-sum.el	2007-08-06 10:06:40 +0000
@@ -12180,12 +12180,24 @@
     (when gnus-suppress-duplicates
       (gnus-dup-suppress-articles))
 
-    ;; We might want to build some more threads first.
-    (when (and gnus-fetch-old-headers
-	       (eq gnus-headers-retrieved-by 'nov))
-      (if (eq gnus-fetch-old-headers 'invisible)
-	  (gnus-build-all-threads)
-	(gnus-build-old-threads)))
+    (if (and gnus-fetch-old-headers
+	     (eq gnus-headers-retrieved-by 'nov))
+	;; We might want to build some more threads first.
+	(if (eq gnus-fetch-old-headers 'invisible)
+	    (gnus-build-all-threads)
+	  (gnus-build-old-threads))
+      ;; Mark the inserted articles that are unread as unread.
+      (setq gnus-newsgroup-unreads
+	    (gnus-sorted-nunion
+	     gnus-newsgroup-unreads
+	     (gnus-sorted-nintersection
+	      (gnus-list-of-unread-articles gnus-newsgroup-name)
+	      articles)))
+      ;; Mark the inserted articles as selected so that the information
+      ;; of the marks having been changed by a user may be updated when
+      ;; exiting this group.  See `gnus-summary-update-info'.
+      (dolist (art articles)
+	(setq gnus-newsgroup-unselected (delq art gnus-newsgroup-unselected))))
     ;; Let the Gnus agent mark articles as read.
     (when gnus-agent
       (gnus-agent-get-undownloaded-list))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-06 10:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <yoijzmi15eie.fsf@linus003.dd.chalmers.se>
     [not found] ` <yoijwswavglw.fsf@remote5.student.chalmers.se>
2007-08-06 10:12   ` gnus-summary-insert-old-articles marks articles as read Katsumi Yamaoka

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