8

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>.
  • 1
    M-x report-emacs-bug – phils Apr 13 '15 at 22:28
  • I found the proper function (in thingatpoint.el) to fix this. I can submit the bug report with a patch if needed. – nanny Apr 14 '15 at 15:38
  • Ah, interesting. thing-at-point-markedup-url-regexp says "This kind of markup was formerly recommended as a way to indicate URIs, but as of RFC 3986 it is no longer recommended." so it might be intentional that browse-url doesn't recognise it. Probably still worth querying, but I would check the archives to see if there has already been discussion of the issue. – phils Apr 15 '15 at 2:09
  • 4
    @phils I think I found the commit. The commit message just says "Disallow newlines." Not sure why this change was made. – nanny Apr 15 '15 at 13:46
  • 2
    @phils According to RFC 3986 the URL: prefix is indeed no longer recommended. The possible use of line-breaks, however, is still mentioned: "In some cases, extra whitespace (spaces, line-breaks, tabs, etc.) may have to be added to break a long URI across lines. The whitespace should be ignored when the URI is extracted." – feklee Apr 15 '15 at 14:34

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.