How can I make browse-url
follow URLs with line breaks?
Example from RFC 1738:
Yes, Jim, I found it under <URL:ftp://info.cern.ch/pub/www/doc;
type=d> but you can probably pick it up from <URL:ftp://ds.in
ternic.net/rfc>. Note the warning in <URL:http://ds.internic.
net/instructions/overview.html#WARNING>.
Example from RFC 3986, which updates 1738:
Yes, Jim, I found it under "http://www.w3.org/Addressing/",
but you can probably pick it up from <ftp://foo.example.
com/rfc/>. Note the warning in <http://www.ics.uci.edu/pub/
ietf/uri/historical.html#WARNING>.
Update
I just played around a bit. For parsing URLs prefixed with URL:
, there is a regexp stored in thing-at-point-markedup-url-regexp
. By default, it excludes line breaks. I changed it to:
"<URL:\\([^<>]+\\)>"
Furthermore, the function thing-at-point--bounds-of-markedup-url
, which parses these strings, also excludes line breaks. This can be fixed by changing:
(and (re-search-forward thing-at-point-markedup-url-regexp
end 1)
to:
(and (re-search-forward thing-at-point-markedup-url-regexp
nil 1)
Those are just some first steps that I note down here for reference. A lot more work would need to be done to properly detect and clean up URLs with white space. It's not trivial, and maybe that's the reason why it's currently not supported. I may be one of few who regularly line break URLs in text documents.