summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2008-11-17 17:49:58 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2008-11-17 17:49:58 +0100
commit4a46ec644af684a0d71894563d05ed288fd0d50f (patch)
treea9368c13b852dca4bf885d00d06b0f8feab656c5
parent6c32d29bbcde6e594d8d0345c17b9eca41971fde (diff)
downloadorg-mode-4a46ec644af684a0d71894563d05ed288fd0d50f.tar.gz
New face or agenda datelines during column view.
The face `org-agenda-column-dateline' can be used to make datelines with summaries look different from other column view lines. Requested by George Pearson.
-rwxr-xr-xlisp/ChangeLog7
-rw-r--r--lisp/org-colview.el7
-rw-r--r--lisp/org-faces.el6
3 files changed, 17 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 53634d5..53a21fd 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,12 @@
2008-11-17 Carsten Dominik <carsten.dominik@gmail.com>
+ * org-colview.el (org-columns-display-here): New argument
+ DATELINE, to trigger using the new face.
+ (org-agenda-colview-summarize): Call `org-columns-display-here'
+ with the new argument.
+
+ * org-faces.el (org-agenda-column-dateline): New face.
+
* org-publish.el (org-publish-org-index): Use index-title at page
title, not as section.
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 5895d3e..04d533d 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -130,7 +130,7 @@ This is the compiled version of the format.")
(push ov org-columns-overlays)
ov))
-(defun org-columns-display-here (&optional props)
+(defun org-columns-display-here (&optional props dateline)
"Overlay the current line with column display."
(interactive)
(let* ((fmt org-columns-current-fmt-compiled)
@@ -145,6 +145,7 @@ This is the compiled version of the format.")
'default))
(color (list :foreground (face-attribute ref-face :foreground)))
(face (list color 'org-column ref-face))
+ (face1 (list color 'org-agenda-column-dateline ref-face))
(pl (or (get-text-property (point-at-bol) 'prefix-length) 0))
(cphr (get-text-property (point-at-bol) 'org-complex-heading-regexp))
pom property ass width f string ov column val modval s1 s2 title)
@@ -189,7 +190,7 @@ This is the compiled version of the format.")
;; Create the overlay
(org-unmodified
(setq ov (org-columns-new-overlay
- beg (setq beg (1+ beg)) string face))
+ beg (setq beg (1+ beg)) string (if dateline face1 face)))
(org-overlay-put ov 'keymap org-columns-map)
(org-overlay-put ov 'org-columns-key property)
(org-overlay-put ov 'org-columns-value (cdr ass))
@@ -1282,7 +1283,7 @@ This will add overlays to the date lines, to show the summary for each day."
0 (length lsum) 'face 'bold lsum)
(cons prop lsum))))
fmt))
- (org-columns-display-here props)
+ (org-columns-display-here props 'dateline)
(org-set-local 'org-agenda-columns-active t)))
(if (bobp) (throw 'exit t))
(beginning-of-line 0))))))
diff --git a/lisp/org-faces.el b/lisp/org-faces.el
index 97739c3..023ba3c 100644
--- a/lisp/org-faces.el
+++ b/lisp/org-faces.el
@@ -203,6 +203,12 @@ column view defines special faces for each outline level. See the file
:height (face-attribute 'default :height)
:family (face-attribute 'default :family)))
+(defface org-agenda-column-dateline
+ (org-compatible-face 'org-column
+ '((t nil)))
+ "Face used in agenda column view for datelines with summaries."
+ :group 'org-faces)
+
(defface org-warning
(org-compatible-face 'font-lock-warning-face
'((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))