From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84371 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: furthermore! (nnimap splitting con't) Date: Tue, 18 Mar 2014 09:53:37 +0800 Message-ID: <87ob14p90e.fsf@ericabrahamsen.net> References: <87vbvrly5i.fsf@ericabrahamsen.net> <87d2hyx7h1.fsf@building.gnus.org> <8738itylcg.fsf@building.gnus.org> <877g82vei6.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1395107545 18599 80.91.229.3 (18 Mar 2014 01:52:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2014 01:52:25 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M32617@lists.math.uh.edu Tue Mar 18 02:52:33 2014 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WPjCi-0007aR-PG for ding-account@gmane.org; Tue, 18 Mar 2014 02:52:33 +0100 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 1WPjBe-0000kF-Gz; Mon, 17 Mar 2014 20:51:26 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1WPjBb-0000k2-E2 for ding@lists.math.uh.edu; Mon, 17 Mar 2014 20:51:23 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1WPjBW-0000Hh-Ho for ding@lists.math.uh.edu; Mon, 17 Mar 2014 20:51:22 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1WPjBU-00067x-K6 for ding@gnus.org; Tue, 18 Mar 2014 02:51:16 +0100 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WPjBU-00062V-7y for ding@gnus.org; Tue, 18 Mar 2014 02:51:16 +0100 Original-Received: from 50.56.99.223 ([50.56.99.223]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Mar 2014 02:51:16 +0100 Original-Received: from eric by 50.56.99.223 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Mar 2014 02:51:16 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 113 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 50.56.99.223 User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:LNtyBI/bngtQZnDFNkptVuMx5uo= X-Spam-Score: -0.7 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84371 Archived-At: --=-=-= Content-Type: text/plain Eric Abrahamsen writes: > Lars Ingebrigtsen writes: > >> Lars Ingebrigtsen writes: >> >>> Uhm, yeah. I'm getting the same when I try to respool. I'll get >>> fixin'... >> >> Fixed now in bzr Emacs and soon in Ma Gnus. > > Okay, I've tried this out, and it's not quite there, but nearly! > > The problem is in nnimap-request-accept-article. First of all, > apparently nothing in my setup is loading nnml.el, so nnml-active-number > is undefined. Either a require or an autoload, or something... > > Second, when nnmail-article-group is called, it is accessing a value of > nnmail-split-methods that hasn't been let to the nnimap equivalents. So > in a bunch of places there's this: > > (let ((nnmail-split-methods > (cond > ((eq nnimap-split-methods 'default) > nnmail-split-methods) > (nnimap-split-methods > nnimap-split-methods) > (nnimap-split-fancy > 'nnmail-split-fancy))) > (nnmail-split-fancy (or nnimap-split-fancy > nnmail-split-fancy))) > (do-thing) > > > And that's needed here as well. With those changes in place, all seems > well. > > Thanks, > Eric Anyhoo, here's a patch for the above. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-Allow-nnimap-respooling-requests-to-function-correct.patch >From 62b55b56bed9e542e6f024f5307de196adf52d87 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Tue, 18 Mar 2014 09:50:53 +0800 Subject: [PATCH 2/2] Allow nnimap respooling requests to function correctly. --- lisp/nnimap.el | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 4e07495..1b7a623 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -48,6 +48,7 @@ (autoload 'auth-source-forget+ "auth-source") (autoload 'auth-source-search "auth-source") +(autoload 'nnml-active-number "nnml") (nnoo-declare nnimap) @@ -1118,11 +1119,21 @@ If LIMIT, first try to limit the search to the N last articles." (unless group ;; We're respooling. Find out where mail splitting would place ;; this article. - (setq group - (caar - (nnmail-article-group - `(lambda (group) - (nnml-active-number group ,server)))))) + (let ((nnmail-split-methods + (cond + ((eq nnimap-split-methods 'default) + nnmail-split-methods) + (nnimap-split-methods + nnimap-split-methods) + (nnimap-split-fancy + 'nnmail-split-fancy))) + (nnmail-split-fancy (or nnimap-split-fancy + nnmail-split-fancy))) + (setq group + (caar + (nnmail-article-group + `(lambda (group) + (nnml-active-number group ,server))))))) (setq group (nnimap-decode-gnus-group group)) (when (nnimap-change-group nil server) (nnmail-check-syntax) @@ -1157,7 +1168,7 @@ If LIMIT, first try to limit the search to the N last articles." (or (nnimap-find-uid-response "APPENDUID" (car result)) (nnimap-find-article-by-message-id group server message-id - nnimap-request-articles-find-limit)))))))))) + nnimap-request-articles-find-limit)))))))))) (defun nnimap-process-quirk (greeting-match type data) (when (and (nnimap-greeting nnimap-object) -- 1.9.0 --=-=-=--