Gnus development mailing list
 help / color / mirror / Atom feed
From: Tassilo Horn <tassilo@member.fsf.org>
To: Noorul Islam K M <noorul@noorul.com>
Cc: ding@gnus.org
Subject: Re: gnus-demon question
Date: Wed, 22 Dec 2010 08:49:27 +0100	[thread overview]
Message-ID: <874oa61c3c.fsf@member.fsf.org> (raw)
In-Reply-To: <87sjxqe23b.fsf@noorul.maa.corp.collab.net> (Noorul Islam K. M.'s message of "Wed, 22 Dec 2010 12:17:04 +0530")

Noorul Islam K M <noorul@noorul.com> writes:

> I have the following settings.
>
> (gnus-demon-add-handler 'gnus-group-get-new-news 15 t)
> (gnus-demon-init)

The `gnus-demon-init' is not needed.  `gnus-demon-add-handler' calls it
already.  Your code 1) adds a new handler, 2) kills all old handlers and
initializes them anew (gnus-demon-init), and then does 2) again.

> But still it looks like, emacs is not checking mails every 15 minutes
> and also the *Group* buffer is not getting updated.

Looking at the docs

,----[ (info "(gnus)Daemons") ]
|    If IDLE is `t', then the function will be called after TIME minutes
| only if Emacs is idle.  So if Emacs is never idle, the function will
| never be called.  But once Emacs goes idle, the function will be called
| every TIME minutes.
`----

Hm, reading that statement, I'd say that your code would check every 15
minutes if emacs is idle, and if so, call `gnus-group-get-new-news'.

But looking at the code

  (gnus-demon-add-handler 'gnus-group-get-new-news 15 t)

is equivalent to

  (gnus-demon-add-handler 'gnus-group-get-new-news 15 15)

,----[ (info "(gnus)Daemons") ]
|    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.
`----

So your code will call `gnus-group-get-new-news' every 15 minutes after
emacs has been idle for at least 15 minutes.  That's pretty seldomly, I
guess...

So what's wrong?  Code, documentation, or my understanding of the code?

Bye,
Tassilo
-- 
Sent from my Emacs



  reply	other threads:[~2010-12-22  7:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22  6:47 Noorul Islam K M
2010-12-22  7:49 ` Tassilo Horn [this message]
2010-12-22  8:49   ` Noorul Islam K M
2011-01-03 11:58 ` Noorul Islam K M
2011-01-04  0:02 ` Lars Magne Ingebrigtsen
2011-01-04  5:58   ` Noorul Islam K M
2011-01-04 11:34     ` Adam Sjøgren
2011-01-04 12:06       ` Noorul Islam K M
2011-01-04 12:56         ` Adam Sjøgren
2011-01-04 13:13           ` Robert Pluim
2011-01-04 14:22             ` Adam Sjøgren
2011-01-04 14:47               ` Adam Sjøgren
2011-01-04 16:56               ` Tassilo Horn
2011-01-04 18:02                 ` Adam Sjøgren
2011-01-06 17:12                   ` Philipp Haselwarter
2011-01-09 14:28                     ` Noorul Islam
2011-01-04  7:54   ` Tassilo Horn

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=874oa61c3c.fsf@member.fsf.org \
    --to=tassilo@member.fsf.org \
    --cc=ding@gnus.org \
    --cc=noorul@noorul.com \
    /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).