From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/26552 Path: main.gmane.org!not-for-mail From: Matt Swift Newsgroups: gmane.emacs.gnus.general Subject: error and fix in `gnus-group-prepare-flat' (was: 0.98 + topics = catastrophe) Date: Tue, 09 Nov 1999 19:26:42 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: <199911100026.TAA30136@aleph.swift.xxx> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035163739 19967 80.91.224.250 (21 Oct 2002 01:28:59 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:28:59 +0000 (UTC) Return-Path: Original-Received: from lisa.math.uh.edu (lisa.math.uh.edu [129.7.128.49]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id TAA24803 for ; Tue, 9 Nov 1999 19:27:47 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by lisa.math.uh.edu (8.9.1/8.9.1) with ESMTP id SAB02127; Tue, 9 Nov 1999 18:27:37 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 09 Nov 1999 18:27:49 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id SAA08570 for ; Tue, 9 Nov 1999 18:27:29 -0600 (CST) Original-Received: from polaris.shore.net (polaris.shore.net [207.244.124.105]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id TAA24790; Tue, 9 Nov 1999 19:26:56 -0500 (EST) Original-Received: from swift.shore.net (aleph.swift.xxx) [206.243.167.24] by polaris.shore.net with esmtp (Exim) id 11lLb6-0003Hq-00; Tue, 9 Nov 1999 19:26:48 -0500 Original-Received: from alum.mit.edu (localhost [127.0.0.1]) by aleph.swift.xxx (8.9.3/8.9.3/Debian 8.9.3-6) with ESMTP id TAA30136; Tue, 9 Nov 1999 19:26:45 -0500 X-Authentication-Warning: aleph.swift.xxx: Host localhost [127.0.0.1] claimed to be alum.mit.edu Original-To: "Jody M. Klymak" , ding mail list , Kai.Grossjohann@CS.Uni-Dortmund.DE, bugs@gnus.org, Lee Willis , Per Abrahamsen In-Reply-To: Message from "Jody M. Klymak" of "09 Nov 1999 11:03:52 PST." User-Agent: EMH/1.10.0 SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.4 (i386-debian-linux-gnu) MULE/4.0 (HANANOEN) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:26552 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:26552 I've found the problem (or, one of them). I am the first to admit I often make stupid mistakes. This time, however, I was not making any mistakes. What I've found in the sources coincides exactly with the behvaior I've observed from my Gnus. This leaves an interesting question that I can not begin to answer, why some people on emacs.ding claimed they couldn't duplicate it. Do they have a non-default setting for `gnus-group-prepare-function'? An altered `gnus-group-prepare-flat' or `gnus-get-unread-articles'? This is from `gnus-group-prepare-flat' (in gnus-group.el), which is the default value of `gnus-group-prepare-function' function that lists the groups in the Group buffer, ;; for each group: (let ;; ... unread (car (gnus-gethash group gnus-newsrc-hashtb))) ;; ... ;;; the following applies to living groups, i.e., l < gnus-level-zombie (and unread ; This group might be bogus ;; ... (or all ; We list all groups? (if (eq unread t) ; Unactivated? gnus-group-list-inactive-groups ; We list unactivated (> unread 0)) ; We list groups with unread articles ;; ... ;; LIST THE GROUP (The parameter `all' is passed to the function, and is nil on the initial invocation of this function at startup.) Therefore, a group will not be listed if the value of `unread' is nil. The value that `unread' is assigned is originally assigned in `gnus-get-unread-articles', called as a result of calling `gnus': `unread' is n>0 for an active group with unread messages `unread' is 0 for an active group with no unread messages `unread' is nil for an inactive group (with or without unread messages) `unread' it t for a bogus group (and for other unreachable groups) (Actually, the value starts as nil, and `gnus-get-unread-articles' does not change it for inactive groups.) A "bogus" group is one that exists in .newsrc but not on the server. The comment "This group might be bogus" could mean one of two things. It could mean that since `gnus-get-unread-articles' has skipped contacting the server regarding this group, Gnus has not confirmed that the group exists on the server, and that this is the reason why such groups are *not permitted*. Alternatively, if `unread' is not expected to have a value of nil, the comment could refer to those groups which the line *permits*. These, too, are at risk of being bogus, since the server could not be polled regarding this group for some reason. My interpretation is that the author of the comment meant the latter, that is, did not expect `unread' to ever be nil. The "Unactivated?" comment later lends strength to this interpretation. `unread' for unactivated groups has a value of EITHER nil OR t, not just t. The behavior of this function is not documented, and judging from the comments in the `gnus-group-prepare-flat' function, it is not intentional either. The comment "This group might be bogus" conflicts with the later logic that definitely intends to list unactivated groups (`gnus-group-list-inactive-groups' permitting, and by default it does). Additionally, `gnus-group-prepare-flat' is called when gnus starts with the `all' argument t, obviating any consultation of `gnus-group-list-inactive-groups'. Other people (e.g., Kai, Per) on emacs.ding who for whatever mysterious reason *do* see live-but-inactive groups in their Group buffers consider it the proper behavior. I agree it is proper behavior. To get Gnus to do what's proper, I need to alter the quoted part of the function to read: (and (or (not regexp) (string-match regexp group)) (<= (setq clevel (gnus-info-level info)) level) (>= clevel lowest) (or all ; We list all groups? (if (integerp unread) (> unread 0) ; We list groups with unread articles gnus-group-list-inactive-groups) ; Maybe list unactivated ;; ETC