From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67278 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus and imap Date: Sat, 23 Aug 2008 11:19:01 +0200 Message-ID: <87d4k0t7ga.fsf@randomsample.de> References: <877iabwtjx.fsf@randomsample.de> <87abf51c4m.fsf@marauder.physik.uni-ulm.de> <874p5dm35l.fsf@randomsample.de> <87iqttq7ja.fsf@randomsample.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1219483237 18772 80.91.229.12 (23 Aug 2008 09:20:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Aug 2008 09:20:37 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M15729@lists.math.uh.edu Sat Aug 23 11:21:30 2008 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.50) id 1KWpJB-0000mP-MO for ding-account@gmane.org; Sat, 23 Aug 2008 11:21:22 +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 1KWpH9-0005nv-9S; Sat, 23 Aug 2008 04:19:15 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1KWpH6-0005nk-Af for ding@lists.math.uh.edu; Sat, 23 Aug 2008 04:19:12 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1KWpH3-0000Ei-3b for ding@lists.math.uh.edu; Sat, 23 Aug 2008 04:19:12 -0500 Original-Received: from m61s02.vlinux.de ([83.151.21.164]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1KWpH3-00062o-00 for ; Sat, 23 Aug 2008 11:19:09 +0200 Original-Received: from dslb-082-083-041-056.pools.arcor-ip.net ([82.83.41.56] helo=honk) by m61s02.vlinux.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1KWpHM-0004Th-CT for ding@gnus.org; Sat, 23 Aug 2008 11:19:28 +0200 Mail-Copies-To: never Mail-Followup-To: ding@gnus.org In-Reply-To: (Vitaly Mayatskikh's message of "Fri, 22 Aug 2008 20:11:29 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/22.2.90 (gnu/linux) X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:67278 Archived-At: Vitaly Mayatskikh writes: >> There are surely some bugs - I sometimes get >> wrong article counts when *entering* the group, which is kinda funny, >> since it usually was vice versa. > > That's interesting. Can you tell me how do you customize Gnus in your > ~/.gnus (agent, cache, etc)? The problem lies in gnus-read-active-file-2, which is called by gnus-get-unread-articles. This uses nnimap-retrieve-groups to get a partial active file of the checked groups, which is of the "regular" (max . min) style and overwrites the previous "new" active sequence in the hash table. I'm not sure how to solve this. nnimap-retrieve-groups could return the whole sequence, just like nnimap-request-group. Or we could change the whole check-for-new-news sequence which is currently done by Gnus, so that it does not use a partial active file. Anyway, I have the feeling this gets messy. I'm not sure if this is the right way to do this. The main problem I see is that this will break any code which depends on gnus-active returning the cons (max . min). For example, this currently breaks nnmairix, which isn't that much of a problem since I can change this. But I wonder how much external code exists which uses gnus-active. We could solve this by extending the gnus-active macro, but this is somewhat ugly, IMO. It may also be that there exists code (also in Gnus) which directly accesses the hash table. In my opinion, we should re-think your first effort, using group info. You said: > Well, it needs some special flag to detect old vs new backend. It looks > like ugly solution for me :) What about not extending the group info, but putting the unread sequence in the existing marks section. Either the back end does this, then it can be included, or we do it the old way. Just a suggestion, I don't know if this works. As I said, I'm not that familiar with the back end internals. -David