Subject: [sup-talk] Some initial problems with sup

From: [email-masked] (Giorgio Lando)
Date: Fri, 4 Jan 2008 23:54:48 +0100

Hi, I am a new user of sup and I like it a lot. I plan to switch
gradually from mutt.

I have a first problem with gmail imap folders for Drafts and Sent Mail
(the inbox works fine):
their relative path is [Gmail]/Drafts and [Gmail]/Sent Mail. Thus they
include a space and square brackets. If I try to use them in
sources.yaml, but I get:

/usr/lib/ruby/1.8/uri/common.rb:436:in `split': bad URI(is not URI?): imaps://imap.gmail.com/[Gmail]/Drafts (URI::InvalidURIError)
        from /usr/lib/ruby/1.8/uri/common.rb:485:in `parse'
        from /usr/lib/ruby/1.8/uri/common.rb:608:in `URI'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.3/lib/sup/imap.rb:62:in `initialize'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.3/lib/sup.rb:29:in `new'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.3/lib/sup.rb:29:in `yaml_properties'
        from /usr/lib/ruby/1.8/yaml.rb:133:in `call'
        from /usr/lib/ruby/1.8/yaml.rb:133:in `transfer'
        from /usr/lib/ruby/1.8/yaml.rb:133:in `node_import'
         ... 7 levels...
        from /usr/lib/ruby/gems/1.8/gems/sup-0.3/lib/sup/index.rb:108:in `load'
        from /usr/lib/ruby/gems/1.8/gems/sup-0.3/bin/sup-sync:111
        from /usr/bin/sup-sync:16:in `load'
        from /usr/bin/sup-sync:16

I tried to escape them with \:

uri: imaps://imap.gmail.com/\[Gmail\]/Drafts

But I get exactly the same error message. Is there a proper way to
escape the characters?
Giorgio Lando

---

From: [email-masked] (William Morgan)
Date: Fri, 04 Jan 2008 16:09:55 -0800

> Hi, I am a new user of sup and I like it a lot. I plan to switch

Yay!

> /usr/lib/ruby/1.8/uri/common.rb:436:in `split': bad URI(is not URI?):

Bah. I thought I was going to be so cool by treating everything as a
URI, but it's caused nothing but hassle.

You need to URL-encode them. Something like this:

  $ irb -rcgi
  >> CGI::escape "[Drafts]"
  => "%5BDrafts%5D"

HTH,

-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Giorgio Lando)
Date: Sat, 5 Jan 2008 01:57:26 +0100

>   => "%5BDrafts%5D"
 
Thanks, this works (actually it doesn't work, but this depends from
gmail: it seems that these names of folders are not right / do not exist in my account;
nothing related to sup)
Giorgio