--- Begin Message ---
Subject: |
Re: nnimap-split-download-body feature request |
Date: |
Thu, 20 Nov 2003 09:20:09 -0500 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v) |
On Thu, 20 Nov 2003, jas@extundo.com wrote:
> Ted Zlatanov <tzz@lifelogs.com> writes:
>> Nah, just fetch the headers. I think that's all you can reasonably
>> expect as a Gnus user. Maybe fake the body with "BODY TOO LARGE"
>> or something like that, or add a header, but I personally think
>> that retrieving just the headers in such a case is a perfectly good
>> solution.
>
> The asynchronous prefetch, agent, cache (and possibly more things)
> would cache this incomplete article. How would they know the
> message was incomplete? After requesting a re-fetch of the entire
> article, all those cached copies will need to be purged. Sounds
> like work.
I'm not sure I understand. Here's a patch to show you what I think
could be done, since nnimap-split-articles already decides between
the head and the whole body. The nnimap-check-body-size function
needs to be provided, but I hope you see what I mean.
Ted.
--- nnimap.el 4 Sep 2003 22:22:18 -0000 6.71
+++ nnimap.el 20 Nov 2003 14:20:24 -0000
@@ -1271,9 +1271,10 @@
(when (setq rule (nnimap-split-find-rule server inbox))
;; iterate over articles
(dolist (article (imap-search nnimap-split-predicate))
- (when (if (if (eq nnimap-split-download-body 'default)
- nnimap-split-download-body-default
- nnimap-split-download-body)
+ (when (if (and (nnimap-check-body-size article)
+ (if (eq nnimap-split-download-body 'default)
+ nnimap-split-download-body-default
+ nnimap-split-download-body))
(and (nnimap-request-article article)
(with-current-buffer nntp-server-buffer
(mail-narrow-to-head)))
(nnimap-request-head article))
--- End Message ---