From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67292 Path: news.gmane.org!not-for-mail From: Vitaly Mayatskikh Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus and imap Date: Mon, 25 Aug 2008 15:17:58 +0200 Message-ID: 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> <878wumqo7z.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 1219670366 352 80.91.229.12 (25 Aug 2008 13:19:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Aug 2008 13:19:26 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M15743@lists.math.uh.edu Mon Aug 25 15:20:16 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 1KXbyg-000881-Ux for ding-account@gmane.org; Mon, 25 Aug 2008 15:19:27 +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 1KXbxP-0001fc-Kz; Mon, 25 Aug 2008 08:18:07 -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 1KXbxO-0001fS-Hv for ding@lists.math.uh.edu; Mon, 25 Aug 2008 08:18:06 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1KXbxL-0003MH-69 for ding@lists.math.uh.edu; Mon, 25 Aug 2008 08:18:06 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.154]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1KXbxM-0004UU-00 for ; Mon, 25 Aug 2008 15:18:04 +0200 Original-Received: by fg-out-1718.google.com with SMTP id 16so1216708fgg.23 for ; Mon, 25 Aug 2008 06:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=TonI4BYSzgpyT01sXblKyY7mkEc/ASvb5TdcTTiHZAQ=; b=KzF0nqw3Wukol6Ff2xTgx4jBDRvEgFO4ULqFvVMCA1GBu/PYlAoKDdbG9FOGu1+ZL/ DpyX/kOnzUxQkDVBNONGWYB5QX3PWgFKjcBsExu2QJNvnR6FS9LQrVdwgBNj4jbnJDbm cY6siRIGfuLbDcwtNkejucmevkBom+92J1jUE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; b=TjH+9UkDn4LIj40Q3Oai4FCuEaRFQyeuo5aUdSELKgPM3jBuXZjCh8XxPWP3QvLWpN NkAdZdNuY++QOrSlRv29n4TSJsXxPSgHROwnWMbuGUT3nr+dJ0EKXxsUwN6krGvk0qm0 po20x1WuqXHkj4NgH5/JNjYpT2kbE7D9GEs5k= Original-Received: by 10.86.63.19 with SMTP id l19mr3318330fga.77.1219670281626; Mon, 25 Aug 2008 06:18:01 -0700 (PDT) Original-Received: from gravicappa.englab.brq.redhat.com ( [62.40.79.66]) by mx.google.com with ESMTPS id 4sm5428690fgg.4.2008.08.25.06.18.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 25 Aug 2008 06:18:00 -0700 (PDT) In-Reply-To: (David Engster's message of "Mon, 25 Aug 2008 14:25:20 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:67292 Archived-At: David Engster writes: >> articles. Instead of it, I have to ask for last 1000 (or 10000, or >> 100000) articles :( > > Well, this is a result of the wrong article count. Gnus simply uses > > (- (1+ (cdr active)) (car active)) > > i.e. highest-lowest as the number of articles in a group. Since Zimbra > doesn't generate contiguous UIDs, this number is far too large. When you > tell Gnus to get the latest 5 articles, it simply queries the back end > with the UIDs from 'highest-4' to 'highest' - again assuming contiguous > article numbers. This is why you have to query Gnus with insane numbers > of articles, and of course this is slow, since the back end gets queried > with the fully expanded sequence. Yes, I know that. >> Also, I don't like any fixup hooks. Usually that means bad design of >> software, and usually they don't fix the problem at all. > > At the moment, I see two options to get rid of this problem: > > 1) Make nnimap always return contiguous article numbers. Currently, > nnimap simply uses the UIDs provided by the IMAP server as article > numbers. We could change nnimap to use its own set of contiguous article > numbers and map those to the UIDs of the IMAP server. IMAP has this feature. When client executtes SEARCH (FETCH, etc) query without UID keyword, it returns contiguous numbers starting from 1. > The advantage would be that changes would be more or less confined to > nnimap, but this also implies that other back ends wouldn't profit from > this. > 2) Make Gnus correctly deal with non-contiguous article numbers. > > Obviously, all back ends would profit from this, but this would mean > (probably large) changes throughout the back end interface. We could use > gnus-request-group-articles to get a list of all article numbers in a > group (if the back end supports it). Gnus could calculate article counts > from this (total as well as unread) and also query the back end with the > correct sequence of article numbers. > > Other options? I vote for the 2nd solution. It is the most honest way to deal with different types of mail sources. I think, representation of articles numbers is an internal business of back end. >> I wish Gnus to cache all needed meta data, like other mail clients do. It >> is really not necessary to ask for all seen/unseen uids again and >> again, but rather to search uids since last update. > > Yes, caching would have to be done as well. We could use a new hash > table for this. There's one for the nnimap-fixup function anyway... Other things like asynchronous work, multiple connections to one server will be fine :) -- wbr, Vitaly