On 5 Jun 2014, at 16:47, Sherif Soliman wrote:
I had to pull the test version. The fix has broken the display of
plain text messages on Mavericks for several users. It works for me
though and I haven't yet figured out what makes it fail for other
users, but I'm looking into it.
If this is going to prompt a rewriting of the decoding and
re/deflowing scripts,
It didn't :-)
I'd like to bring up something I think I did once in the past.
Replying to some emails (I think mostly ones sent from Gmail accounts)
always changes the text from flowing until it finds a newline
character to being hard wrapped to a certain line width. As in, it
introduces newline chars to make lines and paragraphs a lot shorter
than what the window width would make them, and they do not wrap
around as I resize the window. This also remains the case after the
reply is sent and I look at the reply message in browser.
(I wanted to attach a screenshot, but Distortion mode doesn't distort
email body content apparently).
I think Benny said that it was specific to replies to messages from a
Gmail account. A proposed workaround was to select all the text and
then reply, which for some reason did reflow the text as one would
want/expect. However, that workaround is a hassle, and it introduces
strange added empty lines/newline characters.
That strangeness is exactly why it's not the default behavior. The
problem is that Gmail messages hard-wrap the plain text body part of a
message. Every HTML message must have an equivalent plain text body
part. This is what is used by MailMate when replying, because handling
HTML is, in general, an error-prone heuristic game which is hard to win.
Note that when a user tells Gmail to send plain text only then the
message is still hard-wrapped. This is, in my opinion, horribly
primitive.
Is there any chance that this is going to fixed in the near future?
I never promise anything, but it would be nice to improve because Gmail
is ubiquitous (and I really dislike hard-wrapping). The best/proper fix
would be if Gmail started to support `format=flowed`, but I asked them
to do that years ago and I guess it's unlikely to happen. MailMate can
work around the issue in three bad ways:
* Heuristically unwrap the plain text body part. Problem: Some times
MailMate is going to unwrap something which shouldn't have been
unwrapped.
* If present, convert the HTML body part to plain text. Problem: There
is really no way to be sure how Gmail uses HTML and it could change at
any time.
* A combination of the above. Base it on plain text and use the HTML
text as a hint with respect to line wrapping. Problem: Non-trivial but
probably the best approach.
If no HTML body part is present in the message then only the first
option is viable. Option 1 would require some way to disable this
behavior. Option 3 would probably be quite safe. None of the options are
specific to Gmail, but could work for emails generated by other
hard-wrapping email clients as well.
That's my thoughts on the issue. New ideas are welcome, especially if
I've overlooked the obvious perfect solution.
For the record, that problem did not happen in the reply to this
message.
That's because you replied to a message written in a proper email client
which does not hard-wrap plain text ;-)
--
Benny
_______________________________________________
mailmate mailing list
mailmate@lists.freron.com
http://lists.freron.com/listinfo/mailmate