update of packages

This commit is contained in:
2023-11-04 19:26:41 +01:00
parent e162a12b58
commit 3b54a3236d
726 changed files with 297673 additions and 34585 deletions

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))
@@ -2484,10 +2507,12 @@ kill-ring."
(defun notmuch-show-stash-mlarchive-link (&optional mla)
"Copy an ML Archive URI for the current message to the kill-ring.
This presumes that the message is available at the selected Mailing List Archive.
This presumes that the message is available at the selected
Mailing List Archive.
If optional argument MLA is non-nil, use the provided key instead of prompting
the user (see `notmuch-show-stash-mlarchive-link-alist')."
If optional argument MLA is non-nil, use the provided key instead
of prompting the user (see
`notmuch-show-stash-mlarchive-link-alist')."
(interactive)
(let ((url (cdr (assoc
(or mla
@@ -2504,12 +2529,15 @@ the user (see `notmuch-show-stash-mlarchive-link-alist')."
(concat url (notmuch-show-get-message-id t))))))
(defun notmuch-show-stash-mlarchive-link-and-go (&optional mla)
"Copy an ML Archive URI for the current message to the kill-ring and visit it.
"Copy an ML Archive URI for the current message to the
kill-ring and visit it.
This presumes that the message is available at the selected Mailing List Archive.
This presumes that the message is available at the selected
Mailing List Archive.
If optional argument MLA is non-nil, use the provided key instead of prompting
the user (see `notmuch-show-stash-mlarchive-link-alist')."
If optional argument MLA is non-nil, use the provided key instead
of prompting the user (see
`notmuch-show-stash-mlarchive-link-alist')."
(interactive)
(notmuch-show-stash-mlarchive-link mla)
(browse-url (current-kill 0 t)))