lang/org: only update parent statistics cookies

This would formerly update _all_ statistics cookies in the org document,
which can be terribly slow in large documents. This restricts that to
just the parent headlines of the subtree the cursor is in.
This commit is contained in:
Henrik Lissner 2018-10-30 16:20:25 -04:00
parent c2392039f0
commit 81cccbcc51
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -393,7 +393,8 @@ another level of headings on each invocation."
(defun +org|update-cookies () (defun +org|update-cookies ()
"Update counts in headlines (aka \"cookies\")." "Update counts in headlines (aka \"cookies\")."
(when (and buffer-file-name (file-exists-p buffer-file-name)) (when (and buffer-file-name (file-exists-p buffer-file-name))
(org-update-statistics-cookies t))) (let (org-hierarchical-todo-statistics)
(org-update-parent-todo-statistics))))
;;;###autoload ;;;###autoload
(defun +org|yas-expand-maybe () (defun +org|yas-expand-maybe ()