Gnus development mailing list
 help / color / mirror / Atom feed
From: Andrew Cohen <cohen@andy.bu.edu>
To: ding@gnus.org
Subject: Re: This bug is killing me!
Date: Wed, 31 Aug 2011 12:51:06 -0400	[thread overview]
Message-ID: <87aaapmsn9.fsf@andy.bu.edu> (raw)
In-Reply-To: <m2bov7anu5.fsf@boostpro.com>

>>>>> "Dave" == Dave Abrahams <dave@boostpro.com> writes:

    Dave> This is very serious:
    Dave> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9386GNUAs an
 


I took a minute to look at this and think I have a fix. However I'm not
that familiar with this code and it might break something else. Any
brave souls willing to test it out, just try this replacement function
for `gnus-summary-insert-articles'. (You can just replace it on the fly;
no need to restart gnus. Put in scratch buffer and evaluate). 

(defun gnus-summary-insert-articles (articles)
  (when (setq articles
	      (gnus-sorted-difference articles
				      (mapcar (lambda (h)
						(mail-header-number h))
					      gnus-newsgroup-headers)))
    (setq gnus-newsgroup-headers
	  (gnus-merge 'list
		      gnus-newsgroup-headers
		      (gnus-fetch-headers articles)
		      'gnus-article-sort-by-number))
    (setq gnus-newsgroup-articles 
	  (gnus-merge 'list gnus-newsgroup-articles articles '<))
    ;; Suppress duplicates?
    (when gnus-suppress-duplicates
      (gnus-dup-suppress-articles))

    (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))
    ;; Remove list identifiers from subject
    (gnus-summary-remove-list-identifiers)
    ;; First and last article in this newsgroup.
    (when gnus-newsgroup-headers
      (setq gnus-newsgroup-begin
	    (mail-header-number (car gnus-newsgroup-headers))
	    gnus-newsgroup-end
	    (mail-header-number
	     (gnus-last-element gnus-newsgroup-headers))))
    (when gnus-use-scoring
      (gnus-possibly-score-headers))))





  parent reply	other threads:[~2011-08-31 16:51 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 21:51 Dave Abrahams
2011-08-30  7:01 ` Tassilo Horn
2011-08-30  9:27   ` Robert Pluim
2011-08-30 10:12     ` Tassilo Horn
2011-08-30  9:33   ` [Workaround/Solved] " Dave Abrahams
2011-08-30 10:18     ` Tassilo Horn
2011-08-30 10:33       ` Dave Abrahams
2011-08-30 11:20         ` Tassilo Horn
2011-08-30 18:09           ` Dave Abrahams
2011-08-30 18:17             ` Tassilo Horn
2011-09-10 21:59         ` Lars Magne Ingebrigtsen
2011-08-30 10:39       ` Dave Abrahams
2011-08-30 11:50         ` Tassilo Horn
2011-08-30 18:40           ` Dave Abrahams
2011-08-30 15:04     ` James Cloos
2011-08-30 19:02       ` Dave Abrahams
2011-08-30 19:19         ` Tassilo Horn
2011-08-30 19:53           ` Dave Abrahams
2011-08-30 22:07           ` [The saga continues...] " Dave Abrahams
2011-09-10 22:01             ` Lars Magne Ingebrigtsen
2011-08-30 21:36         ` [Workaround/Solved] " James Cloos
2011-08-31  6:40           ` Dave Abrahams
2011-08-31  7:51           ` Tassilo Horn
2011-08-31  8:27             ` James Cloos
2011-08-31 16:51 ` Andrew Cohen [this message]
2011-08-31 19:49   ` Dave Abrahams
2011-08-31 20:05     ` Andrew Cohen
2011-09-10 22:01   ` Lars Magne Ingebrigtsen
2011-09-10 22:12     ` Andrew Cohen
2011-09-10 22:11       ` Lars Magne Ingebrigtsen

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=87aaapmsn9.fsf@andy.bu.edu \
    --to=cohen@andy.bu.edu \
    --cc=ding@gnus.org \
    /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).