From: David Bremner Date: Sun, 24 Sep 2023 09:51:49 +0000 (-0300) Subject: emacs: save undisplayer function for MIME parts X-Git-Tag: 0.38.1_pre0~3 X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;ds=sidebyside;h=b1129d905af5643ffec6a19d6cb1cf76abf9d9ce;p=notmuch emacs: save undisplayer function for MIME parts For some kinds of MIME parts (at least images), our trickery with overlays will not work, so save the more drastic function created by Gnus that actually deletes the part from the buffer. In an ideal world we would return this function as (part of) a value, but here the call stack is too complicated for anything that simple, so we stash it in the part plist and rely on that being preserved (unlike the mm handle, which is transient). --- diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 84ba8c5e..a09f4ab8 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -703,6 +703,7 @@ current buffer, if possible." (when (mm-inlinable-p handle) (set-buffer display-buffer) (mm-display-part handle) + (plist-put part :undisplayer (mm-handle-undisplayer handle)) t)))))) ;;; Generic Utilities