Gnus development mailing list
 help / color / mirror / Atom feed
* Ma Gnus v0.4 nnimap client side split multiple mailboxes
@ 2012-03-05 19:32 Sergio Martínez
  2012-03-10  0:29 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Sergio Martínez @ 2012-03-05 19:32 UTC (permalink / raw)
  To: ding

First, Hello to everyone!

OK, my problem is:

I've installed Gnus from git and I want to do client-side IMAP splitting from multiple inboxes, but nnimap-inbox only support one inbox. 

In Gnus 5.13 I used nnimpa-split-inbox to specify the inboxes. 
For example if I put this in my .gnus file:

,----
| (setq nnimap-split-inbox '("INBOX" "[Gmail]/Sent"))
| (setq nnimap-split-predicate "UNDELETED")
| (setq nnimap-split-rule 
|         '(("INBOX.emacs-es"
|  	     "^\\(Sender:\\|From:\\|Subject:\\|To:\\)\\( *.*\\[Emacs-es\\].*\\| *.*emacs-es.*@es.gnu.org\\)")
|  	 )))
`----
I can have conversation view in INBOX.emacs-es because I use Gmail SMTP
and all messages that I sent go to (or are tagged with) [Gmail]/Sent 

How can I achieve this in Ma Gnus 0.4?

Thanks in advance.

-- Sergio



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Ma Gnus v0.4 nnimap client side split multiple mailboxes
  2012-03-05 19:32 Ma Gnus v0.4 nnimap client side split multiple mailboxes Sergio Martínez
@ 2012-03-10  0:29 ` Lars Magne Ingebrigtsen
  2012-03-14 19:55   ` Sergio Martínez
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-03-10  0:29 UTC (permalink / raw)
  To: Sergio Martínez; +Cc: ding

Sergio Martínez <samf0xb58@gmail.com> writes:

> In Gnus 5.13 I used nnimpa-split-inbox to specify the inboxes. 
> For example if I put this in my .gnus file:
>
> ,----
> | (setq nnimap-split-inbox '("INBOX" "[Gmail]/Sent"))
> | (setq nnimap-split-predicate "UNDELETED")
> | (setq nnimap-split-rule 
> |         '(("INBOX.emacs-es"
> |  	     "^\\(Sender:\\|From:\\|Subject:\\|To:\\)\\( *.*\\[Emacs-es\\].*\\| *.*emacs-es.*@es.gnu.org\\)")
> |  	 )))
> `----
> I can have conversation view in INBOX.emacs-es because I use Gmail SMTP
> and all messages that I sent go to (or are tagged with) [Gmail]/Sent 
>
> How can I achieve this in Ma Gnus 0.4?

I don't think this is supported in Gnus any more.  Or is it just hidden
away some place where I can't find it?  Anybody?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Ma Gnus v0.4 nnimap client side split multiple mailboxes
  2012-03-10  0:29 ` Lars Magne Ingebrigtsen
@ 2012-03-14 19:55   ` Sergio Martínez
  2012-03-14 20:06     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Sergio Martínez @ 2012-03-14 19:55 UTC (permalink / raw)
  To: ding

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Sergio Martínez <samf0xb58@gmail.com> writes:
>
>> In Gnus 5.13 I used nnimpa-split-inbox to specify the inboxes. 
>> For example if I put this in my .gnus file:
>>
>> ,----
>> | (setq nnimap-split-inbox '("INBOX" "[Gmail]/Sent"))
>> | (setq nnimap-split-predicate "UNDELETED")
>> | (setq nnimap-split-rule 
>> |         '(("INBOX.emacs-es"
>> |  	     "^\\(Sender:\\|From:\\|Subject:\\|To:\\)\\( *.*\\[Emacs-es\\].*\\| *.*emacs-es.*@es.gnu.org\\)")
>> |  	 )))
>> `----
>> I can have conversation view in INBOX.emacs-es because I use Gmail SMTP
>> and all messages that I sent go to (or are tagged with) [Gmail]/Sent 
>>
>> How can I achieve this in Ma Gnus 0.4?
>
> I don't think this is supported in Gnus any more.  Or is it just hidden
> away some place where I can't find it?  Anybody?

I understand, but, there's a way to achieve this behavior in Ma Gnus
0.4?, maybe a fancy split rule?.

I really, will appreciate some help, because i want to use the nnimap's
rewrite, it's faster. 





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Ma Gnus v0.4 nnimap client side split multiple mailboxes
  2012-03-14 19:55   ` Sergio Martínez
@ 2012-03-14 20:06     ` Lars Magne Ingebrigtsen
  2012-03-16  5:47       ` Sergio Martínez
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-03-14 20:06 UTC (permalink / raw)
  To: ding

Sergio Martínez <samf0xb58@gmail.com> writes:

> I understand, but, there's a way to achieve this behavior in Ma Gnus
> 0.4?, maybe a fancy split rule?.

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?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Ma Gnus v0.4 nnimap client side split multiple mailboxes
  2012-03-14 20:06     ` Lars Magne Ingebrigtsen
@ 2012-03-16  5:47       ` Sergio Martínez
  2012-03-22 20:30         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Sergio Martínez @ 2012-03-16  5:47 UTC (permalink / raw)
  To: ding

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)





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Ma Gnus v0.4 nnimap client side split multiple mailboxes
  2012-03-16  5:47       ` Sergio Martínez
@ 2012-03-22 20:30         ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-03-22 20:30 UTC (permalink / raw)
  To: ding

Sergio Martínez <samf0xb58@gmail.com> writes:

> I append the tricky patch. I expect corrections, suggestions or
> complains :-).

Thanks; applied to Ma Gnus.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-03-22 20:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-05 19:32 Ma Gnus v0.4 nnimap client side split multiple mailboxes 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
2012-03-22 20:30         ` Lars Magne Ingebrigtsen

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).