[MlMt] HTML to Canonical script and replies

Benny Kjær Nielsen mailinglist at freron.com
Wed Dec 4 04:44:52 EST 2013


On 3 Dec 2013, at 23:50, Kee Hinckley wrote:

> On a reply this script is run and then MailMate takes the output and 
> puts the "> " blockquote markers in front of every line. What I'm 
> wondering is of there's any way to selectively turn off the post 
> processing that adds the "> " lines.

Sorry, I don't think there is any way to do that. This is currently 
hardcoded.

> What I'm trying to do (and I'd be happy to know if there's a better 
> way) is make it so that when I reply to certain emails, it includes 
> the HTML of the email instead of converting it. I still want it 
> processed as markdown, so I can add (the dreaded, but required) 
> top-comments. I can't convert the HTML to markdown because it would 
> lose tables and other information and generally upset everyone else at 
> the company, but my manual tests indicate this seems to work fine.
>
> So I made a new version of HTML to Canonical that only fires if I'm 
> replying to email that is tagged with TopReply (and that works 
> great!). And it runs the HTML through tidy, removes the header and 
> footer HTML tags, and wraps it all in blockquote HTML tags. I've got 
> that almost working, but of course I'm still getting the "> " in front 
> of every line, and that's not going to work.

The only “nice” solution to this problem would be to allow you to 
control when MailMate adds the `>` — using the same logic you use to 
select the emails which are going to skip the conversion to canonical 
text. But it would almost be easier to implement your alternative reply 
style. My main problem with that is that the plain text body part is 
going to contain HTML. This could be converted to canonical text though 
(but it's non-trivial to implement).

I'm afraid I'll have to say that I'm not going to do anything until I've 
figured out how to best handle all the problems related to 
replying/forwarding HTML messages. Your solution has the advantage of 
circumventing the need for an HTML editor (which I like) and it would be 
nice to see how well it works in practice, but I'm pretty sure that's 
not going to satisfy all users.

-- 
Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20131204/d63ad7a5/attachment.html>


More information about the mailmate mailing list