From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] sexp can set its face (was: Including current time in agenda) Date: Sun, 12 Dec 2010 08:44:33 +0100 Message-ID: <29351D09-02D1-480A-9C76-BFE5F3DB723F@gmail.com> References: <87ei9ulky8.fsf@ucl.ac.uk> <87y67zx1yr.fsf_-_%lukasz.stelmach@iem.pw.edu.pl> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=47652 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PRgbm-0007TM-UL for emacs-orgmode@gnu.org; Sun, 12 Dec 2010 02:44:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PRgbl-00049H-TQ for emacs-orgmode@gnu.org; Sun, 12 Dec 2010 02:44:38 -0500 Received: from mail-ew0-f43.google.com ([209.85.215.43]:45380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PRgbl-000494-P6 for emacs-orgmode@gnu.org; Sun, 12 Dec 2010 02:44:37 -0500 Received: by ewy22 with SMTP id 22so3235820ewy.30 for ; Sat, 11 Dec 2010 23:44:37 -0800 (PST) In-Reply-To: <87y67zx1yr.fsf_-_%lukasz.stelmach@iem.pw.edu.pl> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?UTF-8?Q?=C5=81ukasz_Stelmach?= Cc: emacs-orgmode@gnu.org Patch accepted, thanks. - Carsten On Dec 9, 2010, at 12:46 AM, =C5=81ukasz Stelmach wrote: > suvayu ali writes: > >> I actually tried to set the text properties for the string instead, >> but looks like org-agenda is ignoring that. >> >> (defun jd:org-current-time () >> "Return current-time if date is today." >> (when (equal date (calendar-current-date)) >> (propertize (format-time-string "%H:%M Current time") 'font-lock-=20= >> face >> '(:weight bold :foreground "DodgerBlue4" :background = "snow")))) > > To accomplish this you'd have to apply the following patch and use =20 > 'face > property rather than font-lock-face. > > Why can't a sexp choose its 'face after all? > > --8<---------------cut here---------------start------------->8--- > diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el > index 20c901a..ba5eafc 100644 > --- a/lisp/org-agenda.el > +++ b/lisp/org-agenda.el > @@ -4650,8 +4650,7 @@ the documentation of `org-diary'." > (defun org-agenda-get-sexps () > "Return the sexp information for agenda display." > (require 'diary-lib) > - (let* ((props (list 'face nil > - 'mouse-face 'highlight > + (let* ((props (list 'mouse-face 'highlight > 'help-echo > (format "mouse-2 or RET jump to org file %s" > (abbreviate-file-name buffer-file-name)))) > --8<---------------cut here---------------end--------------->8--- > > --=20 > Mi=C5=82ego dnia, > =C5=81ukasz Stelmach > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode