* On 2021 15 Sep 21:36 -0500, David Wright wrote: > I think what your system is doing is as follows: > > You probably have in your (default) /etc/Muttrc:
In my case, /etc/neomuttrc, and the following does exist. My assumptions have been that the system RC is ignored when a user's RC exist. I am finding this is not entirely true in all cases. > # Use mime.types to look up handlers for application/octet-stream. Can > # be undone with unmime_lookup. > mime_lookup application/octet-stream > > That sends mutt looking in /etc/mime.types where it finds the line: > > text/x-diff diff patch > Your attachment had the extension ".patch", so it searches your > and the system's mailcap files for "text/x-diff", fails to find it, > and eventually hits the default entry: > > text/*; less '%s'; needsterminal > > which it obeys. Exactly, and is followed immediately by: text/*; view %s; edit=vim %s; compose=vim %s; test=test -x /usr/bin/vim; needsterminal which I have now added to ~/.mailcap as: text/x-diff; view %s; edit=vim %s; compose=vim %s; test=test -x /usr/bin/vim; needsterminal and now the offending attachment is opened in Vim from the view attachments screen when I press Enter on it. > BTW, your shell command, > > !see --norun application/octet-stream:/dev/null > > will give you an answer in the context of a subshell, and > not necessarily in the context of mutt itself. For example, > on my shell: > > $ see --norun text/html:/dev/null > /usr/bin/sensible-browser /dev/null > $ > > but the special mailcap prioritised by my mutt defines: > > text/html; /usr/bin/lynx -force-html -localhost -stdin > > and any subshell would know nothing about that. > > About the ";", it could also be an accidentally unshifted ":", > and it might be easy to mis-remember: > > ":" is mutt's keystroke for entering mutt commands, whereas > "!" is mutt's keystroke for entering shell commands. Thanks for the helpful pointers through the maze! The problem is that I visit something like this once about every several years and it's all new again. Sigh... Finally, the Web mailer that assigned application/octet-stream may not be that far off if it is assuming the recipient's MUA and MIME handling is configured correctly, which it actually is. I was just a bit annoyed at the end result and now I have it set per my preference. - Nate -- "The optimist proclaims that we live in the best of all possible worlds. The pessimist fears this is true." Web: https://www.n0nb.us Projects: https://github.com/N0NB GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819
signature.asc
Description: PGP signature