Subject: [sup-talk] sup doesn't like '[Gmail]' in maildir URI

From: [email-masked] (Kendall Grant Clark)
Date: Tue, 05 Aug 2008 18:57:57 -0400

Folks,

I just switched email to Gmail; so far, so good. I use offlineimap to grab
[Gmail] and INBOX; but when I add a maildir URI with sup-add that includes
the path component '[Gmail]', it bitches about illegal URI.

So I encoded the '[' and ']' characters -- would be nice if sup-add offered to
do that automagically -- but then sup-add bitches about ~/path/%5BGmail%5D/cur
not being a director, when of course it *is* a directory... Leads me to
believe there's still something wrong with the encoded [Gmail] bit, since
~/path/INBOX works fine.

Has anyone else seen and solved this problem? I'm using sup 0.6, which is
otherwise excellent.

Cheers,
Kendall Clark

---

From: [email-masked] (Jeff Balogh)
Date: Tue, 05 Aug 2008 19:17:12 -0400

> Has anyone else seen and solved this problem? I'm using sup 0.6, which is

For Gmail, you probably want to just grab the 'All Mail' folder.  All your mail
goes there (imagine that!), so tracking INBOX is unnecessary.  Especially since
sup will complain if you ever clear out the inbox.

To get around the URI problem, I use `nametrans` in ~/.offlineimaprc to clean up
the folder names:

nametrans = lambda s: s.replace('[','').replace(']','').replace(' ', '_')

In English, remove brackets and turn spaces into underscores.

Cheers,
jeff

---

From: [email-masked] (Kendall Clark)
Date: Wed, 6 Aug 2008 09:38:49 -0400

> In English, remove brackets and turn spaces into underscores.

Thanks, Jeff -- both suggestions worked nicely.

Cheers,
Kendall