From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59902: 30.0.50; Image overlay is not updated until the cursor moves to the overlay Date: Thu, 08 Dec 2022 13:37:30 +0200 Message-ID: <83h6y62kjp.fsf@gnu.org> References: <87zgby87rm.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25162"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59902@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 08 12:39:15 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p3FFD-0006Jd-7y for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Dec 2022 12:39:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3FF4-0006cV-Vf; Thu, 08 Dec 2022 06:39:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3FF1-0006bh-RP for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 06:39:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p3FF0-0007r4-C1 for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 06:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3FF0-0003In-4G for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 06:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Dec 2022 11:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59902 X-GNU-PR-Package: emacs Original-Received: via spool by 59902-submit@debbugs.gnu.org id=B59902.167049948712606 (code B ref 59902); Thu, 08 Dec 2022 11:39:02 +0000 Original-Received: (at 59902) by debbugs.gnu.org; 8 Dec 2022 11:38:07 +0000 Original-Received: from localhost ([127.0.0.1]:56242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3FE6-0003HE-Lw for submit@debbugs.gnu.org; Thu, 08 Dec 2022 06:38:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3FE1-0003Gg-8L for 59902@debbugs.gnu.org; Thu, 08 Dec 2022 06:38:06 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3FDm-0005zX-GZ; Thu, 08 Dec 2022 06:37:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=XgSalqOnx0PBUb50xIPxwhBFA7PTkpjo9Y+JKmefnVI=; b=CiSJhf6eOMRX qJgtBfVlJ8iEkJ6CMTsEljLkWcAyflU9Umw3wheMGzFEuo5QqZ1LedlXcKk6jPkg7tTOLstUjwStd OzKbi6bflZu06z+B8lpH1PmvI2ncll8sg7ImW7GWWVo+b3s1zr8ujZ3jG19DZoGpTbRmSq04ErT/F 9mH7zhuZhBuw6BdjgXbkEpMvTwQj0FXcWr6xfxW9GDxTwg/oMozP5i/GI5/8fGgzB2UpINlMrBh64 T5ALD0SqQvKFADrXCMVM1OeeweWsl3XxnWVX02qDDehAT3UMi4TnkwCgeZLAixU6IKa0DvHkR36v5 PQCvexd0vvumUE6JHTtHwQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3FDg-0002D0-Ie; Thu, 08 Dec 2022 06:37:42 -0500 In-Reply-To: <87zgby87rm.fsf@localhost> (message from Ihor Radchenko on Thu, 08 Dec 2022 11:17:01 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:250276 Archived-At: > From: Ihor Radchenko > Date: Thu, 08 Dec 2022 11:17:01 +0000 > > 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!! 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. > 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? > (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? 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. 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.