From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/56730 Path: main.gmane.org!not-for-mail From: Kevin Greiner Newsgroups: gmane.emacs.gnus.general Subject: Re: PATCH II (for testing only): [Bug, Debian(?)] "g" goes not Date: Sun, 14 Mar 2004 01:17:07 -0600 Sender: ding-owner@lists.math.uh.edu Message-ID: References: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B2Pt7-0006re-00 for ; Sun, 14 Mar 2004 08:18:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1B2PsE-00037M-00; Sun, 14 Mar 2004 01:17:26 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1B2Ps5-00037E-00 for ding@lists.math.uh.edu; Sun, 14 Mar 2004 01:17:17 -0600 Original-Received: from quimby.gnus.org (quimby.gnus.org [80.91.224.244]) by justine.libertine.org (Postfix) with ESMTP id 6080B3A003D for ; Sun, 14 Mar 2004 01:17:15 -0600 (CST) Original-Received: from news by quimby.gnus.org with local (Exim 3.35 #1 (Debian)) id 1B2Ps2-0000DJ-00 for ; Sun, 14 Mar 2004 08:17:14 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 169 Original-NNTP-Posting-Host: dialup-216-12-206-107.ev1.net Original-X-Trace: quimby.gnus.org 1079248634 824 216.12.206.107 (14 Mar 2004 07:17:14 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Sun, 14 Mar 2004 07:17:14 +0000 (UTC) User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:+TibW9yFE6UGNep4Oa9OGY3gUww= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:56730 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:56730 --=-=-= Marcus Frings writes: > * Mark Plaksin wrote: > >> Here's the relevant section of the diff: > >> Index: gnus-start.el >> diff -u gnus/lisp/gnus-start.el:6.86 gnus/lisp/gnus-start.el:6.87 >> --- gnus-start.el:6.86 Mon Dec 22 15:06:54 2003 >> +++ gnus-start.el Tue Dec 30 04:58:14 2003 > >> [ ... ] > >> @@ -1639,12 +1642,25 @@ >> ;; nil for non-foreign groups that the user has requested not be checked >> ;; t for unchecked foreign groups or bogus groups, or groups that can't >> ;; be checked, for one reason or other. >> - (if (and (setq method (gnus-info-method info)) >> - (not (inline >> - (gnus-server-equal >> - gnus-select-method >> - (setq method (gnus-server-get-method nil method))))) >> - (not (gnus-secondary-method-p method))) >> + (when (setq method (gnus-info-method info)) >> + (if (setq cmethod (assoc method methods-cache)) >> + (setq method (cdr cmethod)) >> + (setq cmethod (inline (gnus-server-get-method nil method))) >> + (push (cons method cmethod) methods-cache) >> + (setq method cmethod))) >> + (when (and method >> + (not (setq method-type (cdr (assoc method type-cache))))) >> + (setq method-type >> + (cond >> + ((gnus-secondary-method-p method) >> + 'secondary) >> + ((inline (gnus-server-equal gnus-select-method method)) >> + 'primary) >> + (t >> + 'foreign))) >> + (push (cons method method-type) type-cache)) >> + (if (and method >> + (eq method-type 'foreign)) >> ;; These groups are foreign. Check the level. >> (when (and (<= (gnus-info-level info) foreign-level) >> (setq active (gnus-activate-group group 'scan))) > > Yes, this one is the source of all evil. :-) I do share your frustration. We're right back to the beginning; my original patch changed this code -- a change that proved ineffective. Part of my problem is the lack of hard test data. To that end, I've written yet another patch :). In this patch, gnus-start has both algorithms - the working original and the broken optimization. What's also different is that I have a debug print on every last line of each algorithm. So, here's what I'd like to see. Obviously, install the patch and recompile gnus. Then start gnus, try to trigger the error (in this version, the old algorithm takes precidence so the groups will update correctly). Then switch to the 'kjg' buffer. Please verify that this buffer contains, at least, one occurrance of "DISCREPENCY LOCATED". If it does, please send the contents of this buffer to me. --=-=-= Content-Disposition: inline; filename=gnus-start.patch3.txt --- ../lisp.cvs_ref/gnus-start.el Sun Mar 14 01:02:02 2004 +++ gnus-start.el Sun Mar 14 00:59:48 2004 @@ -1619,6 +1619,12 @@ (setcar (gnus-group-entry (gnus-info-group info)) num)) num))) +(defun kjg (format &rest values) + (save-excursion + (set-buffer (get-buffer-create "kjg")) + (insert (apply #'format format values) "\n")) + (car (last values))) + ;; Go though `gnus-newsrc-alist' and compare with `gnus-active-hashtb' ;; and compute how many unread articles there are in each group. (defun gnus-get-unread-articles (&optional level) @@ -1637,7 +1643,7 @@ (methods-cache nil) (type-cache nil) scanned-methods info group active method retrieve-groups cmethod - method-type) + method-type new-results old-results) (gnus-message 6 "Checking new news...") (while newsrc @@ -1656,25 +1662,44 @@ ;; nil for non-foreign groups that the user has requested not be checked ;; t for unchecked foreign groups or bogus groups, or groups that can't ;; be checked, for one reason or other. - (when (setq method (gnus-info-method info)) - (if (setq cmethod (assoc method methods-cache)) - (setq method (cdr cmethod)) - (setq cmethod (inline (gnus-server-get-method nil method))) - (push (cons method cmethod) methods-cache) - (setq method cmethod))) - (when (and method - (not (setq method-type (cdr (assoc method type-cache))))) - (setq method-type - (cond - ((gnus-secondary-method-p method) - 'secondary) - ((inline (gnus-server-equal gnus-select-method method)) - 'primary) - (t - 'foreign))) - (push (cons method method-type) type-cache)) - (if (and method - (eq method-type 'foreign)) + + (kjg "\n\nBeginning Test on Group %s" (gnus-info-group info)) + (when (kjg "method = %s" (setq method (gnus-info-method info))) + (if (kjg "cmethod = %s" (setq cmethod (assoc method methods-cache))) + (kjg "method = %s" (setq method (cdr cmethod))) + (kjg "cmethod = %s" (setq cmethod (inline (gnus-server-get-method nil method)))) + (push (kjg "Pushed %s onto methods-cache" (cons method cmethod)) methods-cache) + (kjg "method = %s" (setq method cmethod)))) + (when (kjg "Need to calc method type is %s" + (and method + (not (kjg "method-type = %s" (setq method-type (cdr (kjg "method[%s] entry in type-cache = %s" method (assoc method type-cache)))))))) + (kjg "method-type = %s" (setq method-type + (cond + ((gnus-secondary-method-p method) + 'secondary) + ((inline (gnus-server-equal gnus-select-method method)) + 'primary) + (t + 'foreign)))) + (push (kjg "Pushed %s onto type-cache" (cons method method-type)) type-cache)) + + (setq new-results (kjg "new-results = %s" (and method + (eq method-type 'foreign)))) + + (kjg "Beginning old solution") + (setq old-results (and (kjg "method = %s" (setq method (gnus-info-method info))) + (kjg "not equal = %s" (not (inline + (gnus-server-equal + gnus-select-method + (kjg "method = %s" (setq method (gnus-server-get-method nil method))))))) + (kjg "not secondary method = %s" (not (gnus-secondary-method-p method))))) + + (kjg "old-results = %s" old-results) + + (or (equal new-results old-results) + (kjg "DISCREPENCY LOCATED: old-results = %s new-results = %s" old-results new-results)) + + (if old-results ;; These groups are foreign. Check the level. (when (and (<= (gnus-info-level info) foreign-level) (setq active (gnus-activate-group group 'scan))) --=-=-= Kevin --=-=-=--