emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: goto-address-at-point doesn't get the right url when there is a trai


From: Yuri Khan
Subject: Re: goto-address-at-point doesn't get the right url when there is a trailing ')'
Date: Wed, 14 Jun 2017 22:01:44 +0700

On Wed, Jun 14, 2017 at 5:11 PM, Amos Bird <address@hidden> wrote:

> When doing  (goto-address-at-point) at parenthesis surrounded urls like this
> (https://github.com/nikomatsakis/rayon/issues/231) in any prog mode (c, java, 
> python ...)
>
> it will grab the trailing ')' thus ends up with opening a wrong url.

> Could you tell me a workaround for this?

Don’t do that, then?

A closing parenthesis is a valid URL character. Any heuristic that
fixes your problem will break legal, standard-conforming URLs, such as
this:

    https://en.wikipedia.org/wiki/Dunnet_(video_game)

If you want to enclose a URL in parentheses, put a pair of angle
brackets <> around it first:

    (<https://github.com/nikomatsakis/rayon/issues/231>)

Angle brackets are not valid URL characters and are expicitly
recommended as delimiters around URLs by RFC 2396 § 2.4.3 and RFC 3986
Appendix C. Also, it is a Markdown construct for URLs displayed as-is.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]