is it possible to have two options for viewing html mail?
raf
mutt at raf.org
Sun Oct 25 22:53:01 UTC 2020
On Sun, Oct 25, 2020 at 12:18:26AM +0000, Globe Trotter via Mutt-users <mutt-users at mutt.org> wrote:
> On Saturday, 24 October at 22:54, Mutt Users wrote:
>
> >> Lots of people send me mail in HTML format (even though I do not like it). I have the following set up in my .mailcap:
> >> text/html; w3m -I %{charset} -T text/html; copiousoutput
> >> so it converts things using w3m more or less okay, however, I am wondering is it possible to have an option for viewing using midori/firefox for the cases where w3m is not enough?
>
>
> > I've got this in my mailcap:
>
>
> > text/html; w3m -I %{charset} -T text/html -dump; copiousoutput; print = qutebrowser %s; nametemplate=%s.html
>
> > To open an email in w3m press Enter, in qutebrowser p or whatever print is bound to. You can adapt this for firefox.
>
> > Hope that helps.
> > Regards Wim
>
> --
> |\ _,,,---,,_
> ZZZzz /,`.-'`' -. ;-;;,_
> |,4- ) )-,_. ,\ ( `'-'
>
> '---''(_/--' `-'\_)
>
>
> This solution does exactly what I want. I wanted to use midori, so I replaced qutebrowser with midori and it works.
>
> Is it possible to have multiple options? So, in case midori did not cut it, I would use firefox instead?
>
> TIA!
Rather than invoking actual browsers directly, you
could write a script that presented you with a list of
options, and you enter your choice. That way, you could
have more that two options. If always having to select
a browser manually is too inefficient, you could
continue to invoke w3m when viewing html, and invoke
this menu-based browser chooser when "printing" html.
cheers,
raf
More information about the Mutt-users
mailing list