[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals-release/org 41a8666c09: org-display-inline-remove-overl
From: |
ELPA Syncer |
Subject: |
[elpa] externals-release/org 41a8666c09: org-display-inline-remove-overlay: Do better job clearing images from cache |
Date: |
Sun, 11 Dec 2022 04:57:52 -0500 (EST) |
branch: externals-release/org
commit 41a8666c09c702cb851b79a6f5eb3b3f0ba3e52b
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org-display-inline-remove-overlay: Do better job clearing images from cache
* lisp/org.el (org-display-inline-remove-overlay): Force remove
overlay images from Emacs image cache when un-displaying inline image
overlays. This change should: (1) slightly improve Emacs memory usage
when the number of inline images is large; (2) Clear images from cache
every time Emacs removes the overlay for any
reason. (`org-display-inline-remove-overlay' is used in
overlay 'modification-hooks.)
---
lisp/org.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lisp/org.el b/lisp/org.el
index 19f94c5e23..3018e4d6fe 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16399,6 +16399,10 @@ buffer boundaries with possible narrowing."
"Remove inline-display overlay if a corresponding region is modified."
(when (and ov after)
(delete ov org-inline-image-overlays)
+ ;; Clear image from cache to avoid image not updating upon
+ ;; changing on disk. See Emacs bug#59902.
+ (when (overlay-get ov 'org-image-overlay)
+ (image-flush (overlay-get ov 'display)))
(delete-overlay ov)))
(defun org-remove-inline-images (&optional beg end)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals-release/org 41a8666c09: org-display-inline-remove-overlay: Do better job clearing images from cache,
ELPA Syncer <=