Article View: gnu.emacs.help
Article #2082Re: Looking for biff inside emacs
From: Piet van Oostrum
Date: Wed, 06 Jan 1993 14:15
Date: Wed, 06 Jan 1993 14:15
29 lines
1744 bytes
1744 bytes
(display-time) does this (it displays "Mail" in the mode line). I have a
.emacs code that optionally beeps and/or pops into the mail reader (VM)
when that happens:
(let ((process-connection-type nil)) ; try not to hog a pty for this.
(display-time))
(defvar pop-mail nil "*If t display new mail in a pop up mail buffer.")
(defvar pop-mail-ding t "*If non-nil ding bell, when new mail pops up.")
(defun ding-display-time-filter (proc string)
(display-time-filter proc string)
(if (string= "Mail" (substring display-time-string -4))
(progn
(if pop-mail-ding (ding))
(if pop-mail
(save-excursion
(let ((buf (get-file-buffer vm-primary-inbox)))
(if (or (and buf (get-buffer-window buf))
(string-match " \\*Minibuf-[0-9]+\\*" (buffer-name)))
nil
(vm)
(find-file-other-window vm-primary-inbox))))))))
(set-process-filter display-time-process 'ding-display-time-filter)
--
Piet* van Oostrum, Dept of Computer Science, Utrecht University,
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
Telephone: +31 30 531806 Uucp: uunet!mcsun!ruuinf!piet
Telefax: +31 30 513791 Internet: piet@cs.ruu.nl (*`Pete')
Technical Details
Message-ID:
<1993Jan6.141518.22572@cs.ruu.nl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!ruuinf!pietReferences:
<WOLF.93Jan3191009@doppel.first.gmd.de>Show Full Headers
Complete Article Headers
Newsgroups: gnu.emacs.help Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!ruuinf!piet From: piet@cs.ruu.nl (Piet van Oostrum) Subject: Re: Looking for biff inside emacs Sender: network-news@cs.ruu.nl Message-ID: <1993Jan6.141518.22572@cs.ruu.nl> In-Reply-To: wolf@doppel.first.gmd.de (Wolfgang Koehler) Date: Wed, 6 Jan 1993 14:15:18 GMT Distribution: gnu Reply-To: piet@cs.ruu.nl (Piet van Oostrum) References: <WOLF.93Jan3191009@doppel.first.gmd.de> Organization: Dept of Computer Science, Utrecht University, The Netherlands Lines: 29