Parsing URLs (was: Xterm/urxvt for mutt)

martin f krafft madduck at madduck.net
Tue Nov 5 19:33:10 UTC 2019


Hey there,

Even with a good XTerm config, ncurses still gets in the way of long 
URLs, and the sidebar patch completely breaks them. I don't think 
this can be solved from the xterm, and requires either an external 
tool such as urlview/urlscan (which break the flow), or would need 
to be done within mutt, in similar ways to what plugins do for 
irssi:

1. internal pager scans content for URLs, marks them up with unique 
    identifiers, e.g. `[1]https://mutt.org` or similar;

2. mutt learns a command `view-url-by-id`, which prompts for a 
    number and spawns mailcap on the URL.

3. Additional or alternative commands could be:

    `view-urls`

    : Print a list of URLs from the current buffer, maybe with 
      navigation options like urlview

    `select-url`

    : Highlight the first URL in view, skip to prev/next on up/down 
      arrow, and invoke mailcap when enter is pressed.

Probably not too hard. But yeah, would need to be done… ;)

-- 
@martinkrafft | https://riot.im/app/#/room/#madduck:madduck.net
  
"one should never allow one's mind
  and one's foot to wander at the same time."
                               -- edward perkins (yes, the librarian)
  
spamtraps: madduck.bogus at madduck.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20191106/7ec1348a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: digital_signature_gpg.asc
Type: application/pgp-signature
Size: 1187 bytes
Desc: Digital GPG signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20191106/7ec1348a/attachment.asc>


More information about the Mutt-users mailing list