summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-01-22 15:22:17 +0100
committerBastien Guerry <bzg@altern.org>2013-01-22 15:22:17 +0100
commit5e432838fd13348259babf9b6bc8e48b0c8bdcc1 (patch)
tree95f88892132f7981fbbfccc26137eb3e9e31ee34
parent443559a16f207df3955eacf5ad709a6abd12d808 (diff)
downloadorg-mode-5e432838fd13348259babf9b6bc8e48b0c8bdcc1.tar.gz
org.el: fix error message when C-u C-u C-c C-c on a list.
* org.el (org-ctrl-c-ctrl-c): Only throw a message when using two universal prefix arguments on a list where all items are already in a transitory state. Refine the error when the checkbox cannot be toggled. Thanks to Robert Horn for reporting this.
-rw-r--r--lisp/org.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 0e9b38b..389b367 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19610,7 +19610,12 @@ This command does many different things, depending on context:
(let ((block-item
(org-list-struct-fix-box struct parents prevs orderedp)))
(if (and box (equal struct old-struct))
- (user-error "Cannot toggle this checkbox (empty subitems?)")
+ (if (equal arg '(16))
+ (message "Checkboxes already reset")
+ (user-error "Cannot toggle this checkbox: %s"
+ (if (eq box 'on)
+ "all subitems checked"
+ "unchecked subitems")))
(org-list-struct-apply-struct struct old-struct)
(org-update-checkbox-count-maybe))
(when block-item