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, 15 Dec 2022 10:24:16 +0000 [thread overview]
Message-ID: <87cz8lufqn.fsf@localhost> (raw)
In-Reply-To: <83h6y0sqyo.fsf@gnu.org>
Eli Zaretskii <eliz@gnu.org> 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 <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2022-12-15 10:24 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
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 [this message]
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=87cz8lufqn.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).