recursive maildir support #168

Closed
wants to merge 3 commits into
from

Projects

None yet

2 participants

@nicolasavru

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.

@djcb
Owner

Looks good!

I'd like to merge your patch in the dev branch; can you create a pull request against that one? Sadly, github doesn't allow me to change the target-branch :(

@nicolasavru

Re-submitted as #178. Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment