소스 검색

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.
Nicolas Goaziou 15 년 전
부모
커밋
e5a61ab260
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      lisp/org-list.el

+ 3 - 1
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.