Browse Source

Catch error when updating checkbox count with no headline in place

Carsten Dominik 15 years ago
parent
commit
8b7018269c
2 changed files with 8 additions and 1 deletions
  1. 5 0
      lisp/ChangeLog
  2. 3 1
      lisp/org-list.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2010-03-01  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-list.el (org-toggle-checkbox): No errors when updating
+	checkbox count fails because there is no heading.
+
 2010-02-27  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-clock.el (org-clock-report-include-clocking-task): New

+ 3 - 1
lisp/org-list.el

@@ -434,7 +434,9 @@ the whole buffer."
 	  (recursive
 	   (or (not org-hierarchical-checkbox-statistics)
 	       (string-match "\\<recursive\\>"
-			     (or (org-entry-get nil "COOKIE_DATA") ""))))
+			     (or (ignore-errors
+				   (org-entry-get nil "COOKIE_DATA"))
+				 ""))))
 	  (cstat 0)
 	  )
      (when all