Gnus development mailing list
 help / color / mirror / Atom feed
* Some examples of agent fetching unattended
@ 2005-04-25 18:32 Harry Putnam
  2005-05-01 17:18 ` Kevin Greiner
  0 siblings, 1 reply; 2+ messages in thread
From: Harry Putnam @ 2005-04-25 18:32 UTC (permalink / raw)


I've sort of lost track of how to do an agent fetch combined into
somekind of handler.  Like when mail/news is scanned and downloaded,
then to invoke a full agent fetch.

Anyone have example code I can hack up?

I've been using code someone (now lost to memory) posted here and I'd
like to incorporate an agent fetch into it.

(defun gnus-demon-scan-mail ()
  (when (and (gnus-alive-p) mail-here)
    (save-excursion
      (set-buffer gnus-group-buffer)
      (gnus-group-get-new-news 3))))

(defun gnus-demon-scan-news ()
  (when (gnus-alive-p)
    (save-excursion
      (set-buffer gnus-group-buffer)
      (gnus-group-get-new-news))))

(gnus-demon-add-handler 'gnus-demon-scan-mail 10 10)
(gnus-demon-add-handler 'gnus-demon-scan-news 13 10)







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

* Re: Some examples of agent fetching unattended
  2005-04-25 18:32 Some examples of agent fetching unattended Harry Putnam
@ 2005-05-01 17:18 ` Kevin Greiner
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Greiner @ 2005-05-01 17:18 UTC (permalink / raw)


Harry Putnam <reader@newsguy.com> writes:

> I've sort of lost track of how to do an agent fetch combined into
> somekind of handler.  Like when mail/news is scanned and downloaded,
> then to invoke a full agent fetch.
>
> Anyone have example code I can hack up?
>
> I've been using code someone (now lost to memory) posted here and I'd
> like to incorporate an agent fetch into it.
>
> (defun gnus-demon-scan-mail ()
>   (when (and (gnus-alive-p) mail-here)
>     (save-excursion
>       (set-buffer gnus-group-buffer)
>       (gnus-group-get-new-news 3)

        (gnus-agent-fetch-session)))) ;; This would fetch all of the
        ;; new headers into the agent and selected articles
>
> (defun gnus-demon-scan-news ()
>   (when (gnus-alive-p)
>     (save-excursion
>       (set-buffer gnus-group-buffer)
>       (gnus-group-get-new-news))))
>
> (gnus-demon-add-handler 'gnus-demon-scan-mail 10 10)
> (gnus-demon-add-handler 'gnus-demon-scan-news 13 10)



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

end of thread, other threads:[~2005-05-01 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-25 18:32 Some examples of agent fetching unattended Harry Putnam
2005-05-01 17:18 ` Kevin Greiner

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).