3

I would like to read multpart (html and alternative text together) text/plain first.

So, I set muttrc as follow:

.mutt/muttrc
auto_view text/html
alternative_order text/plain text/html

and mailcap as:

.mutt/mailcap
text/html; lynx -force_html -assume_charset=gbk -assume_local_charset=gbk /
 -assume_unrec_charset=gbk -display_charset=utf8 -dump -force_html '%s'; /
 description="HTML Text"; nametemplate=%s.html; copiousoutput

This is ok and mutt read text plain first when message have only text plain or both, html end text plain.

However, some messages have html and a single and sort alternate text plain said "your mailreader don't support html message". in this case, I need to hint "v" and select alternate html and hint enter to read the message.

If I change muttrc to:

2
  • Change it to what? Sep 9, 2019 at 3:25
  • “If I change muttrc to:” What? Jan 9, 2020 at 21:11

2 Answers 2

0

For this case you can use message-hooks - just add them to your config file.

From neomutt manual:

message-hook pattern command

Before NeoMutt displays (or formats for replying or forwarding) a message which matches the given pattern (or, when it is preceded by an exclamation mark, does not match the pattern ), the given command is executed. When multiple message-hook s match, they are executed in the order in which they occur in the configuration file.

See example below:

message-hook 'PATTERN' "unalternative_order *; alternative_order text/html text/plain"

That would change alternative order to text/html for matching pattern. Pattern can be anything described in Pattern modifiers section of the manual. See mutt manual or neomutt manual.

To test if your pattern works as expected try in running instance of neomutt in a mailbox containing the tested message. For example: l<enter>~s Mysubject<enter>should limit the mailbox to display just e-mails matching subject Mysubject

0

In neomutt this can be done with the show_multipart_alternative setting:

auto_view text/plain text/utf-8 text/html
alternative_order text/plain text/html
set show_multipart_alternative=inline

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .