I'm currently working with mutt to get it to display HTML mail properly. I've set up auto_view and a w3m invocation in the mailcap, and this works fine.

However, the URLs for links in received mail are often longer than the width of my terminal window. This makes clicking them inconvenient, because they become split across multiple lines, and I have to manually reconstruct the original URL before I can copy it to the browser.

I've set $markers to off, which successfully removes the plus sign marking a wrapped line. However, mutt is still wrapping the lines on its own (presumably just by echoing \n, since that's what I get on a copy), so it's still inconvenient to get the link.

Is there a way to tell mutt to disable wrapping completely, and just let the terminal emulator handle it? This would allow the links to be copied in one operation. There doesn't seem to be such an option for the $wrap variable; I've tried setting $wrap to far wider than the terminal width, but this doesn't work.

  • What does $wrap=0 do for you? – tink Dec 24 '18 at 1:31
  • 1
    This is what extract_url was written for. – jasonwryan Dec 24 '18 at 1:56
  • @tink 0 is the default, isn't it? In any case, it's the same behavior, unhelpful. – Tom Hunt Dec 24 '18 at 6:00
  • @jasonwryan Sadly, the machine running mutt is remote of the machine running my browser, and can't access it. Copy-and-paste from the terminal emulator is the only good way I've found to open a URL. – Tom Hunt Dec 24 '18 at 6:01
  • Well, it would still make sense to write a macro to use extract_url to write the URLs to a file that you can then open locally... – jasonwryan Dec 24 '18 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.