all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#59902: 30.0.50; Image overlay is not updated until the cursor moves to the overlay
@ 2022-12-08 11:17 Ihor Radchenko
  2022-12-08 11:37 ` Eli Zaretskii
  2022-12-08 19:18 ` William Denton
  0 siblings, 2 replies; 28+ messages in thread
From: Ihor Radchenko @ 2022-12-08 11:17 UTC (permalink / raw)
  To: 59902

Hi,

Consider the following

1. emacs -Q
2. M-: (require 'ob-shell)
3. Open the following org file
   #+begin_src sh :results graphics file :file /tmp/colour.png
   convert -size 300x300 xc:#002b36 /tmp/colour.png
   #+end_src
4. Move point to the source block and C-c C-c yes
5. C-c C-x C-v
6. Observe the 300x300 image appearing
7. Edit the source code to 500x300
8. C-c C-c yes
9. Image disappears
10. C-c C-x C-v
11. Observe what appears to be the old 300x300 image
12. Move the cursor to the image
13. Observe the correct 500x300 appearing while the cursor is on it!!

If I step through the code inserting the image overlays, the wrong (not
updated) overlay appears in `org-display-inline-images':

    (let ((ov (make-overlay
	       (org-element-property :begin link)
	       (progn
		 (goto-char
		  (org-element-property :end link))
		 (skip-chars-backward " \t")
		 (point)))))
      (overlay-put ov 'display image) ;; <- the updated image is correctly displayed
      (overlay-put ov 'face 'default) ;; <- un-updated image is displayed until we move cursor to the overlay
      (overlay-put ov 'org-image-overlay t)


In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.35, cairo version 1.17.6) of 2022-12-07 built on localhost
Repository revision: f0e118d3f676afe39df29663399d4bbe8f53f208
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Gentoo Linux

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2022-12-15 14:31 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-08 11:17 bug#59902: 30.0.50; Image overlay is not updated until the cursor moves to the overlay Ihor Radchenko
2022-12-08 11:37 ` Eli Zaretskii
2022-12-08 11:52   ` Ihor Radchenko
2022-12-08 14:03     ` Eli Zaretskii
2022-12-08 14:10       ` Ihor Radchenko
2022-12-08 18:51     ` Eli Zaretskii
2022-12-08 19:27       ` Ihor Radchenko
2022-12-08 20:24         ` Eli Zaretskii
2022-12-10  9:57           ` Ihor Radchenko
2022-12-10 11:03             ` Eli Zaretskii
2022-12-10 11:10               ` Ihor Radchenko
2022-12-10 14:18                 ` Eli Zaretskii
2022-12-11  9:19                   ` Ihor Radchenko
2022-12-11 10:23                     ` Eli Zaretskii
2022-12-12  8:35                       ` Ihor Radchenko
2022-12-12 13:15                         ` Eli Zaretskii
2022-12-15 10:24                           ` Ihor Radchenko
2022-12-15 10:49                             ` Eli Zaretskii
2022-12-15 10:53                               ` Ihor Radchenko
2022-12-15 10:58                                 ` Eli Zaretskii
2022-12-15 11:05                                   ` Ihor Radchenko
2022-12-15 11:16                                     ` Eli Zaretskii
2022-12-15 11:20                                       ` Ihor Radchenko
2022-12-15 13:16                                         ` Eli Zaretskii
2022-12-15 13:23                                           ` Ihor Radchenko
2022-12-15 14:25                                             ` Eli Zaretskii
2022-12-15 14:31                                               ` Ihor Radchenko
2022-12-08 19:18 ` William Denton

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.