From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kester Clegg Newsgroups: gmane.emacs.help Subject: Re: modeline + appointment font color Date: 04 Dec 2003 13:58:36 +0000 Organization: Rolls Royce UTC, Dept. of Computer Science, University of York, UK Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1070551784 31360 80.91.224.253 (4 Dec 2003 15:29:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 Dec 2003 15:29:44 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 04 16:29:41 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ARvQD-0006f3-00 for ; Thu, 04 Dec 2003 16:29:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ARuyE-00043U-9v for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Dec 2003 10:00:46 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!lnewsoutpeer00.lnd.ops.eu.uu.net!lnewsinpeer00.lnd.ops.eu.uu.net!emea.uu.net!server1.netnews.ja.net!news.york.ac.uk!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-NNTP-Posting-Host: pc310.cs.york.ac.uk Original-X-Trace: pump1.york.ac.uk 1070546314 4919 144.32.40.101 (4 Dec 2003 13:58:34 GMT) Original-X-Complaints-To: abuse@york.ac.uk Original-NNTP-Posting-Date: 4 Dec 2003 13:58:34 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Xref: shelby.stanford.edu gnu.emacs.help:118994 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:14934 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14934 Jeff Miller writes: > Kester Clegg writes: > > > My modeline warns me when I have an appointment. It says things like: > > > > .. 1:49 PM Wednesday 26 Nov App't in 11 min. (Message MML ... etc) > > > > Is there any way of changing the colour of the appt-mode-string that > > appears in the modeline, so I actually notice it? > > I think this will do it for you, in Emacs at least. > > > (defface appt-face > '((t (:foreground "red" :background "white"))) > "Face to indicate a current appointment." > :group 'appt) > > (defadvice appt-disp-window (before appt-hilite-more activate) > (when appt-mode-string > (put-text-property 1 (- (length appt-mode-string) 1) > 'face 'appt-face appt-mode-string))) > > (defadvice appt-check (after appt-hilite activate) > (when appt-mode-string > (put-text-property 1 (- (length appt-mode-string) 1) > 'face 'appt-face appt-mode-string) > (force-mode-line-update))) That's absolutely perfect - very impressive! :-) -- ************************************************************************ Kester Clegg Dept. of Computer Science, Research Assistant (UTC) University of York, Tel (01904) 43 27 49 email: kester at cs.york.ac.uk ************************************************************************