Path: utzoo!attcan!uunet!yale!Ram-Ashwin From: Ram-Ashwin@cs.yale.edu (Ashwin Ram) Newsgroups: comp.emacs Subject: Re: mail without time Message-ID: <34270@yale-celray.yale.UUCP> Date: 26 Jul 88 14:29:24 GMT References: <27412@bbn.COM> Sender: root@yale.UUCP Reply-To: Ram-Ashwin@cs.yale.edu (Ashwin Ram) Distribution: comp Organization: Computer Science, Yale University, New Haven, CT 06520-2158 Lines: 31 In-reply-to: jr@bbn.com (John Robinson) In article <27412@bbn.COM>, jr@bbn (John Robinson) writes: > In article , ghh@clarity (Gilbert Harman) writes: > >In gnu emacs 19.50.3 is there a way to have new mail > >indicated in the mode line without having the time and load > >showing up? > The stuff that goes into the mode line is simply the output of the > program loadst, which is normally run from the emacs/etc/ directory. > If you put a program named loadst on your search path, emacs will > execute it first. I did this for a while with a shell script that > looked for new news and added [News] to the modeline when appropriate. Although this will work, there is another way to do this purely inside Emacs-Lisp. The function display-time-filter is used to filter the output of the loadst process before it is put into the mode-line (see lisp/time.el). display-time-filter sets the variable display-time-string to a string that will be displayed in the mode-line. You can rewrite display-time-filter to display the string as you want it. (You can also have other background processes (e.g., a new news checker) modify display-time-string to get other kinds of notification without rewriting loadst.) Both methods will work -- it's upto you which one you prefer. It would be nice if display-time-filter ran a hook at its end so that one could do stuff like this (customize the date and time display, add on other notifications such as [News], etc.) without having to rewrite either loadst or display-time-filter. -- Ashwin. ARPA: Ram-Ashwin@cs.yale.edu UUCP: {decvax,ucbvax,harvard,cmcl2,...}!yale!Ram-Ashwin BITNET: Ram@yalecs