home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / emacs / help / 5267 < prev    next >
Encoding:
Text File  |  1993-01-06  |  1.7 KB  |  44 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!mcsun!sun4nl!ruuinf!piet
  3. From: piet@cs.ruu.nl (Piet van Oostrum)
  4. Subject: Re: Looking for biff inside emacs
  5. Sender: network-news@cs.ruu.nl
  6. Message-ID: <1993Jan6.141518.22572@cs.ruu.nl>
  7. In-Reply-To: wolf@doppel.first.gmd.de (Wolfgang Koehler)
  8. Date: Wed, 6 Jan 1993 14:15:18 GMT
  9. Distribution: gnu
  10. Reply-To: piet@cs.ruu.nl (Piet van Oostrum)
  11. References: <WOLF.93Jan3191009@doppel.first.gmd.de>
  12. Organization: Dept of Computer Science, Utrecht University, The Netherlands
  13. Lines: 29
  14.  
  15. (display-time) does this (it displays "Mail" in the mode line). I have a
  16. .emacs code that optionally beeps and/or pops into the mail reader (VM)
  17. when that happens:
  18.  
  19.  
  20. (let ((process-connection-type nil))    ; try not to hog a pty for this.
  21.   (display-time))
  22. (defvar pop-mail nil "*If t display new mail in a pop up mail buffer.")
  23. (defvar pop-mail-ding t "*If non-nil ding bell, when new mail pops up.")
  24.  
  25. (defun ding-display-time-filter (proc string)
  26.   (display-time-filter proc string)
  27.     (if (string= "Mail" (substring display-time-string -4))
  28.     (progn
  29.       (if pop-mail-ding (ding))
  30.       (if pop-mail
  31.           (save-excursion
  32.         (let ((buf (get-file-buffer vm-primary-inbox)))
  33.           (if (or (and buf (get-buffer-window buf))
  34.               (string-match " \\*Minibuf-[0-9]+\\*" (buffer-name)))
  35.               nil
  36.             (vm)
  37.             (find-file-other-window vm-primary-inbox))))))))
  38. (set-process-filter display-time-process 'ding-display-time-filter)
  39. -- 
  40. Piet* van Oostrum, Dept of Computer Science, Utrecht University,
  41. Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
  42. Telephone: +31 30 531806   Uucp:   uunet!mcsun!ruuinf!piet
  43. Telefax:   +31 30 513791   Internet:  piet@cs.ruu.nl   (*`Pete')
  44.