lisp/org.el: Fix org-update-statistics-cookies error

* lisp/org.el (org-update-statistics-cookies): Replace
usage of `org-map-entries' with `org-map-region' to prevent bug where
an error was thrown if the current buffer had not yet been saved to disk.

Formatted from a patch proposal by mail@kisaragi-hiu.com
Reported-by: mail@kisaragi-hiu.com
This commit is contained in:
Nicholas Savage 2021-05-11 06:59:14 -04:00 committed by Bastien
parent d65ae82f4b
commit 8cf704e3fe
1 changed files with 1 additions and 1 deletions

View File

@ -10012,7 +10012,7 @@ all statistics cookies in the buffer."
(if all
(progn
(org-update-checkbox-count 'all)
(org-map-entries 'org-update-parent-todo-statistics))
(org-map-region 'org-update-parent-todo-statistics (point-min) (point-max)))
(if (not (org-at-heading-p))
(org-update-checkbox-count)
(let ((pos (point-marker))