sexp can set its face (was: Including current time in agenda)
commitad006dea13fcc4a5d6c6eba4639aac72efac61d7
authorŁukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl>
Thu, 9 Dec 2010 04:46:20 +0000 (9 04:46 +0000)
committerCarsten Dominik <carsten.dominik@gmail.com>
Sun, 12 Dec 2010 07:38:38 +0000 (12 08:38 +0100)
treee1f46f8a3ca26487bbe08c6fbbfabe9f72de7ca1
parent651e137c5078758cbbb331f6ce91c5aefbd51adc
sexp can set its face (was: Including current time in agenda)

suvayu ali <fatkasuvayu+linux@gmail.com> 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-face
>  '(:weight bold :foreground "DodgerBlue4" :background "snow"))))

To accomplish this you'd have to apply the following patch and use 'face
property rather than font-lock-face.

Why can't a sexp choose its 'face after all?

--8<---------------cut here---------------start------------->8---
--8<---------------cut here---------------end--------------->8---
lisp/org-agenda.el