From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#59902: 30.0.50; Image overlay is not updated until the cursor moves to the overlay Date: Thu, 15 Dec 2022 10:24:16 +0000 Message-ID: <87cz8lufqn.fsf@localhost> References: <87zgby87rm.fsf@localhost> <83h6y62kjp.fsf@gnu.org> <87ilim863y.fsf@localhost> <83lenh20fy.fsf@gnu.org> <87a63x7l1w.fsf@localhost> <83h6y51w66.fsf@gnu.org> <87wn6zr376.fsf@localhost> <83bkoby0zq.fsf@gnu.org> <87ilijfrac.fsf@localhost> <83o7sbwddn.fsf@gnu.org> <87zgbul2ln.fsf@localhost> <83bkoautll.fsf@gnu.org> <87pmcpc940.fsf@localhost> <83h6y0sqyo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6659"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59902@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 15 11:25:21 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 1p5lQW-0001XM-HI for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Dec 2022 11:25:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5lQG-0001Gh-Kn; Thu, 15 Dec 2022 05:25:04 -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 1p5lQE-0001GJ-Me for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 05:25:02 -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 1p5lQE-00047W-DC for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 05:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5lQD-0001L3-R0 for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 05:25:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 10:25:01 +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.16710998675135 (code B ref 59902); Thu, 15 Dec 2022 10:25:01 +0000 Original-Received: (at 59902) by debbugs.gnu.org; 15 Dec 2022 10:24:27 +0000 Original-Received: from localhost ([127.0.0.1]:42731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5lPf-0001Kl-5I for submit@debbugs.gnu.org; Thu, 15 Dec 2022 05:24:27 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:33751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5lPd-0001Kb-Lx for 59902@debbugs.gnu.org; Thu, 15 Dec 2022 05:24:26 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id DD33B24002A for <59902@debbugs.gnu.org>; Thu, 15 Dec 2022 11:24:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671099859; bh=2afedN99coSvYkYYNK7XsHsWVUv1L00656NI2nVY67U=; h=From:To:Cc:Subject:Date:From; b=Hhq+uMo5tds0K3bjjFD55wRJPpjdX51drIil46ATGf1yQCnONHL9wiRUj10p4qED2 eK46+2vUzxyXRrlpy9vYbrTe/PzOIlthN4wVrDt5v4nK1bXIbtEosmHumEOrYri8pt xG5c5+kY3uEAHykyIxuYgVl3hRKeLxZcWyZCQfAiUZASYevVjZ9Pee2kvC+hZ4a37O DrQR7vhPV4N/+y///f1LQtf3cMX6WSgVdDmeNcR4Zvi1oq+zzdrVSWBVzX/H0pIlDo 3Ow2otNrICD/yiCr7hVPg0z54t1ZgVjOIIvK3pe4L3S8qVxc3uTKyK/hjvmzKgXSqC OsPmgAnzDXFsQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NXpHj6CSbz9rxG; Thu, 15 Dec 2022 11:24:17 +0100 (CET) In-Reply-To: <83h6y0sqyo.fsf@gnu.org> 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:251055 Archived-At: Eli Zaretskii writes: >> > Why was this implementation chosen for whatever feature that produces >> > images? Emacs doesn't react instantly to changes in disk files that >> > it visits, and here you expect it to do so. Isn't it possible to >> > implement this in some other way, like have the program produce its >> > image data in a temporary Emacs buffer, then use that buffer's >> > contents for creating an image? Then I believe the updated image will >> > have a different hash value, and there will be no cache-related >> > collisions. >> >> It could be possible, but looks like unnecessary complication. >> Also, creating buffers often creates overheads associated with user >> hooks. >> >> I am not sure if something like >> >> (let ((revert-without-query '("."))) >> (with-current-buffer (find-file-noselect file) >> ;; Do not crown the buffer list. >> (unless (string-prefix-p " " (buffer-name)) >> (setf (buffer-name) (concat " " (buffer-name)))) >> (buffer-string))) >> >> is not going to cause significant slowdowns. > > Sorry, you lost me here: how is the above snippet relevant to what I > proposed as an alternative implementation? The above snippet creates a buffer with image FILE, reverts it if necessary (`find-file-noselect' should do it), and returns the image data that is guaranteed to be up-to-date with the actual file. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at