djcb/mu — pull request #168 by nicolasavru (2013-03-17 13:38:50+00:00)
Title: recursive maildir support

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

I was able to get the latter recursive form to work with the attached patch, which
modifies mu4e~get-maildirs-1.