1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-25 10:47:12 +00:00

Add faces for "calendar events" (active timestamps, or S-expressions).

* org-agenda.el (org-agenda-get-timestamps)
	(org-agenda-get-sexps): Use face for highlighting "calendar"
	events.

	* org-faces.el: Add faces `org-agenda-calendar-event' and
	`org-agenda-calendar-sexp'.
This commit is contained in:
Sebastien Vauban 2011-11-18 13:41:47 +01:00 committed by Bastien Guerry
parent 0472ccdc99
commit bfe779fe67
2 changed files with 17 additions and 4 deletions

View File

@ -3636,7 +3636,7 @@ given in `org-agenda-start-on-weekday'."
(setq rtn (apply 'org-agenda-get-day-entries
file date
org-agenda-entry-types)))))
(setq rtnall (append rtnall rtn))))
(setq rtnall (append rtnall rtn)))) ;; all entries
(if org-agenda-include-diary
(let ((org-agenda-search-headline-for-time t))
(require 'diary-lib)
@ -3658,7 +3658,7 @@ given in `org-agenda-start-on-weekday'."
(put-text-property s (1- (point)) 'org-day-cnt day-cnt)
(when todayp
(put-text-property s (1- (point)) 'org-today t))
(if rtnall (insert
(if rtnall (insert ;; all entries
(org-finalize-agenda-entries
(org-agenda-add-time-grid-maybe
rtnall ndays todayp))
@ -4721,7 +4721,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
(defun org-agenda-get-timestamps ()
"Return the date stamp information for agenda display."
(let* ((props (list 'face nil
(let* ((props (list 'face 'org-agenda-calendar-event
'org-not-done-regexp org-not-done-regexp
'org-todo-regexp org-todo-regexp
'org-complex-heading-regexp org-complex-heading-regexp
@ -4822,7 +4822,8 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
(defun org-agenda-get-sexps ()
"Return the sexp information for agenda display."
(require 'diary-lib)
(let* ((props (list 'mouse-face 'highlight
(let* ((props (list 'face 'org-agenda-calendar-sexp
'mouse-face 'highlight
'help-echo
(format "mouse-2 or RET jump to org file %s"
(abbreviate-file-name buffer-file-name))))

View File

@ -695,6 +695,18 @@ month and 365.24 days for a year)."
"Face used for agenda entries that come from the Emacs diary."
:group 'org-faces)
(defface org-agenda-calendar-event
'((((background light)) (:foreground "#FFFFFF" :background "#1662AF"))
(((background dark)) (:foreground "blue")))
"Face used to show events and appointments in the agenda."
:group 'org-faces)
(defface org-agenda-calendar-sexp
'((((background light)) (:background "light blue"))
(((background dark)) (:foreground "light blue")))
"Face used to show events computed from a S-expression."
:group 'org-faces)
(defconst org-level-faces
'(org-level-1 org-level-2 org-level-3 org-level-4
org-level-5 org-level-6 org-level-7 org-level-8