[MlMt] Bug in preserving format=flowed text from external editors?
Philip Paeps
philip at trouble.is
Tue Apr 18 05:10:39 EDT 2017
On 2017-04-18 10:19:51 (+0200), Benny Kjær Nielsen
<mailinglist at freron.com> wrote:
> On 11 Apr 2017, at 13:36, Philip Paeps wrote:
>> MailMate seems to be better at preserving trailing whitespace in
>> replies than in new messages, if that helps.
>
> I think this is because MailMate only strips “extraneous”
> whitespace from non-quoted text.
I can confirm that this is what appears to happen. Text coming in from
the external editor is left alone if it's quoted but stripped of
trailing whitespace otherwise.
>> For instance: I typed this message in Vim but the only way to get the
>> flowed format was to remove hard line breaks in MailMate.
>>
>> Is there a way to configure MailMate not to strip trailing whitespace
>> from buffers messages edited externally? Or perhaps to debug its
>> behaviour when it gets the rewrapping wrong?
>
> I haven't changed anything related to `format=flowed` and external
> editors.
It took me a long time to notice something was going on. :)
> The problem is that MailMate does not expect you to return
> `format=flowed` text. MailMate only considers `format=flowed` to be a
> technique used to “encode” text before sending. And received
> `format=flowed` text is “decoded” before being used in the text
> editor (both built-in and external). In other words, you should never
> hard-wrap the lines of a paragraph -- or if you do then your text
> editor must unwrap them before saving.
Would it be possible to add a setting to MailMate to leave text from an
external editor alone? `MmTrustExternalEditor` perhaps? :)
I noticed MailMate's behaviour when I was composing an email with
sections that had to be hard-wrapped (code fragments) and sections that
needed to flow (surrounding context). The `format=flowed` format allows
for this: terminate lines that should be fixed with `CRLF` and lines
that should be flowed with `SP CRLF`. (I could have used Markdown but
the mailing list I was sending it to is picky about that).
I realise that this is probably not a very common use-case. I can just
write picky mails in Mutt. It doesn't actually come up all that much.
(Aside: if you find yourself near the external editor code, it would
also be helpful if MailMate could have a setting to pass headers to and
from the external editor.)
> You might have noticed that MailMate seems to use `format=flowed` for
> quoted text in its internal editor, but this is a *hack* in order to
> be able to prefix `>` visually. If you resize the window then these
> lines are actually reflowed. (Maybe some day I'll find a better way to
> do that.)
Hah - I hadn't noticed. I don't tend to resize windows much. Nice
trick! :)
> It looks particularly bad if using a proportional font when editing,
> but I do recommend fixed width fonts in the Composer (for readability
> while editing). (The editor font is not used for outgoing emails.)
I use a fixed-width font. :)
Philip
--
Philip Paeps
Senior Reality Engineer
Ministry of Information
More information about the mailmate
mailing list