Browse Source

org-agenda.el: Add a 'tags property for agenda entries created from sexps

* org-agenda.el (org-agenda-get-sexps): Add a 'tags property
for agenda entries created from sexps.

Thanks to Simon Thum for reporting this.
Bastien Guerry 12 năm trước cách đây
mục cha
commit
621364fc6d
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      lisp/org-agenda.el

+ 2 - 1
lisp/org-agenda.el

@@ -5105,6 +5105,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
 	  (setq marker (org-agenda-new-marker beg)
 		category (org-get-category beg)
 		org-category-pos (get-text-property beg 'org-category-position)
+		tags (save-excursion (org-backward-heading-same-level 0) (org-get-tags))
 		todo-state (org-get-todo-state))
 
 	  (dolist (r (if (stringp result)
@@ -5123,7 +5124,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
 	    (org-add-props txt props 'org-marker marker)
 	    (org-add-props txt nil
 	      'org-category category 'date date 'todo-state todo-state
-	      'org-category-position org-category-pos
+	      'org-category-position org-category-pos 'tags tags
 	      'type "sexp")
 	    (push txt ee)))))
     (nreverse ee)))