From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/70511 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Bj=C3=B8rn_Mork?= Newsgroups: gmane.emacs.gnus.general Subject: Re: That newfangled IMAP thing... Date: Sun, 05 Sep 2010 12:55:40 +0200 Organization: m Message-ID: <87d3ssmpcj.fsf@nemi.mork.no> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1283693169 28643 80.91.229.12 (5 Sep 2010 13:26:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 5 Sep 2010 13:26:09 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M18886@lists.math.uh.edu Sun Sep 05 15:26:08 2010 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.69) (envelope-from ) id 1OsFEV-0005dp-Tf for ding-account@gmane.org; Sun, 05 Sep 2010 15:26:08 +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 1OsFEU-0002sz-O1; Sun, 05 Sep 2010 08:26:06 -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 1OsCtG-0001cP-O5 for ding@lists.math.uh.edu; Sun, 05 Sep 2010 05:56:02 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1OsCtB-0000Nz-Qh for ding@lists.math.uh.edu; Sun, 05 Sep 2010 05:56:02 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1OsCtB-0006kZ-00 for ; Sun, 05 Sep 2010 12:55:57 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OsCt9-0006X7-Gk for ding@gnus.org; Sun, 05 Sep 2010 12:55:55 +0200 Original-Received: from nemi.mork.no ([148.122.252.4]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 Sep 2010 12:55:55 +0200 Original-Received: from bjorn by nemi.mork.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 Sep 2010 12:55:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 84 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: nemi.mork.no User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:/WLIsx6B1DoIxTtwBZGZjrRk6cQ= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:70511 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Lars Magne Ingebrigtsen writes: > I've been trolling the gnus-bug group a bit, and it seems like the > thing people complain about most is the IMAP support. > > So perhaps I should have a peek at it. Please do. And while you are at it, please consider something like the attached patch. I've been using it since ... forever, and find it absolutely necessary to even consider doing expiry of nnimap groups with a target group. Without this, all expired articles are downloaded and then uploaded even if the target is on the same IMAP server. That can be quite annoying on a low bandwidth link... Bjørn --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0001-nnimap.el.patch Content-Transfer-Encoding: 8bit >From b957eaf442b63ea24eb3bee0159bf14b0f3f73d8 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Bj=C3=B8rn=20Mork?= Date: Tue, 20 Apr 2010 17:37:23 +0200 Subject: [PATCH] nnimap.el: - accelerate the common server-internal expiry-target case MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bjørn Mork --- lisp/nnimap.el | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) diff --git a/lisp/nnimap.el b/lisp/nnimap.el index c76169c..3a06adb 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -1553,14 +1553,23 @@ function is generally only called when Gnus is shutting down." (defun nnimap-expiry-target (arts group server) (unless (eq nnmail-expiry-target 'delete) - (with-temp-buffer - (dolist (art arts) - (nnimap-request-article art group server (current-buffer)) - ;; hints for optimization in `nnimap-request-accept-article' - (let ((nnimap-current-move-article art) - (nnimap-current-move-group group) - (nnimap-current-move-server server)) - (nnmail-expiry-target-group nnmail-expiry-target group)))) + (if (and (not (functionp nnmail-expiry-target)) + (gnus-server-equal (gnus-group-method nnmail-expiry-target) + (gnus-server-to-method + (format "nnimap:%s" server)))) + ;; moving article within same server, speed it up... + (and (nnimap-possibly-change-group group) + (imap-message-copy (imap-range-to-message-set arts) + (gnus-group-short-name nnmail-expiry-target) + 'dontcreate nil nnimap-server-buffer)) + (with-temp-buffer + (dolist (art arts) + (nnimap-request-article art group server (current-buffer)) + ;; hints for optimization in `nnimap-request-accept-article' + (let ((nnimap-current-move-article art) + (nnimap-current-move-group group) + (nnimap-current-move-server server)) + (nnmail-expiry-target-group nnmail-expiry-target group))))) ;; It is not clear if `nnmail-expiry-target' somehow cause the ;; current group to be changed or not, so we make sure here. (nnimap-possibly-change-group group server))) -- 1.5.6.5 --=-=-=--