Gnus development mailing list
 help / color / mirror / Atom feed
* issue of gnus daemon
@ 2010-12-03  8:23 Binjo
  2010-12-03 10:05 ` Julien Danjou
  0 siblings, 1 reply; 7+ messages in thread
From: Binjo @ 2010-12-03  8:23 UTC (permalink / raw)
  To: Gnus

hi,

i use gnus demon to retrieve mail, and my settings as follows:

#v+
    ;; idle 2 minutes, then check news every 3 minutes.
    (gnus-demon-add-handler 'binjo-gnus-group-get-new-news 3 2)
#v-

it turns out the recent changes do not obey what the info said.

M-: (info "(gnus) Daemons")

#v+
   If IDLE is a number and TIME is a number, the function will be
called every TIME minutes only when Emacs has been idle for IDLE
minutes.
#v-

wheras from the *imap log* buffer, i can confirm it runs
`gnus-demon-run-callback' exactly every 3 mins, no matter emacs is idle or
not. that's weird.

09:39:00 202 UID FETCH 1:* FLAGS
09:39:00 203 EXAMINE "Dropbox"
...
09:42:00 272 UID FETCH 1:* FLAGS
09:42:00 273 EXAMINE "Dropbox"
...
09:45:00 342 UID FETCH 1:* FLAGS
09:45:00 343 EXAMINE "Dropbox"
...

i'm not able to figure out where's the problem though :<

the following patch resolve issue when using such daemon handler anyway:
(gnus-demon-add-handler 'binjo-gnus-group-get-new-news nil 2)

diff --git a/lisp/gnus-demon.el b/lisp/gnus-demon.el
index 94a4952..c146b4f 100644
--- a/lisp/gnus-demon.el
+++ b/lisp/gnus-demon.el
@@ -121,7 +121,8 @@ Emacs has been idle for IDLE `gnus-demon-timestep's."
            ;; If t, replace by 1
            (time (cond ((eq time t)
                         gnus-demon-timestep)
-                       ((null time))
+                       ((null time)
+                        nil)
                        (t (* time gnus-demon-timestep))))
            (timer
             (cond

regards,

-- 
Life is like a prison, can you break it?



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

end of thread, other threads:[~2010-12-07  5:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-03  8:23 issue of gnus daemon Binjo
2010-12-03 10:05 ` Julien Danjou
2010-12-03 12:20   ` Binjo
2010-12-03 14:27     ` Julien Danjou
2010-12-04  5:46       ` Binjo
2010-12-06 11:03         ` Julien Danjou
2010-12-07  5:51           ` Binjo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).