unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 59902@debbugs.gnu.org
Subject: bug#59902: 30.0.50; Image overlay is not updated until the cursor moves to the overlay
Date: Thu, 08 Dec 2022 11:52:49 +0000	[thread overview]
Message-ID: <87ilim863y.fsf@localhost> (raw)
In-Reply-To: <83h6y62kjp.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2151 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> 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
> ...
> Is the "convert" part in step 3 necessary to reproduce this?  If so,
> it's a huge turn-off for me, because I don't have, and won't have,
> ImageMagick installed, or anything similar to it.  So someone else
> will have to investigate this in that case, sorry.

It is not. Anything generating an image of known size will do.
The original report is in
https://list.orgmode.org/87wn7287n2.fsf@localhost/T/#mda89a57883b92c8b48ad6c4aec9e111c131efe92

You can try the following:

#+begin_src sh :results graphics file :file /tmp/colour.png
true
#+end_src

and then change to

#+begin_src sh :results graphics file :file /tmp/colour2.png
true
#+end_src

The images are attached.

>> If I step through the code inserting the image overlays, the wrong (not
>> updated) overlay appears in `org-display-inline-images':
>
> Where is this code through which you are stepping?

`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
>
> And if you switch the order of the above two lines?

Ain't helping.

> Anyway, it is not reliable to try to deduce what happens when stepping
> through the code if the problem is relied to cursor motion or
> redisplay, because Edebug changes all of that in radical ways.

I use debug-on-entry. Probably not much different though.

> Finally, a stab in the dark: the fact that the problem disappears when
> you move the cursor might mean that a call to 'redisplay' (or some
> other trigger for redisplay to know stuff has changed) is missing
> somewhere.

Nope. When I move the cursor away, the erroneous image is displayed again.


[-- Attachment #2: colour.png --]
[-- Type: image/png, Size: 351 bytes --]

[-- Attachment #3: colour2.png --]
[-- Type: image/png, Size: 358 bytes --]

[-- Attachment #4: Type: text/plain, Size: 225 bytes --]



-- 
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>

  reply	other threads:[~2022-12-08 11:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ilim863y.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=59902@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).