From 08f0aef5376ea79e44de232503c5a3159fc2350d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sergio=20Mart=C3=ADnez?= Date: Thu, 22 Mar 2012 21:28:31 +0100 Subject: [PATCH] Allow several IMAP inboxes * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of inboxes. --- lisp/ChangeLog | 5 +++++ lisp/nnimap.el | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e8eb8261e..7fdc86c00 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-03-22 Sergio Martínez (tiny change) + + * nnimap.el (nnimap-request-scan): Allow `nnimap-inbox' to be a list of + inboxes. + 2012-03-22 Lars Magne Ingebrigtsen * nnimap.el (nnimap-fetch-partial-articles): Minor doc string fixup. diff --git a/lisp/nnimap.el b/lisp/nnimap.el index f326f134e..e94a98e9a 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) -- 2.25.1