[mu4e bug] MIME-part prefixed action broken
Describe the bug
Prefix on MIME-part actions (<Number> A or C-u <Number> A) doesn't work anymore.
Before upgrade: 4 A o on a message with 4 attachments would open the 4th MIME attachment, as described in the documentation.
After upgrade: 4 A already prompts MIME-part(s) to operate on:
How to Reproduce
emacs -Qwith minimal configuration- view a message with attachments
4 Aprompts for MIME-part(s) to operate on
Prefixed functions seem to work otherwise fine in emacs.
I think this regression was introduced in 993f1652, where mu4e-view-mime-part-action lost its prefix part:
(interactive "NNumber of MIME-part: ")
;; became:
;; (interactive
;; (list (read-number "Number of MIME-part: ")))
(interactive)
I see the intent is to now support multiple parts. I would happily provide a PR but I'm unsure of the best approach: should we go with
(interactive "p") ;; p -- Prefix arg converted to number. Does not do I/O.
and fallback to reading from the minibuffer?
Environment
Arch linux, emacs 29.4, mu 1.12.6. Unfortunately I don't have traces of the previous mu version.
Checklist
- [x] you are running either an 1.10.x/1.12.x release or
master(otherwise please upgrade) - [x] you can reproduce the problem without 3rd party extensions (including Doom/Evil, various extensions etc.)
- [x] you have read all of the above
Thank you!
Oh I realize we're already checking if an argument was provided when computing ids. So I guess what's left is only
(interactive "P") ; P -- Prefix arg in raw form. Does not do I/O.
At least that's resulting in the expected behavior.
Yeah, that should do the trick I think. I'll install that, and mention you in the commit message. Thank you!