Gnus development mailing list
 help / color / mirror / Atom feed
From: Binjo <binjo.cn@gmail.com>
To: Gnus <ding@gnus.org>
Subject: issue of gnus daemon
Date: Fri, 03 Dec 2010 16:23:22 +0800	[thread overview]
Message-ID: <sgk4jrjmdh.fsf@gmail.com> (raw)

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?



             reply	other threads:[~2010-12-03  8:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-03  8:23 Binjo [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sgk4jrjmdh.fsf@gmail.com \
    --to=binjo.cn@gmail.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).