Re: [nmh-workers] multipart/related and -prefer.
>Typically, the text/plain and text/html are children of the same >multipart/alternative, but here Apple thinks text/plain means images >aren't required. Perhaps revenge for my never having purchased an Apple >product. Ralph, as far as I can tell ... nmh is doing exactly what you asked. You told it, "Hey, if you run across a multipart/alternative, please give me the text/plain version in preference to all others". And that's exactly what happened. And this isn't just an Apple problem; like Steffen said, this is common in the Microsoft world as well (I see it all of the time when it comes to calendar invites; I just see the text/plain version, but all of the calendar stuff is part of multipart/mixed content). I think the use of multipart/related is a red herring here. This would require a lot of special-case code; you'd need to say, "Okay, if if the other alternative type is a multipart/foo, AND the first type of that is a text/html, then give me the text/plain part and then all of the other parts after the text/html". That seems fragile, at least in the core code. I think with my pie-in-the-sky "new MIME" architecture you could write a helper script in the "part selector" phase that would encompass that logic. But right now I think you're going to have to engage your brain. --Ken -- nmh-workers https://lists.nongnu.org/mailman/listinfo/nmh-workers
Re: [nmh-workers] multipart/related and -prefer.
Ralph Corderoy wrote in <20180731135013.d6e8b21...@orac.inputplus.co.uk>: ... |I recently read this `Apple Mail' email with mhshow, read the |plain/text, and it wasn't apparent to me there were images too. ... |$ mhlist -nov -prefer text/plain | msg part type/subtype size description |32753 multipart/alternative6185K | 1 text/plain 134 | 2 multipart/related6184K | 2.1 text/html 721 | 2.2 image/jpeg 2176K | 2.3 image/jpeg 2401K |$ | |Typically, the text/plain and text/html are children of the same |multipart/alternative, but here Apple thinks text/plain means images |aren't required. Perhaps revenge for my never having purchased an Apple |product. I would not blame Apple, i have seen this from mailers in the Microsoft world a lot over three years ago, but i have not yet found any time to complete something first committed on 2015-09-19 FIXME [mimepipe.3] *mime-alternative-favour-rich*: honour /related.. Especially in the Microsoft world we can see /alternative messages which have a whole bunch of /alternative parts collected in a single /related part, i.e., alternative text/plain multipart/related whole bunch of parts, e.g., HTML, images, etc. We want to print the entire /related part when used as an alternative. Recursive descendent MIME parsers really suck. --steffen | |Der Kragenbaer,The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) -- nmh-workers https://lists.nongnu.org/mailman/listinfo/nmh-workers
[nmh-workers] multipart/related and -prefer.
Hi, My .mh_profile has `mhshow: -prefer text/plain', but nothing for mhlist. I recently read this `Apple Mail' email with mhshow, read the plain/text, and it wasn't apparent to me there were images too. $ mhlist -nov msg part type/subtype size description 32753 multipart/alternative6185K 1 multipart/related6184K 1.1 text/html 721 1.2 image/jpeg 2176K 1.3 image/jpeg 2401K 2 text/plain 134 $ My -prefer is re-ordering parts 1 and 2, as I can show with mhlist. $ mhlist -nov -prefer text/plain msg part type/subtype size description 32753 multipart/alternative6185K 1 text/plain 134 2 multipart/related6184K 2.1 text/html 721 2.2 image/jpeg 2176K 2.3 image/jpeg 2401K $ Typically, the text/plain and text/html are children of the same multipart/alternative, but here Apple thinks text/plain means images aren't required. Perhaps revenge for my never having purchased an Apple product. I can select the text/html in this case with $ mhlist -nov -prefer text/plain -prefer multipart/related msg part type/subtype size description 32753 multipart/alternative6185K 1 multipart/related6184K 1.1 text/html 721 1.2 image/jpeg 2176K 1.3 image/jpeg 2401K 2 text/plain 134 $ to specify my favourite last. That shows me the text/html and I get the one-line summaries of the JPEGs so I know they're there. nmh doesn't mention multipart/related AFAICS, saying all unknown multipart are treated as multipart/mixed. Any thoughts or suggestions as to how we should show text/plain and summarise the two JPEGs? -- Cheers, Ralph. https://plus.google.com/+RalphCorderoy -- nmh-workers https://lists.nongnu.org/mailman/listinfo/nmh-workers