Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] Before poll hook
@ 2010-02-09 23:51 Mariano Mara
  2010-02-10 13:01 ` Daniel Schoepe
  0 siblings, 1 reply; 3+ messages in thread
From: Mariano Mara @ 2010-02-09 23:51 UTC (permalink / raw)
  To: sup-talk

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

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
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [sup-talk] Before poll hook
  2010-02-09 23:51 [sup-talk] Before poll hook Mariano Mara
@ 2010-02-10 13:01 ` Daniel Schoepe
  2010-02-10 14:05   ` Mariano Mara
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Schoepe @ 2010-02-10 13:01 UTC (permalink / raw)
  To: sup-talk


[-- Attachment #1.1: Type: text/plain, Size: 561 bytes --]

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

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 140 bytes --]

_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [sup-talk] Before poll hook
  2010-02-10 13:01 ` Daniel Schoepe
@ 2010-02-10 14:05   ` Mariano Mara
  0 siblings, 0 replies; 3+ messages in thread
From: Mariano Mara @ 2010-02-10 14:05 UTC (permalink / raw)
  To: sup-talk

Excerpts from Daniel Schoepe's message of Wed Feb 10 10:01:40 -0300 2010:
> 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

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
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-10 14:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-09 23:51 [sup-talk] Before poll hook Mariano Mara
2010-02-10 13:01 ` Daniel Schoepe
2010-02-10 14:05   ` Mariano Mara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox