Gnus development mailing list
 help / color / mirror / Atom feed
From: David Benjamin <dbjag@aolnorth.com>
Subject: Re: automatic mail checking & notify
Date: 16 Oct 1996 14:43:27 -0400	[thread overview]
Message-ID: <uvicau4vk.fsf@aolnorth.com> (raw)


Thanks very much for the pointers to display-time.el, Picons, and Xfaces.
The display-time.el code was very educational, however the Picons and Xfaces
stuff isn't of use to since I'm running on WIN32, and mail works different.

Perhaps I could bother everyone for a second question.  I've a small piece
of code below which will check every X seconds for articles of subscribedness
level Y, this is perfect for what I want.  I can make all important
stop-what-your-doing-and-read-me mail groups at level 1 or so and limit
interruptions for mail directly to me and, of course, any and all
postings to alt.hygiene.male.

However, I'm stuck as to how to detect whether any new mail has actually
been recieved for the groups fetched.  Is there a way to detect new mail
for a level of subscription or, failing that, for a specific group?

Again, thanks very much for your help.  Gnus is good.

Dave Benjamin
dbjag@aolnorth.com

--

(defvar check-gnus-timer nil)

(defvar check-gnus-interval 300
  "* Seconds between gnus-checks.")

(defvar check-gnus-level 1
  "* Gnus level to check.")

(defun check-gnus ()  
  ""
  (interactive)
  (and check-gnus-timer (cancel-timer check-gnus-timer))
  (setq check-gnus-timer
	(run-at-time nil check-gnus-interval 'check-gnus-event-handler)))

(defun check-gnus-event-handler ()
  (message (concat (current-time-string) "- check-gnus - checking mail..."))

  ; hmm. perhaps I should save current state here for comparison after check?

  (gnus-group-get-new-news check-gnus-level)

  ; insert here:
  ; clever piece of code that will detect if new mail has been
  ; received, and play an amusing sound, like this...

  (call-process "playsnd" nil t nil "s:\\buzzly.wav")
)

---


             reply	other threads:[~1996-10-16 18:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-16 18:43 David Benjamin [this message]
1996-10-17 19:30 ` Lars Magne Ingebrigtsen
  -- strict thread matches above, loose matches on Subject: below --
1996-10-04 15:25 David Benjamin
1996-10-13 15:29 ` Brian Edmonds
1996-10-13 16:43   ` Mark Boyns

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=uvicau4vk.fsf@aolnorth.com \
    --to=dbjag@aolnorth.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).