Browse Source

Add CATEGORY as an retrievable entry property.

Carsten Dominik 16 years ago
parent
commit
24d80b3928
2 changed files with 10 additions and 0 deletions
  1. 5 0
      lisp/ChangeLog
  2. 5 0
      lisp/org.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2008-10-20  Carsten Dominik  <dominik@science.uva.nl>
+
+	* org.el (org-entry-properties): Add CATEGORY property, iven if it
+	is not defined as a property in this entry.
+
 2008-10-19  James TD Smith  <ahktenzero@mohorovi.cc>
 
 	* org.el (org-add-log-setup): Bugfix; code to find insertion point

+ 5 - 0
lisp/org.el

@@ -9821,6 +9821,11 @@ If WHICH is nil or `all', get all properties.  If WHICH is
 			  (org-columns-number-to-string (/ (float clocksum) 60.)
 						       'add_times))
 		    props))
+	  (unless (assoc "CATEGORY" props)
+	    (setq value (or (org-get-category)
+			    (progn (org-refresh-category-properties)
+				   (org-get-category))))
+	    (push (cons "CATEGORY" value) props))
 	  (append sum-props (nreverse props)))))))
 
 (defun org-entry-get (pom property &optional inherit)