bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#68913: [PATCH] Fix browse-url-url-at-point so that scheme does not d


From: Kenta USAMI
Subject: bug#68913: [PATCH] Fix browse-url-url-at-point so that scheme does not duplicate
Date: Sun, 4 Feb 2024 04:17:29 +0900

Hi,

In the text below, move point to the second half of the URL and 
execute M-x browse-url-at-point.

```
[![Emacs](https://www.gnu.org/software/emacs/images/emacs.png)](https://www.gnu.org/software/emacs/download.html)
```

Firefox and Chromium-based browsers appear to open the URL "https//www.gnu.org/software/emacs/download.html".
It seems that the ":" following https is deleted, but the browser actually normalizes 
the URL with the duplicate scheme "http://https://".

You can check this by executing M-: (browse-url-url-at-point).

Because thing-at-point-bounds-of-url-at-point function cannot correctly recognize 
URL bounds in the text.

I considered changing the thing-at-point-bounds-of-url-at-point algorithm, but it would be a pain to change it without negatively impacting the current behavior.
Ideally, thing-at-point-bounds-of-url-at-point will be fixed eventually, but for now, the attached patch should easily fix the problem.

Attachment: 0001-Fix-browse-url-url-at-point-so-that-scheme-does-not-.patch
Description: Binary data


reply via email to

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