1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-22 07:09:47 +00:00

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.
This commit is contained in:
Nicolas Goaziou 2011-01-27 21:11:47 +01:00
parent f7ebd6bcf0
commit e5a61ab260

View File

@ -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.