From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62897 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: downloading attachments on demand Date: Tue, 18 Apr 2006 11:18:27 +0200 Message-ID: <871wvvtf6k.fsf@latte.josefsson.org> References: <29acarvoxa.fsf@james.hut.fi> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145351963 21833 80.91.229.2 (18 Apr 2006 09:19:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 18 Apr 2006 09:19:23 +0000 (UTC) Original-X-From: ding-owner+m11424@lists.math.uh.edu Tue Apr 18 11:19:21 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FVmMZ-0002C3-0q for ding-account@gmane.org; Tue, 18 Apr 2006 11:19:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1FVmMS-0003Di-00; Tue, 18 Apr 2006 04:19:04 -0500 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1FVmM6-0003Dd-00 for ding@lists.math.uh.edu; Tue, 18 Apr 2006 04:18:42 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1FVmM3-0004Cw-FM for ding@lists.math.uh.edu; Tue, 18 Apr 2006 04:18:42 -0500 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net ([217.13.230.178] helo=yxa.extundo.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1FVmLy-0007YA-00 for ; Tue, 18 Apr 2006 11:18:34 +0200 Original-Received: from localhost.localdomain (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k3I9IRqq031658 for ; Tue, 18 Apr 2006 11:18:28 +0200 Original-To: ding@gnus.org OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:21:060418:ding@gnus.org::ZJ64FA/5ThpO6XQm:5DyC In-Reply-To: (Lars Magne Ingebrigtsen's message of "Wed, 12 Apr 2006 06:38:01 +0200") User-Agent: Gnus/5.110005 (No Gnus v0.5) Emacs/22.0.50 (gnu/linux) X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on yxa-iv X-Virus-Scanned: ClamAV version 0.88, clamav-milter version 0.87 on yxa.extundo.com X-Virus-Status: Clean X-Spam-Score: -2.5 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:62897 Archived-At: Lars Magne Ingebrigtsen writes: > Jouni K Seppanen writes: > >> From what I understand about the internal workings of Gnus, you'd have >> to alter the backend protocol to make use of this. Instead of getting >> a buffer filled with a message that it can parse for MIME structure, >> the frontend would ask for some sort of a pre-parsed message object, >> with stubs for the attachments, and only if the user wants to do >> anything with them, would the frontend query the backend for their >> contents. > > Well, nnimap could just return a valid MIME document with > message/external-body parts, I think. Gnus and nnimap would have to > implement a special external-body scheme to download the parts, but > that shouldn't be too much work... I think we've discussed this approach before, and I'm not sure it is the right one. For example, how will this work with the various caches in Gnus? There is the backlog and the agent article cache. Maybe others? I'm afraid I don't have time to work on this. Would someone else be willing to make a stab at it? Perhaps just ignore the backlog and agent cache issues, and see if it is possible to make nnimap return only partial articles if the article is larger than x KB should not be too complex. Then add a command that asks nnimap to really download the entire article. Once this is done, we can see if it is possible to prune the agent/backlog caches correctly. Alternatively, as I believe I have proposed before, we could add a new backend interface to allow Gnus to query the MIME structure of articles, and then only request partial articles, and handle the Gnus cache coherency stuff in Gnus instead of in some nnimap-specific command.