News for hackers. Stuff that matters.
Re:Mutt 1.7.0 released by contingencies on Saturday August 20, 2016 @03:24AM (#12325589)
I wish we had something like Markdown for email--to me that would be the sweet spot between the mess HTML email has become, and plain text which sometimes does lack in its ability to communicate information.

I don't use mutt but IIRC a basic feature of both mutt and similar (pine + variants, etc.) is allowing you to define your own external editor. Therefore, there's nothing to stop you adding a wrapping pipeline to that so that, for example, first you edit normally in your preferred editor, and second an established piece of code or basic series of regex replaces your markdown with whatever you actually want. Optionally, the reverse runs before editing. This should not take longer than a few hours on the outside to get running comfortably.

Re:Mutt 1.7.0 released by astrobe_ on Saturday August 20, 2016 @08:17AM (#12326230)
I think you are solving the wrong problem.

The problem isn't HTML, it is its users. People who can't quote properly, people who end every single sentence with an emoji, etc. In a nutshell, people who have never experienced Usenet never learned how to communicate properly with a keyboard.

The fix for this is to configure your email client to auto-answer a rejection message when it receives anything other than plain text. You can always blame your antivirus for that.

Help people with disabling HTML email. With a little bit of luck, they won't remember how to enable it again. And hopefully, since they won't be distracted any more with fancy formatting, animated smiley and which GIF-meme-to-use-for-this, hopefully they'll focus on words and reinvent ascii art.

Re:Mutt 1.7.0 released by Steltek on Saturday August 20, 2016 @10:32AM (#12326759)
Is this kind of condescending, elitist remark destroying one of the few last redeeming qualities of email? That everyone can talk to everyone else outside of walled gardens?

Don't get me wrong, I'm a big fan of plaintext email (and use mutt at work) but it's not practical to expect the world to bend to your own narrow choices in technology so harshly. The attitude displayed here is, quite frankly, disgusting.

Re:Mutt 1.7.0 released by kstrauser on Saturday August 20, 2016 @12:28PM (#12327230)
That's nice, grandpa. I'm probably physically older than you, but I mostly commonly see your attitude when I'm sipping beer with old vets down at the Elks lodge.

Just because we invented and pioneered the early 'net doesn't mean we own it. Things change and usage patterns evolve as people join and leave the medium. Email today is a medium for HTML and emojis for almost everyone using it, except for the curmudgeons. We don't get to define "communicates properly".

Don't be a curmudgeon. This isn't "our" system anymore, if it ever was at all.

Re:Mutt 1.7.0 released by dredmorbius on Sunday August 21, 2016 @06:13AM (#12330264)
I get the frustration. But I think that war's been lost.

Within a given organisation (if you're exceptionally lucky), or on some mailing lists, you might be able to enforce discipline. At large, though, this mostly doesn't scale.

I think it's unfortunate -- there's a very strong degree to which standards of message formatting are useful and helpful. And, in counterpoint to much of the disagreement to your point, it's not as if a bunch of Unix geeks in the 1970s and 1980s started the concept -- go through any "how to succeed in business without really trying" manual from the 1920s through 1970s, and you'll find strongly specified guides on how you are to type and format your business correspondence (using your monospace Royal, or later, IBM Selectric, typewriter). And deviations from those standards were not appreciated.

But until and unless some Hand of God comes down and enforces discipline again, we're in our current State of Babel.

On the other hand, client quirks are so common now that configuring you email stream to:

1. Render all incoming messages as flat, 72-character, ASCII

2. Outputing messages with same, '> ' quoting, etc., etc., is pretty much perfectly justifiable.

"Oh, my email doesn't handle attachments or binaries, I'm sorry."

If you are in a position to ensure people talk to you on your terms, so much the better. I can approach that, but there are sacrifices to be made.

Re:Mutt 1.7.0 released by gnuarch on Saturday August 20, 2016 @09:21AM (#12326457)
Many people use Android Mail which cannot send mail in text/plain if i understand correctly https://code.google.com/p/android/issues/detail?id=8712
Re:Mutt 1.7.0 released by apatters on Saturday August 20, 2016 @04:14PM (#12328138)
With all due respect: your approach here is to tell a billion people to jump over the Grand Canyon or kiss your ass and die.

My approach is to go as far as I must to meet them halfway because I know I wasn't born perfect either.

Engineers are brilliant in ways that are rare, valuable and admirable. But they don't tend to have a great level of empathy and trust me, it's something worth cultivating.

Re:Mutt 1.7.0 released by astrobe_ on Saturday August 20, 2016 @05:56PM (#12328439)
I see every day people being owned by phishing and malware and their privacy compromised because they are accepting HTMaiL.

I've heard people complaining about email conversations that they can't understand any more because every one used together top-posting, bottom posting, coloured inline replies and no trimming.

I want this madness to end. If it isn't empathy, what is it?

It's no different than telling billion people to stop using Flash or kiss a specific part of my body and rest peacefully. Except perhaps that we are a few anonymous "disgusting elitist curmudgeons" instead of being huge internet companies.

Re:Mutt 1.7.0 released by chongli on Saturday August 20, 2016 @04:52AM (#12325767)
How about using Pandoc[0] as part of your wrapping pipeline? It supports the full round trip between markdown, HTML, and back. Seems like this would be a perfect use case for it.

[0] http://pandoc.org

Re:Mutt 1.7.0 released by RaitoBezarius on Saturday August 20, 2016 @07:46AM (#12326138)
This is insanely brilliant. I am now happy to use Mutt again.
Re:Mutt 1.7.0 released by nextos on Saturday August 20, 2016 @09:02AM (#12326377)
Yeah, I came here to suggest pandoc too.

You can easily script mutt to include a plaintext file and an html one generated by pandoc, so that people reading your emails can fall back to a plain text version of your mails in case they can't view html.

Re:Mutt 1.7.0 released by atsaloli on Saturday August 20, 2016 @10:20AM (#12326713)
If you folks have already done the legwork on this, could you please publish your setup?
Re:Mutt 1.7.0 released by tmerse on Saturday August 20, 2016 @04:21PM (#12328163)
Here is what I use.

  # convert markdown to html via pandoc
  # https://unix.stackexchange.com/questions/108485/send-    email-written-in-markdown-using-mutt
  macro compose \e5 "F pandoc -s -f markdown -t html \ny^T^Utext/html; charset='utf-8'\n"
Re:Mutt 1.7.0 released by atsaloli on Saturday August 20, 2016 @06:37PM (#12328562)
Thanks!
Re:Mutt 1.7.0 released by tome on Saturday August 20, 2016 @10:49AM (#12326835)
Yes please! This sounds intriguing. I send plain text only from mutt but including HTML from Markdown via Pandoc would be very cool.
Re:Mutt 1.7.0 released by apatters on Saturday August 20, 2016 @03:38AM (#12325616)
I can't believe I never thought of this! Brilliant idea. Now just to solve the viewing problem...
Re:Mutt 1.7.0 released by tmerse on Sunday August 21, 2016 @03:43AM (#12329881)
For some HTML mails, it is sufficient to use a mailcap file in combination with lynx or w3m:

  # ~/.mutt/mailcap
  text/html; w3m -I %{charset} -T text/html; copiousoutput;

  # ~/.muttrc
  alternative_order text/plain text/enriched text/html  # save html for last
  auto_view text/html
If you want the full HTML experience, you can use this script [1], which uses python (there also is an older bash version) to convert the mail into standalone html to be viewed inside a browser.

  # ~/.muttrc
  macro index,pager M "<enter-command>unset resolve<enter><clear-flag>N<enter-command>set resolve<enter><pipe-message>viewhtmlmail\n" "View HTML in browser"
1: https://github.com/akkana/scripts/blob/master/viewhtmlmail
Re:Mutt 1.7.0 released by contingencies on Saturday August 20, 2016 @03:51AM (#12325649)
The reverse should work for simple HTML.

For complex HTML to plain text try https://www.google.com/search?q=lynx+convert+html+text .. most text browsers can do a reasonable job of it.

Re:Mutt 1.7.0 released by Steltek on Saturday August 20, 2016 @10:36AM (#12326776)
Using lynx (or elinks, in my case) to view HTML email in mutt is the historical solution. I think the desire here is for a reversible transformation. E.g. I can receive an HTML email, view it as Markdown, reply using Markdown, and then send an HTML email in reply.

Unfortunately, I think foreign email clients would mangle the HTML just enough to stop this from working. You'd have to start implementing a tag soup type parser to coax incoming mail into something intelligible.

Re:Mutt 1.7.0 released by dredmorbius on Sunday August 21, 2016 @06:04AM (#12330246)
We're almost at that stage with HTML already.

I'm thinking that a multi-pass parser:

1. Is this sane HTML5 markup? I'll eat that.

2. Is this a borked-but-manageable variant? Strip the cruft.

3. Is this Beyond All Hope? Just dump it as ASCII. It'll be blockquoted in reply.

HTML is no longer a peresistent, stable, or universal interchange format.

Re:Mutt 1.7.0 released by nextos on Saturday August 20, 2016 @10:11AM (#12326680)
Well you can use pandoc too or w3m.