From ad006dea13fcc4a5d6c6eba4639aac72efac61d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= Date: Thu, 9 Dec 2010 04:46:20 +0000 Subject: [PATCH] sexp can set its face (was: Including current time in agenda) 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-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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 6bcbf62da..0240b1773 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))))