From 7fefc3027b2954ba8cb2610472cd6db81eab7f27 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Sat, 10 Dec 2022 12:59:47 +0300 Subject: [PATCH] org-display-inline-images: Force-refresh image cache * lisp/org.el (org-display-inline-images): Always refresh cached images when displaying image overlays. See Emacs bug#59902. This fixes images not updating when image file is changed on disk. Reported-by: William Denton Link: https://orgmode.org/list/87wn7287n2.fsf@localhost --- lisp/org.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index 816c165e1..19f94c5e2 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16322,6 +16322,10 @@ buffer boundaries with possible narrowing." (org-element-property :end link)) (skip-chars-backward " \t") (point))))) + ;; FIXME: See bug#59902. We cannot rely + ;; on Emacs to update image if the file + ;; has changed. + (image-flush image) (overlay-put ov 'display image) (overlay-put ov 'face 'default) (overlay-put ov 'org-image-overlay t)