From 451be94fb8c7d7c9c7b5f5c87de9f49c25e2fad9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 27 Jan 2022 14:33:31 +0100 Subject: [PATCH] fix(org): out-of-bounds refreshing inline images A regression caused by 6934014, due to org-babel-where-is-src-block-result returning a position after org-babel-result-end. Fix: #6046 Amend: 69340149f974 --- modules/lang/org/config.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 674c7928a..b7e3d355b 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -314,10 +314,9 @@ Also adds support for a `:sync' parameter to override `:async'." ;; ...and not while tangling org buffers (which happens in a temp ;; buffer where `buffer-file-name' is nil). (string-match-p "^ \\*temp" (buffer-name))) - (org-display-inline-images - nil nil - (org-babel-where-is-src-block-result) - (org-babel-result-end))))) + (let ((beg (org-babel-where-is-src-block-result)) + (end (org-babel-result-end))) + (org-display-inline-images nil nil (min beg end) (max beg end)))))) (after! python (unless org-babel-python-command