Pimp my Mutt

Uh, yeah, I did it :)
I patched my mutt-patched :)

You may ask why I did it, and what I did, so here we go:
I use mutt(-patched) on my Etch box to read and write mail when I'm not in front of my regular box, where I use sylpheed.
My mail is stored on an IMAP server (courier, actually it's the same box you retrieve this website from), so I use mutt's imap support (don't tell me about offlineimap and stuff, I know them).
Having multiple folders on the IMAP server, you really want to use the sidebar patch for mutt, or you'll get crazy.

But here start my problems. The sidebar patch does not understand, that IMAP often uses a dot (.) instead of a slash (/) as a delimiter between the folders.
Thus the sidebar will look like this:

INBOX
INBOX.Sent
INBOX.Drafts
INBOX.foo
INBOX.bar
INBOX.bar.baz
INBOX.bar.baz.archive
...


Looks quite bad, especially when you have deep hierarchies. So I wrote the first patch, sidebar-dotted, which makes the sidebar look like this:
INBOX
Sent
Drafts
foo
bar
baz
archive


Better, huh? Oh, if you want to see this, you'll need to set sidebar_shortpath ;)

But this is still not as good as I want it, because I get something like this:
foo
baz
archive
bar
INBOX
Drafts
Sent


Wonder why? I have imap_check_subscribed enabled, so I don't have to list all the folders via mailboxes, but the server returns the subscribed folders unsorted and you see the result :(

Here I came up with the second patch, sidebar-sorted, enable it with set sidebar-sort and you get a nice folder listing as you (I) wanted.

You want the patches? Get them in the original version or better, the updated by the Debian community one.
Have fun with them, and forgive me, if mutt's fleas will eat up your mail :)

Comments

Corsac wrote on 2008-11-07 14:49:

And isn’t there a way to get all imap folders (and not just only those subscribed?)

That’d be really greater than using subscribed :/

Evgeni wrote on 2008-11-07 20:09:

Well, you get all in the folder browser if you don’t set imap_list_subscribed, but there is no way to show them all in the sidebar. That’s what actually subscribe is for, you see what you want to see :)

Send your comments to evgeni+blogcomments@golov.de and I will publish them here (if you want).