summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2011-01-27 21:11:47 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2011-02-18 12:45:12 +0100
commite5a61ab260281bc5c8e10896aca918b3bfb69f1b (patch)
treecb31d56458c1be5ab559951b822b1023926a4e30
parentf7ebd6bcf0ab741d0cd1c840a3fb7e7b21e84d41 (diff)
downloadorg-mode-e5a61ab260281bc5c8e10896aca918b3bfb69f1b.tar.gz
org-list: update cookies in special contexts
* lisp/org-list.el (org-update-checkbox-count): when a part of the buffer is processed to count checkboxes, lists are read from top to bottom, but inside lists (in drawers, blocks, or inline tasks) are skipped. Thus, cookies cannot be updated. This patch enforces reading of such lists if counter is itself in a special context.
-rw-r--r--lisp/org-list.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el
index f5e04fe..ab10b77 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -2229,7 +2229,9 @@ With optional prefix argument ALL, do this for the whole buffer."
;; Cookie is at an item, and we already have list
;; structure stored in STRUCTS-BAK.
((and (org-at-item-p)
- (< (point-at-bol) backup-end))
+ (< (point-at-bol) backup-end)
+ ;; Only lists in no special context are stored.
+ (not (nth 2 (org-list-context))))
(funcall count-boxes (point-at-bol) structs-bak recursivep))
;; Cookie is at an item, but we need to compute list
;; structure.