summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2011-11-14 00:36:23 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2011-11-14 00:43:02 +0100
commit57caa09106cfcff5cec8535c00256e02b4d2bd8c (patch)
treec3cc7f0a12184f998737417cf2e17c50ba86cf7d
parent9edb523bdd65c8ac613d57ad8ff718da88b88cae (diff)
downloadorg-mode-57caa09106cfcff5cec8535c00256e02b4d2bd8c.tar.gz
org-agenda: Do not break TODO list view with empty tasks
* lisp/org-agenda.el (org-agenda-get-todos): Prevent an error when encountering tasks with only the TODO keyword.
-rw-r--r--lisp/org-agenda.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index bcc2de4..65a92f5 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4626,7 +4626,8 @@ the documentation of `org-diary'."
(setq marker (org-agenda-new-marker (match-beginning 0))
category (org-get-category)
org-category-pos (get-text-property (point) 'org-category-position)
- txt (buffer-substring (match-beginning 2) (match-end 3))
+ txt (buffer-substring
+ (org-trim (match-beginning 2) (match-end 0)))
tags (org-get-tags-at (point))
txt (org-agenda-format-item "" txt category tags)
priority (1+ (org-get-priority txt))