From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/79803 Path: news.gmane.org!not-for-mail From: Andrew Cohen Newsgroups: gmane.emacs.gnus.general Subject: Re: This bug is killing me! Date: Wed, 31 Aug 2011 12:51:06 -0400 Message-ID: <87aaapmsn9.fsf@andy.bu.edu> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1314809561 17719 80.91.229.12 (31 Aug 2011 16:52:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 31 Aug 2011 16:52:41 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M28097@lists.math.uh.edu Wed Aug 31 18:52:37 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qyo1k-00043C-Lm for ding-account@gmane.org; Wed, 31 Aug 2011 18:52:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Qyo0e-0007oG-Jy; Wed, 31 Aug 2011 11:51:28 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Qyo0d-0007o7-Db for ding@lists.math.uh.edu; Wed, 31 Aug 2011 11:51:27 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Qyo0b-0003Ui-Rn for ding@lists.math.uh.edu; Wed, 31 Aug 2011 11:51:26 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Qyo0Z-00033u-1P for ding@gnus.org; Wed, 31 Aug 2011 18:51:23 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Qyo0Y-0003R3-0V for ding@gnus.org; Wed, 31 Aug 2011 18:51:22 +0200 Original-Received: from andy.bu.edu ([128.197.41.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 31 Aug 2011 18:51:21 +0200 Original-Received: from cohen by andy.bu.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 31 Aug 2011 18:51:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 63 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: andy.bu.edu User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:2G1IaZmhdJ6Rv8Jqo4c2eTYcTCE= X-Spam-Score: -5.4 (-----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:79803 Archived-At: >>>>> "Dave" == Dave Abrahams 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))))