Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!BRILLIG.UMD.EDU!israel From: israel@BRILLIG.UMD.EDU.UUCP Newsgroups: comp.emacs Subject: rmail suggestion Message-ID: <8705141459.AA03261@brillig.umd.edu> Date: Thu, 14-May-87 10:59:26 EDT Article-I.D.: brillig.8705141459.AA03261 Posted: Thu May 14 10:59:26 1987 Date-Received: Sat, 16-May-87 09:06:44 EDT Sender: daemon@eddie.MIT.EDU Lines: 44 From: Steve Strassmann A suggestion: When you do a "g" in rmail, and if you have (display-time) running, you should update the mode line so the "Mail" flag goes away. Sometimes, it still claims you have new mail a minute or more after you've read it. Yeah, I always found this annoying as well, so a while ago I did exactly what you are suggesting. Here's the code for it: I put the following bit right after the "(interactive" call in the body of the rmail-get-new-mail function: ; remove the string " Mail" from display-time-string if it ; is there. (and (boundp 'display-time-string) (stringp display-time-string) (setq display-time-string (remove-string " Mail" display-time-string))) and then defined the following function as well. (defun remove-string (substring string) "Remove the first occurrence of SUBSTRING from STRING." (let ((loc (string-match substring string))) (if loc (concat (substring string 0 loc) (substring string (+ (length substring) loc))) string))) However, there is a minor bug ( problem?) with it. After I log on, to read mail I run 'gnumacs -e rmail'. Since the 'rmail' function is being run from the invocation line, it runs quickly, and the display-time process has not yet set the variable display-time-string to the process invocation. So when 'rmail' is run, display-time-string is set to "time and load", and the "Mail" gets inserted just *after* 'rmail-get-new-mail' is run. As a result, if you read mail the way I do, the first minute will have a "Mail" string anyway, even though you're reading mail. Running gnumacs and then doing a M-x rmail immediately works though.