From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/60245 Path: news.gmane.org!not-for-mail From: Kevin Greiner Newsgroups: gmane.emacs.gnus.general Subject: Re: Some examples of agent fetching unattended Date: Sun, 01 May 2005 12:18:35 -0500 Message-ID: References: <87zmvmlnby.fsf@newsguy.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1114967872 22579 80.91.229.2 (1 May 2005 17:17:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 May 2005 17:17:52 +0000 (UTC) Original-X-From: ding-owner+M8773@lists.math.uh.edu Sun May 01 19:17:46 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DSI4D-0007NB-3W for ding-account@gmane.org; Sun, 01 May 2005 19:17:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1DSI5e-00058S-00; Sun, 01 May 2005 12:18:46 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1DSI5a-00058N-00 for ding@lists.math.uh.edu; Sun, 01 May 2005 12:18:42 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1DSI5V-0004kY-Au for ding@lists.math.uh.edu; Sun, 01 May 2005 12:18:37 -0500 Original-Received: from news by quimby.gnus.org with local (Exim 3.35 #1 (Debian)) id 1DSI5U-0004Qq-00 for ; Sun, 01 May 2005 19:18:36 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 28 Original-NNTP-Posting-Host: dialup-216-12-206-89.ev1.net Original-X-Trace: quimby.gnus.org 1114967916 17039 216.12.206.89 (1 May 2005 17:18:36 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Sun, 1 May 2005 17:18:36 +0000 (UTC) User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (windows-nt) Cancel-Lock: sha1:/Lk8nAMpuiMgCnS6sXOpNqm4IE8= X-Spam-Score: -4.9 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60245 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:60245 Harry Putnam 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)