summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Vauban <sva@mygooglest.com>2011-10-27 23:08:04 +0200
committerBastien Guerry <bzg@altern.org>2011-10-29 13:19:41 +0200
commit639699518ab24e43c3c449d925795ff91e1c3fd4 (patch)
treee29b87a43901e78fbc217f56a04e0104cdfb8455
parent5f1bd9f9b7f0dff1cfaec3d80c704ed85edea064 (diff)
downloadorg-mode-639699518ab24e43c3c449d925795ff91e1c3fd4.tar.gz
Add custom face for highlighting tags used in agenda filtering.
* org-agenda.el (org-agenda-set-mode-name): Highlight tags used for filtering (shown in the mode-line). * org-faces.el: Add face `org-agenda-filter-tags'.
-rw-r--r--lisp/org-agenda.el17
-rw-r--r--lisp/org-faces.el7
2 files changed, 19 insertions, 5 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index ad6f95f..21a2439 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6764,13 +6764,20 @@ When called with a prefix argument, include all archive files as well."
((eq org-agenda-show-log 'clockcheck) " ClkCk")
(org-agenda-show-log " Log")
(t ""))
+ ;; show tags used for filtering in a custom face
(if (or org-agenda-filter (get 'org-agenda-filter
:preset-filter))
- (concat " {" (mapconcat
- 'identity
- (append (get 'org-agenda-filter
- :preset-filter)
- org-agenda-filter) "") "}")
+ '(:eval (propertize
+ (concat " {"
+ (mapconcat
+ 'identity
+ (append
+ (get 'org-agenda-filter :preset-filter)
+ org-agenda-filter)
+ "")
+ "}")
+ 'face 'org-agenda-filter-tags
+ 'help-echo "Tags used in filtering"))
"")
(if org-agenda-archives-mode
(if (eq org-agenda-archives-mode t)
diff --git a/lisp/org-faces.el b/lisp/org-faces.el
index aac82c9..519c858 100644
--- a/lisp/org-faces.el
+++ b/lisp/org-faces.el
@@ -672,6 +672,13 @@ month and 365.24 days for a year)."
"Face for showing the agenda restriction lock."
:group 'org-faces)
+(defface org-agenda-filter-tags
+ (org-compatible-face nil
+ '((((background light)) (:foreground "orange"))
+ (((background dark)) (:foreground "orange"))))
+ "Face for showing the tags (in the mode-line) which are used in the agenda filtering."
+ :group 'org-faces)
+
(defface org-time-grid ;; originally copied from font-lock-variable-name-face
(org-compatible-face nil
'((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))