Rendering HTML as Markdown in mutt (was: Creating HTML emails with mutt)

Derek Martin invalid at pizzashack.org
Tue Nov 5 02:01:29 UTC 2019


On Fri, Nov 01, 2019 at 12:21:15PM +1300, martin f krafft wrote:
> Regarding the following, written by "Derek Martin" on 2019-10-31 at 15:39 Uhr -0500:
> > And FWIW, I *was* discussing (very limited, completely text-based)
> > support for HTML messages in Mutt.  I want it, have wanted it for a long
> > time, because all of the available options for dealing with it have
> > serious drawbacks at least some of the time.
> 
> Hey Derek,
> 
> Could you please elaborate a bit on what you're missing?

I and others have already done so, in some cases in some detail,
throughout this thread.


On Thu, Oct 31, 2019 at 06:55:26PM -0600, Akkana Peck wrote:
> That sounds like it's all on the viewing side? I can't speak for
> Derek,

And yet you have done so successfully. :)

> but in addition to viewing HTML messages, I (and others who have
> added to this thread) would like a way to reply without losing the
> formatting.
> 
> The viewing side isn't so hot either. Most terminal programs
> these days can display colors, italics, bold, underline and
> strikethrough (looks like urxvt doesn't do strikethrough and xterm
> doesn't do underline,

Xterm most definitely does underline, though you may need to set a
resource to make it do that. I vaguely recall that some text formats
are rendered using colors or reverse text *by default* but can be made
to do the more correct thing via X resources.  I just don't recall
the specifics... But underline absolutely works, and I can provide a
link to an image if you're not convinced, but suffice it to say, I
just did it.  IIRC italics is the harder thing, as you have to set up
X resources for the italics font face to use, or something like
that... but it all works. 

Hardly anyone uses xterm these days though AFAICT, and configuring it
properly has become a lost art.  In fact, quite a few years ago now, I
filed a bug against xterm in some version of Fedora or even Red Hat,
and Red Hat's support people closed the ticket, complaining that xterm
was obsolete and no longer supported.  (!!!)

> So why do most HTML->text conversion programs ignore styles and
> colors in --dump mode? Is there one that shows styles/colors?

This is most of what I want--with the built-in pager (or an
alternative built-in pager that you could configure Mutt to use via
option).  As others have pointed out there's also trouble parsing long
URLs and such, depending on the tool you're using to do it.  The
console browsers all kinda work for this but each has its own
idiosyncratic edge-case failures.

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20191104/b6c0e368/attachment.asc>


More information about the Mutt-users mailing list