From: "Sergio Martínez" <samf0xb58@gmail.com>
To: ding@gnus.org
Subject: Re: Ma Gnus v0.4 nnimap client side split multiple mailboxes
Date: Thu, 15 Mar 2012 23:47:33 -0600 [thread overview]
Message-ID: <871uotyu4q.fsf@tesla.pmx> (raw)
In-Reply-To: <m3pqcfc5gu.fsf@stories.gnus.org> (Lars Magne Ingebrigtsen's message of "Wed, 14 Mar 2012 21:06:41 +0100")
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
>
> No, the new nnimap only supports splitting from a single mail box. But
> adding support for more than one should be simple enough, I think? Just
> allowing `nnimap-inbox' to be a list and then looping over the list
> should do the trick, I think?
I've did the trick, well I expect.
I just learn some elisp, therefore I don't know if this breaks
something, at least it works for me.
I append the tricky patch. I expect corrections, suggestions or
complains :-).
diff --git a/lisp/nnimap.el b/lisp/nnimap.el
index 33c6cd3..b8b6214 100644
--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -82,7 +82,8 @@ back on `network'.")
(defvoo nnimap-inbox nil
"The mail box where incoming mail arrives and should be split out of.
-For example, \"INBOX\".")
+This can be a string or a list of strings
+For example, \"INBOX\" or (\"INBOX\" \"SENT\").")
(defvoo nnimap-split-methods nil
"How mail is split.
@@ -1007,7 +1008,10 @@ textual parts.")
nnimap-inbox
nnimap-split-methods)
(nnheader-message 7 "nnimap %s splitting mail..." server)
- (nnimap-split-incoming-mail)
+ (if (listp nnimap-inbox)
+ (dolist (nnimap-inbox nnimap-inbox)
+ (nnimap-split-incoming-mail))
+ (nnimap-split-incoming-mail))
(nnheader-message 7 "nnimap %s splitting mail...done" server)))
(defun nnimap-marks-to-flags (marks)
next prev parent reply other threads:[~2012-03-16 5:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-05 19:32 Sergio Martínez
2012-03-10 0:29 ` Lars Magne Ingebrigtsen
2012-03-14 19:55 ` Sergio Martínez
2012-03-14 20:06 ` Lars Magne Ingebrigtsen
2012-03-16 5:47 ` Sergio Martínez [this message]
2012-03-22 20:30 ` Lars Magne Ingebrigtsen
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=871uotyu4q.fsf@tesla.pmx \
--to=samf0xb58@gmail.com \
--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).