Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #240030

Re: Mutt/Neomutt and mailcap

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: Mutt/Neomutt and mailcap
Date 2021-09-16 04:40 +0200
Message-ID <CXPtD-DD-1@gated-at.bofh.it> (permalink)
References (1 earlier) <CXFkB-2S3-3@gated-at.bofh.it> <CXHmp-43N-1@gated-at.bofh.it> <CXHFM-4py-17@gated-at.bofh.it> <CXIBQ-4Yd-9@gated-at.bofh.it> <CXKDD-69s-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed 15 Sep 2021 at 16:21:12 (-0500), Nate Bargmann wrote:
> * On 2021 15 Sep 14:20 -0500, tomas@tuxteam.de wrote:
> > On Wed, Sep 15, 2021 at 02:01:23PM -0400, Greg Wooledge wrote:
> > > On Wed, Sep 15, 2021 at 12:58:10PM -0500, Nate Bargmann wrote:
> > > > * On 2021 15 Sep 10:44 -0500, Jonathan Dowland wrote:
> > > > > What does this command report?
> > > > > 
> > > > >     ;see --norun application/octet-stream:/dev/null
> > 
> > > Jonathan's message confused me too.  As far as I can tell, "see" is
> > > a *shell* command, not a mutt command [...]
> > 
> > Perhaps the semicolon was intended to be an exclamation mark (!)
> > (although, assuming Jonathan has a USish keyboard layout they are
> > far apart indeed).
> 
> Indeed!  That works.
> 
> I missed it in the help list as my mind was fixated on the ;.  Other
> programs like Vim use ! as a means to execute a shell command.
> 
> It should have been so obvious...

I think what your system is doing is as follows:

You probably have in your (default) /etc/Muttrc:

  # 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.

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.

Cheers,
David.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Mutt/Neomutt and mailcap Nate Bargmann <n0nb@n0nb.us> - 2021-09-15 15:40 +0200
  Re: Mutt/Neomutt and mailcap Jonathan Dowland <jon+debian-user@dow.land> - 2021-09-15 17:50 +0200
    Re: Mutt/Neomutt and mailcap Nate Bargmann <n0nb@n0nb.us> - 2021-09-15 20:00 +0200
      Re: Mutt/Neomutt and mailcap Greg Wooledge <greg@wooledge.org> - 2021-09-15 20:20 +0200
        Re: Mutt/Neomutt and mailcap Nate Bargmann <n0nb@n0nb.us> - 2021-09-15 20:20 +0200
        Re: Mutt/Neomutt and mailcap <tomas@tuxteam.de> - 2021-09-15 21:20 +0200
          Re: Mutt/Neomutt and mailcap Nate Bargmann <n0nb@n0nb.us> - 2021-09-15 23:30 +0200
            Re: Mutt/Neomutt and mailcap David Wright <deblis@lionunicorn.co.uk> - 2021-09-16 04:40 +0200
              Re: Mutt/Neomutt and mailcap <tomas@tuxteam.de> - 2021-09-16 08:30 +0200
              Re: Mutt/Neomutt and mailcap Nate Bargmann <n0nb@n0nb.us> - 2021-09-16 12:40 +0200
                Re: Mutt/Neomutt and mailcap David Wright <deblis@lionunicorn.co.uk> - 2021-09-19 06:50 +0200
        Re: Mutt/Neomutt and mailcap Jonathan Dowland <jon+debian-user@dow.land> - 2021-09-16 09:50 +0200
          Re: Mutt/Neomutt and mailcap <tomas@tuxteam.de> - 2021-09-16 11:10 +0200
          Re: Mutt/Neomutt and mailcap Greg Wooledge <greg@wooledge.org> - 2021-09-16 13:50 +0200
            Re: Mutt/Neomutt and mailcap Jonathan Dowland <jon+debian-user@dow.land> - 2021-09-18 00:30 +0200
  Re: Mutt/Neomutt and mailcap Andrei POPESCU <andreimpopescu@gmail.com> - 2021-09-16 09:40 +0200
    Re: Mutt/Neomutt and mailcap Nate Bargmann <n0nb@n0nb.us> - 2021-09-16 12:10 +0200

csiph-web