Hi,

I am a happy user of Tim Pope's matcher extension. URLs are
recognised and clickable, thanks to the two lines in .Xdefaults:

  URxvt.perl-ext-common:         default,matcher
  URxvt.urlLauncher:             sensible-browser

Unfortunately, I get lots of cases when the URL is simply too long
and thus breaks across lines, e.g. it'll show up in the terminal
like this (minus the indent):

  
http://www.nzz.ch/nachrichten/international/chavez_plant_gegengipfel_zum_washing
  toner_g-20-treffen_1.1266498.html

Arguably, this is mutt (in this case) doing the break.

It gets worse when screen or an ncurses interface is running in the
terminal, as then the width of each line is padded with spaces.

I wonder if it's somehow possibly to identify URLs continued on the
next line and include them in the matcher? I think a reasonable
heuristic would be:

Given that in most cases, if a URL is too long, there will also be
a linebreak just before it (or else the URL wouldn't wrap to the
next line), e.g.
  """
  Here is the URL I meant:
  
http://www.nzz.ch/nachrichten/international/chavez_plant_gegengipfel_zum_washing
  toner_g-20-treffen_1.1266498.html

and if the URL extends to the end of the line (ignoring final
whitespace due to ncurses or screen), then scan the next line and if
it matches /^\S+\.\S+/ (that is, a word containing a dot), then add
it to the match without the whitespace.

I am uncomfortable with Perl so I am just describing the idea, not
submitting the probably trivial patch.

Cheers,

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:"; [EMAIL PROTECTED]
 
"das internet wurde konzipiert, um einem atomschlag standzuhalten.
 leider hatte kein militärstratege mit der deutschen telekom
 gerechnet..."
                                                      -- attila radnai
 
spamtraps: [EMAIL PROTECTED]

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)

_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode

Reply via email to