Fix image toggling for emacs 29.1

Subject: Fix image toggling for emacs 29.1

Date: Sat, 16 Sep 2023 20:51:33 -0300



From: David Bremner

This obsoletes the WIP patch at

The main changes are breaking the patch up into more managable pieces,
and only saving redisplay data for images.

I am more or less satisfied with the performance impact of this
change. I ran the following test before and after and didn't see a
noticable impact in memory use (in fact it seemed to go down in some
cases, which is a mystery to me).

(profiler-start 'mem)
(notmuch-show "mimetype:image and date:2023")

More scientific testing or personal experience welcome. And of course
I'd like to know if this breaks, the code I'm modifying is fairly
complex and has accreted over a decade or so.

notmuch mailing list --
To unsubscribe send an email to