Gnus development mailing list
 help / color / mirror / Atom feed
* Run J s with a daemon/handler
@ 2003-05-13 23:23 Harry Putnam
  2003-05-14  0:27 ` Nevin Kapur
  0 siblings, 1 reply; 3+ messages in thread
From: Harry Putnam @ 2003-05-13 23:23 UTC (permalink / raw)


Someone recently posted a nifty daemon/handler 

  (setq gnus-use-demon t)
  (setq gnus-demon-timestep 1)
  (gnus-demon-add-handler 'gnus-demon-scan-news 120 60)

How can I add to this to cause gnus to run and agent fetch 
(J s) after the scan in the above handler?




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

* Re: Run J s with a daemon/handler
  2003-05-13 23:23 Run J s with a daemon/handler Harry Putnam
@ 2003-05-14  0:27 ` Nevin Kapur
  2003-05-14  5:59   ` Harry Putnam
  0 siblings, 1 reply; 3+ messages in thread
From: Nevin Kapur @ 2003-05-14  0:27 UTC (permalink / raw)


Harry Putnam <hgp@sbcglobal.net> writes:

> How can I add to this to cause gnus to run and agent fetch 
> (J s) after the scan in the above handler?

I've used the following in the past: this will get new news and fetch
it after that.

(defun nk-gnus-demon-agent-fetch ()
  (let ((win (current-window-configuration)))
    (unwind-protect
	(save-window-excursion
	  (save-excursion
	    (when (gnus-alive-p)
	      (save-excursion
		(set-buffer gnus-group-buffer)
		(gnus-group-get-new-news)
		(message "Fetching session.")
		(gnus-agent-fetch-session)))))
      (set-window-configuration win)
      (gnus-group-save-newsrc))))

(gnus-demon-add-handler 'nk-gnus-demon-agent-fetch 30 3)
             
-N




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

* Re: Run J s with a daemon/handler
  2003-05-14  0:27 ` Nevin Kapur
@ 2003-05-14  5:59   ` Harry Putnam
  0 siblings, 0 replies; 3+ messages in thread
From: Harry Putnam @ 2003-05-14  5:59 UTC (permalink / raw)


Nevin Kapur <kapur@mts.jhu.edu> writes:

> I've used the following in the past: this will get new news and fetch
> it after that.

[...] code snipped
Very nice ... thank you.




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

end of thread, other threads:[~2003-05-14  5:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-13 23:23 Run J s with a daemon/handler Harry Putnam
2003-05-14  0:27 ` Nevin Kapur
2003-05-14  5:59   ` Harry Putnam

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