From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67284 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus and imap Date: Sun, 24 Aug 2008 20:09:36 +0200 Message-ID: <878wumqo7z.fsf@randomsample.de> References: <877iabwtjx.fsf@randomsample.de> <87abf51c4m.fsf@marauder.physik.uni-ulm.de> <874p5dm35l.fsf@randomsample.de> <87iqttq7ja.fsf@randomsample.de> <87d4k0t7ga.fsf@randomsample.de> <87myj3wzp7.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 1219601460 21759 80.91.229.12 (24 Aug 2008 18:11:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Aug 2008 18:11:00 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M15735@lists.math.uh.edu Sun Aug 24 20:11:54 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 1KXK43-0006sJ-4l for ding-account@gmane.org; Sun, 24 Aug 2008 20:11:47 +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 1KXK29-0004f7-IC; Sun, 24 Aug 2008 13:09:49 -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 1KXK27-0004eo-IA for ding@lists.math.uh.edu; Sun, 24 Aug 2008 13:09:47 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1KXK24-0007f9-4o for ding@lists.math.uh.edu; Sun, 24 Aug 2008 13:09:47 -0500 Original-Received: from m61s02.vlinux.de ([83.151.21.164]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1KXK25-000833-00 for ; Sun, 24 Aug 2008 20:09:45 +0200 Original-Received: from dslb-082-083-057-143.pools.arcor-ip.net ([82.83.57.143] helo=honk) by m61s02.vlinux.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1KXK2R-0008Sl-Qr for ding@gnus.org; Sun, 24 Aug 2008 20:10:08 +0200 Mail-Copies-To: never Mail-Followup-To: ding@gnus.org In-Reply-To: (Vitaly Mayatskikh's message of "Sun, 24 Aug 2008 10:47:52 +0200") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2.90 (gnu/linux) X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:67284 Archived-At: Vitaly Mayatskikh writes: >> Absolutely. The problem is that active information is used throughout >> Gnus, and the code is in parts already pretty convoluted, especially the >> ones dealing with updating groups and checking for unread messages. I >> guess that putting unread information in gnus-info would affect fewer >> parts of the code. > > Yes, but we still have to fix all this convoluted code (for > gnus-unread-info or whatever). Unread articles calculations (count of > articles, list of articles) are totally wrong for the case of IMAP. I wonder why it's that bad with the Zimbra imapd. Doesn't it produce contiguous UIDs? I mean, I also get wrong article numbers with dovecot, but only in cases when I delete or move articles, but these are not "totally" wrong. As the documentation says, the number is an estimate, after all. By the way, the reason for generating a partial active file for nnimap is simply speed. Scanning every single group is slow (this is what gnus-group-get-new-news-this-group does - it's much slower than just gnus-group-get-new-news). See this thread for an explanation: http://thread.gmane.org/gmane.emacs.gnus.general/26128/focus=26762 > It might be a good idea to extend api of back ends. I also further searched through gmane for the problem of wrong article counts, since this topic came up frequently on the ding list. And lo and behold, there's stuff already in Gnus for this, it's just not documented in the manual. ,---- | gnus-request-group-articles is a compiled Lisp function in `gnus-int.el'. | (gnus-request-group-articles group) | | Request a list of existing articles in group. `---- This function calls a back end function *-request-group-articles. However, this is currently only implemented for nntp. We could implement this for nnimap and use it for the calculation of the unread count, and also for the calculation of the total number of articles in a group, which is also usually wrong in case of gaps in the article numbers. I think this is much easier to handle than extending gnus-active. However, we should make this optional, since it will make IMAP access slower, which may be a problem for people accessing IMAP servers over slow lines. We should create a new server variable, something like 'exact-count' or something. BTW, there was also a patch for this, though for nnml, but it was not integrated into Gnus: http://thread.gmane.org/gmane.emacs.gnus.general/56714 The comments on this are interesting, especially the ones from Kevin Greiner, which led me to the above request-group-articles function. > By the way, have Gnus developers any plans of doing large changes in > Gnus, like refactoring, global cleanup, etc? Not that I know of. -David