From fa9001aacb0ea51cd442026b145119d008f1b64a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 22 Oct 2019 17:58:30 -0400 Subject: [PATCH] lang/org: refresh inline images after executing src blocks --- modules/lang/org/config.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index e3e6ef042..dcd297148 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -98,6 +98,10 @@ ;; Use major-mode native TAB indentation in SRC blocks (advice-add #'org-return-indent :after #'+org-fix-newline-and-indent-in-src-blocks-a) + ;; Refresh inline images after executing src blocks (useful for plantuml or + ;; ipython, where the result could be an image) + (add-hook 'org-babel-after-execute-hook #'org-redisplay-inline-images) + ;; `org-babel-get-header' was removed from org in 9.0. Quite a few babel ;; plugins use it (like ob-spice), so until those plugins update, this ;; polyfill will do: