Subject: Re: [sup-talk] Before poll hook

From: Daniel Schoepe <[email-masked]>
Date: Wed, 10 Feb 2010 14:01:40 +0100

Excerpts from Mariano Mara's message of Wed Feb 10 00:51:29 +0100 2010:
> Hi everyone,
> [..]
> I saved it where it should be and -just in case- gave it execution rights for my user. 
> However I can't say it's running. I don't see any messages in sup's status bar and everytime
> I hit Shift+p nothing happens. Needless to say, I have to manually run offlineimap to get the messages.
> What am I missing?
> 
> TIA,
> Mariano

Hello,

is there something in the log buffer(press ';' to get a list of
buffers) that indicates what is going wrong?

Regards,
Daniel
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Mariano Mara <[email-masked]>
Date: Wed, 10 Feb 2010 11:05:55 -0300

> buffers) that indicates what is going wrong?

Hi Daniel, thanks for your answer. Turns out it's working now: a few
hours idle did the trick it seems, although it beats me why it's working
now (or why it didn't yesterday). 

As soon as bug 47 is fixed I will be in heaven.

Thanks again and sorry for posting problems that fix themselves :)
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Mariano Mara <[email-masked]>
Date: Tue, 09 Feb 2010 20:51:29 -0300

Hi everyone,
so sorry for this n00b question but my ruby-fu is really bad: I want to
run offlineimap as a hook before each poll. I checked the code in the
wiki and some code I found in a thread and built my own -very simple- version of it:

$ tail -n 15 ~/.sup/hooks/before-poll.rb 
# http://sup.rubyforge.org/wiki/wiki.pl?Hooks
def offlineimap()
  cmd = "offlineimap -o -l ~/.offlineimap.log"
  `#{cmd} 2>&1`
end

say "Checking if we can run offlineimap..."
if (@last_fetch || Time.at(0)) < Time.now - 120
  say "Running offlineimap..."
  log offlineimap()
  say "Finished offlineimap."
end
@last_fetch = Time.now

TIA,
Mariano