From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/81614 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Sergio_Mart=C3=ADnez?= Newsgroups: gmane.emacs.gnus.general Subject: Re: Ma Gnus v0.4 nnimap client side split multiple mailboxes Date: Thu, 15 Mar 2012 23:47:33 -0600 Message-ID: <871uotyu4q.fsf@tesla.pmx> References: <87vcmiyhbd.fsf@tesla.pmx> <87bonz6jpi.fsf@tesla.pmx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1331876939 5073 80.91.229.3 (16 Mar 2012 05:48:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 16 Mar 2012 05:48:59 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M29894@lists.math.uh.edu Fri Mar 16 06:48:58 2012 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 1S8Q25-0003ZV-T1 for ding-account@gmane.org; Fri, 16 Mar 2012 06:48:58 +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 1S8Q19-0006mP-NB; Fri, 16 Mar 2012 00:47:59 -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 1S8Q13-0006mE-Vt for ding@lists.math.uh.edu; Fri, 16 Mar 2012 00:47:54 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1S8Q0z-0003OB-Az for ding@lists.math.uh.edu; Fri, 16 Mar 2012 00:47:53 -0500 Original-Received: from mail-iy0-f172.google.com ([209.85.210.172]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1S8Q0x-0000OD-DY for ding@gnus.org; Fri, 16 Mar 2012 06:47:47 +0100 Original-Received: by iazz13 with SMTP id z13so6919141iaz.17 for ; Thu, 15 Mar 2012 22:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:mail-followup-to:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=vd1PyEQYStVUPEZY88YRfP4gxnZkqgIpU58r8Z1SUAk=; b=Qh8NVhuOHWCsry9WIPAkSjBHZft/2n7opu7kBTiVuLUEaTBzP11655vaogkH8Wkhgg Hbjs+RvKobEBQ8A8WzuGNN5CRBmIfGNRO0D2GPvzi/AhvD35T+q6XjAaqpaYow6yho8u xXI1zCU8WdWWAOR35IfxhSqewda21EuWHw4Rn/FtKc62mXkU5fiJEhg0Zq0ZlqW9I3Ua ufGhGJL69qI4hvQJhcObHuKiZLoYU+8c4tWgpAEVtqhG6iyINinR7czz4XRy6vZxp/87 LsrjGqOqLGDvTX34fMHz4HYUekb+vM8s/MintxAfMcmCdWKsq4v95TViLpOqhhZSThVr UNGw== Original-Received: by 10.50.85.228 with SMTP id k4mr1152981igz.67.1331876861052; Thu, 15 Mar 2012 22:47:41 -0700 (PDT) Original-Received: from tesla.pmx ([189.205.164.74]) by mx.google.com with ESMTPS id zv10sm3029239igb.13.2012.03.15.22.47.38 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Mar 2012 22:47:40 -0700 (PDT) Mail-Followup-To: ding@gnus.org In-Reply-To: (Lars Magne Ingebrigtsen's message of "Wed, 14 Mar 2012 21:06:41 +0100") User-Agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/23.2 (gnu/linux) X-Spam-Score: -2.7 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:81614 Archived-At: Lars Magne Ingebrigtsen 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)