On Wed, Feb 11, 2026 at 01:12:30AM -0500, Jon LaBadie wrote:
> In another thread it was said:
>
> On Tue, Feb 10, 2026 at 10:23:22AM +0100, Mathias M. wrote:
> >
> > ... . Pretty much everybody sends out HTML mails.
> >
> > So just put this in your mailcap:
> >
> > text/html;w3m -dump %s;nametemplate=%s.html; copiousoutput
> >
> > and this in your .muttrc:
> >
> > auto_view text/html
> >
> > And voila!
>
> I currently read html messages using a macro for F-key 5
>
> macro index,attach <f5> <view-attachments>/html<enter>"|/usr/bin/lynx \
> -stdin -dump 2> /dev/null | less \nq" 'read html message'
>
>
> But I decided to try the auto_view approach. Turned out I already had
> a complex entry for lynx in my mailcap so I used it:
>
> text/html; /usr/bin/lynx -width=$COLUMNS -dont_wrap_pre -dump \
> -force_html -localhost -assume_charset=%{charset} \
> -display-charset=utf-8 %s;nametemplate=%s.html; copiousoutput
>
>
> Works well with one undesired aspect. lynx enumerates each URL
> in the message and creates a "reference list" at the end. Like:
>
> [1]Virginia Auto 976566294
> [2]Contact
> ...
>
> 1.
> http://click.e.progressive.com/u/?qs=eyJkZWtJZCI6IjU3ODQzM2I1LWM4ZjEtNGE1ZC05NjcxLTEwOGRjNjdiYTJiYiIsImRla1ZlcnNpb24iOjEsIml2IjoibWFsMDFmT2Q=
> 2.
> http://click.e.progressive.com/?qs=eyJkZWtJZCI6Ijc1MjEwOGI2LWE5ODItNGE4Yy1iZWRhLTdhN2Y2YTA3MTQzNCIsImRla1ZlcnNpb24iO=
>
> Using the macro When I move the mouse pointer onto the reference,
> the entire multiline URL is selected (underlined) and a middle
> button click opens a new page in firefox.
>
> Using the auto_view approach only the first line of a multiline URL
> is selected and of course that is incomplete.
>
> I'm guessing this different behavior is due to the less pager used
> in the F5 macro. But I would love to hear there is another way of
> turning on the multiline selection.
>
> BTW I mostly use Gnome Terminal in a MATE environment but see the
> same behavior using other terminal emulators.
>
> Thanks,
> Jon
Clicking on the URL is handled by your terminal emulator. This sounds
like mutt is wrapping the output of lynx by inserting newlines. The
terminal emulator can't know that the URL is hard wrapped and will stop
marking the URL at the newline.
>From the first look this sounds like a bug resp. an oversight as
terminal emulators did not make URLs clickable in those days.
I put mutt-dev in Cc:, maybe someone knows more about this. Might be
worth reporting to the issue tracker if no solutions pops up here.