djcb/mu — pull request #178 by nicolasavru (2013-03-31 14:06:53+00:00)
Title: Recursive maildirs

Re-submitting this pull request to the dev branch instead of the master branch. Including the original description for completeness.

Currently, mu4s supports recursive maildirs of the form:
Maildir
|-- A
| |-- B
| | |-- cur
| | |-- new
| | |-- tmp

but not of the form:
Maildir
|-- A
| |-- cur
| |-- new
| |-- tmp
| |-- B
| | |-- cur
| | |-- new
| | |-- tmp

The latter form (somewhat similar to a Maildir++ (according to wiki) form)
is what occurs when Gmail nested labels are used with something like the
following (incomplete) offlineimaprc (note the sep = /):
[Repository gmail-local]
type = Maildir
localfolders = ~/Maildir
sep = /
nametrans = lambda folder: re.sub('Spam', '[Gmail]/Spam',
re.sub('Drafts', '[Gmail]/Drafts',
re.sub('Sent', '[Gmail]/Sent Mail',
re.sub('Starred', '[Gmail]/Starred',
re.sub('Trash', '[Gmail]/Trash',
re.sub('Important', '[Gmail]/Important',
re.sub('Archive', '[Gmail]/All Mail',
folder)))))))