Browse Source

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.
Carsten Dominik 16 years ago
parent
commit
4a46ec644a
3 changed files with 17 additions and 3 deletions
  1. 7 0
      lisp/ChangeLog
  2. 4 3
      lisp/org-colview.el
  3. 6 0
      lisp/org-faces.el

+ 7 - 0
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.
 

+ 4 - 3
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))))))

+ 6 - 0
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))