notmuch 0.38.1~pre0 release

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEkiyHYXwaY0SiY6fqA0U5G1WqFSEFAmUZU6sACgkQA0U5G1Wq
 FSH2Ig/8C5/aQSdNlcquEsFnSCFlOOUY5+XosmBtN+lisbOB9nQwstUT1uZK6J9t
 Wnh20ypCnGhvaIGpdUN3polIfzulqJoKHe/qYYaOz9LjhlCZzXLrHrjgcZm9FItB
 jJ8TEYN+7Pve7XGkGZmwP+fvtFhWPa+jqqMDKkq6gIAc2pcQDcmuDUKwkOS5my//
 JVGWd0mrbHTWRuW6WvNMa4gjNeJhQ5fmju0i20vZjBExw10NEjRdmMRjbX3IEDqp
 2pFr797/nrLHPqLDccR5hxx/8xhwlxRSdTO1oBndnWiw8sfhpuKgnxRhggLjeQ2T
 QeXuZT/Ps8IpNUp3TNeio1GpkCLZlvKGdutSPN+L27bgH6cOaR+0nhRxnYaTIKHR
 2BeA8RuTj8YSBGuZEGwYw6SF/ZcC90TBXwUazPbDVjPO6TAU2T/pn9oarx/HQ0S7
 3Pqj/As86XdRsEu4s4StOkWNDoED5+knsAZtpRX/Fc50Hlys09n4CAeJYoH6E/39
 AbtUpb+2RR6TC5GkN9UbOhePv8lu3Ghu58xU2zLiNCXkHmRWj5YIniCPLRWK1srR
 rPLqzKMKqFt4P/daqFeVjAV2xXEzRtDmdwt7hoiFwPtZnDOjJ6LRw6Fy+ABjewxx
 XBoOf7oje3KcG9AXUiOq1ej67r+FwN8fRL7MpAnnxBvXRZ45pVA=
 =D47E
 -----END PGP SIGNATURE-----

Merge tag '0.38.1_pre0'

notmuch 0.38.1~pre0 release
This commit is contained in:
David Bremner 2023-10-01 08:12:36 -03:00
commit bd318e7eba
2 changed files with 32 additions and 8 deletions

View file

@ -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

View file

@ -644,8 +644,24 @@ message at DEPTH in the current thread."
(when show
(button-put button :notmuch-lazy-part nil)
(notmuch-show-lazy-part lazy-part button))
;; else there must be an overlay.
(overlay-put overlay 'invisible (not show))
(let* ((part (plist-get properties :notmuch-part))
(undisplayer (plist-get part :undisplayer))
(mime-type (plist-get part :computed-type))
(redisplay-data (button-get button
:notmuch-redisplay-data))
(imagep (string-match "^image/" mime-type)))
(cond
((and imagep (not show) undisplayer)
;; call undisplayer thunk created by gnus.
(funcall undisplayer)
;; there is an extra newline left
(delete-region
(+ 1 (button-end button))
(+ 2 (button-end button))))
((and imagep show redisplay-data)
(notmuch-show-lazy-part redisplay-data button))
(t
(overlay-put overlay 'invisible (not show)))))
t)))))))
;;; Part content ID handling
@ -1019,10 +1035,13 @@ will return nil if the CID is unknown or cannot be retrieved."
(part-end (copy-marker (point) t))
;; We have to save the depth as we can't find the depth
;; when narrowed.
(depth (notmuch-show-get-depth)))
(depth (notmuch-show-get-depth))
(mime-type (plist-get (cadr part-args) :computed-type)))
(save-restriction
(narrow-to-region part-beg part-end)
(delete-region part-beg part-end)
(when (and mime-type (string-match "^image/" mime-type))
(button-put button :notmuch-redisplay-data part-args))
(apply #'notmuch-show-insert-bodypart-internal part-args)
(indent-rigidly part-beg
part-end
@ -1106,14 +1125,18 @@ is t, hide the part initially and show the button."
(and deep button)
(and high button)
(and long button))))
(content-beg (point)))
(content-beg (point))
(part-data (list msg part mime-type nth depth button)))
;; Store the computed mime-type for later use (e.g. by attachment handlers).
(plist-put part :computed-type mime-type)
(if show-part
(notmuch-show-insert-bodypart-internal msg part mime-type nth depth button)
(cond
(show-part
(apply #'notmuch-show-insert-bodypart-internal part-data)
(when (and button (string-match "^image/" mime-type))
(button-put button :notmuch-redisplay-data part-data)))
(t
(when button
(button-put button :notmuch-lazy-part
(list msg part mime-type nth depth button))))
(button-put button :notmuch-lazy-part part-data))))
;; Some of the body part handlers leave point somewhere up in the
;; part, so we make sure that we're down at the end.
(goto-char (point-max))