José María Mateos <ch...@rinzewind.org> wrote on Thu, 18 May 2023
at 20:41:49 EDT in <zgbfzr2jpdk9c...@rinzewind.org>:

> That works (I have to remove a "bind attach <Return> view-mailcap" I have in 
> my .muttrc),

Well, ironically, doesn't that do want you want, almost? I guess it depends on 
your mailcap. (see below)

> but opens the view outside of the pager. Would there be a way to
> have that inside the pager, as one would normally get when
> prioritizing text/html in alternative_order?

You can also hit "m" instead of RET to get view-mailcap which ought to view -- 
oh, in your case that's set for Firefox.

If you want the pager you need to run <view-pager>. That doesn't have a default 
binding, so you could
  :exec view-pager
but probably you want to bind it to a key.

That does require you to have a "copiousoutput" entry in your .mailcap for 
HTML. I have

text/html;w3m -o display_image=0 -T %t; copiousoutput

which works well enough. YMMV.

> > Or alternatively, you could create a macro to do the same, although I'm not 
> > sure it's worth the bother?
> 
> A member of the list provided a macro to open the first HTML attachment on 
> Firefox and I've been
> using it for a while.

of course, that macro is agnostic as to Firefox. It just opens it in whatever 
your mailcap specifies.

> macro index,pager ,b "<view-attachments>/html<enter><view-mailcap><exit>" 
> "View first HTML attachment in browser"
> 
> I guess something similar could be done here.

Yes, you can search for html with /html instead of hitting <down><down>.

Honestly I'm not sure this happens enough to be worth automating into a macro, 
teaching your brain to hit 'jj' is pretty easy and arguably a better and more 
flexible and adaptive solution. But up to you!

--
jh...@alum.mit.edu
John Hawkinson

Reply via email to