From 81cccbcc513420395df09b3141618678e5273e4b Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 30 Oct 2018 16:20:25 -0400 Subject: [PATCH] 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. --- modules/lang/org/autoload/org.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index df69c5123..85d869c21 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -393,7 +393,8 @@ another level of headings on each invocation." (defun +org|update-cookies () "Update counts in headlines (aka \"cookies\")." (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 (defun +org|yas-expand-maybe ()