From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: furthermore! (nnimap splitting con't)
Date: Tue, 18 Mar 2014 09:53:37 +0800 [thread overview]
Message-ID: <87ob14p90e.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <877g82vei6.fsf@ericabrahamsen.net>
[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Lars Ingebrigtsen <larsi@gnus.org> 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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-Allow-nnimap-respooling-requests-to-function-correct.patch --]
[-- Type: text/x-diff, Size: 1960 bytes --]
From 62b55b56bed9e542e6f024f5307de196adf52d87 Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <eric@ericabrahamsen.net>
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
next prev parent reply other threads:[~2014-03-18 1:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 5:00 Eric Abrahamsen
2014-03-06 9:12 ` Steinar Bang
2014-03-06 11:07 ` Eric Abrahamsen
2014-03-06 11:11 ` Rainer M Krug
2014-03-07 17:07 ` Lars Ingebrigtsen
2014-03-07 17:22 ` Lars Ingebrigtsen
2014-03-08 5:03 ` Eric Abrahamsen
2014-03-10 4:55 ` Eric Abrahamsen
2014-03-18 1:53 ` Eric Abrahamsen [this message]
2014-03-10 7:06 ` Eric Abrahamsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ob14p90e.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).