From 8cf704e3fe0bc56c678307427c41413085535a1d Mon Sep 17 00:00:00 2001 From: Nicholas Savage Date: Tue, 11 May 2021 06:59:14 -0400 Subject: [PATCH 1/2] 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 --- lisp/org.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index d732b48fa..dc433c0f7 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -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)) From a9af1faaa1fc6f2aa2457e355a8eb46ef4d1462d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Sun, 16 May 2021 19:13:53 +0200 Subject: [PATCH 2/2] org-src.el (org-edit-src-exit): Fix write-back-buf not getting killed * lisp/org.el (org-edit-src-exit): Fix write-back-buf not getting killed --- lisp/org-src.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index b718e6866..f7011d1c6 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -1255,8 +1255,8 @@ Throw an error if there is no such buffer." (narrow-to-region beg end) (replace-buffer-contents write-back-buf) (goto-char (point-max)))) - (when (and expecting-bol (not (bolp))) (insert "\n"))) - (when write-back-buf (kill-buffer write-back-buf)))) + (when (and expecting-bol (not (bolp))) (insert "\n"))))) + (when write-back-buf (kill-buffer write-back-buf)) ;; If we are to return to source buffer, put point at an ;; appropriate location. In particular, if block is hidden, move ;; to the beginning of the block opening line.