mu4e-view: add mu4e-view-jump-to-mime-part

This allows for jumping to the MIME-part by number; a thin wrapper over
the Gnus functionality.
This commit is contained in:
Dirk-Jan C. Binnema
2024-12-09 21:02:33 +02:00
parent 18fe56a742
commit 1e940c81e8
2 changed files with 11 additions and 0 deletions

View File

@ -853,6 +853,11 @@ Note that for some messages, this can trigger high CPU load."
(list handle attendee))
handle-attendee))
(defun mu4e-view-jump-to-mime-part (number)
"Jump to MIME-part with NUMBER."
(interactive "P")
(call-interactively #'gnus-article-jump-to-part number))
(defun mu4e--view-mode-p ()
"Is the buffer in mu4e-view-mode or one of its descendants?"
(or (eq major-mode 'mu4e-view-mode)
@ -925,6 +930,7 @@ This is useful for advising some Gnus-functionality that does not work in mu4e."
(define-key map "a" #'mu4e-view-action)
(define-key map "A" #'mu4e-view-mime-part-action)
(define-key map "e" #'mu4e-view-save-attachments)
(define-key map "J" #'mu4e-view-jump-to-mime-part)
;; change the number of headers
(define-key map (kbd "C-+") #'mu4e-headers-split-view-grow)

View File

@ -1420,6 +1420,7 @@ e extract (save) one or more attachments (asks for numbers)
(or: <mouse-2> or S-RET with point on attachment)
a execute some custom action on the message
A execute some custom action on the message's MIME-parts
J jump to MIME part by its number
misc
----
@ -1475,6 +1476,10 @@ even clearer by indicating them in the message itself, using:
(setq gnus-unbuttonized-mime-types nil)
@end lisp
Note that you can jump to the relevant MIME-parts using
@code{mu4e-view-jump-to-mime-part}, which ask for the number or uses the
prefix-argument.
@subsection Inline images
When you run Emacs in graphical mode, by default images attached to
messages are shown inline in the message view buffer.