From 8b7018269c724db403fdcea253e950d0a7feba78 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Mon, 1 Mar 2010 08:36:26 +0100 Subject: [PATCH] Catch error when updating checkbox count with no headline in place --- lisp/ChangeLog | 5 +++++ lisp/org-list.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a6bd0e7e2..5aece42ee 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-03-01 Carsten Dominik + + * org-list.el (org-toggle-checkbox): No errors when updating + checkbox count fails because there is no heading. + 2010-02-27 Carsten Dominik * org-clock.el (org-clock-report-include-clocking-task): New diff --git a/lisp/org-list.el b/lisp/org-list.el index a00b240ab..31463ec84 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -434,7 +434,9 @@ the whole buffer." (recursive (or (not org-hierarchical-checkbox-statistics) (string-match "\\" - (or (org-entry-get nil "COOKIE_DATA") "")))) + (or (ignore-errors + (org-entry-get nil "COOKIE_DATA")) + "")))) (cstat 0) ) (when all