On Tue, Oct 29, 2019 at 10:15:22PM +1300, martin f krafft wrote:
Regarding the following, written by "Kevin J. McCarthy" on 2019-10-29 at 12:58 Uhr +0800:instead of the script returning content of a specific type, and thus always with the same content type (unless the filter script is interactive of sorts), what about a command or option that I can use to instruct mutt to generate an alternative of a given MIME type, which is then passed to the script, and the return data assumed as such.
I'll think about it, but that may be more designing than I can bite off right now.
Because the filter is configurable via a variable, you could certainly have a compose menu macro to change the value of the variable, combined with visual feedback from the :echo command. The variable should also be able to accommodate a parameter (set by you).
It may be a bit more trouble for you the add the mime type + blank line in the output, but I think it gives more flexibility. If others have opinions, please chime in though!
Now, I could configure mutt to always add a text/html alternative, but also have a command from the compose menu allowing me to add e.g. text/enriched, or application/pdf.
Note also, this iteration is only going to be able to generate a single alternative.
Yes, this is one of the places I need to look at. My plan is the simplest, as you mentioned: discard the alternative when generating anything that goes through the compose menu.… but not on messages that are being forwarded as attachments. Those don't get touched, right?
Sorry, I got confused. If we're talking about $mime_forward, then no, it shouldn't get touched. $forward_attachments (version 1.12+) runs through the decoder though. I think the places I have to worry about are templates and resuming, but I need to look more closely.
I'll be working on this in the 'kevin/multipart-alternative' branch, but just fyi that I force-push to my development branches, and they are usually "work in progress".
-- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
Description: PGP signature