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

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

bug#68913: closed ([PATCH] Fix browse-url-url-at-point so that scheme do


From: GNU bug Tracking System
Subject: bug#68913: closed ([PATCH] Fix browse-url-url-at-point so that scheme does not duplicate)
Date: Thu, 08 Feb 2024 12:08:01 +0000

Your message dated Thu, 08 Feb 2024 14:07:03 +0200
with message-id <86ttmjw460.fsf@gnu.org>
and subject line Re: bug#68913: [PATCH] Fix browse-url-url-at-point so that 
scheme does not duplicate
has caused the debbugs.gnu.org bug report #68913,
regarding [PATCH] Fix browse-url-url-at-point so that scheme does not duplicate
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
68913: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68913
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [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


--- End Message ---
--- Begin Message --- Subject: Re: bug#68913: [PATCH] Fix browse-url-url-at-point so that scheme does not duplicate Date: Thu, 08 Feb 2024 14:07:03 +0200
> From: Kenta USAMI <zonuexe@zonu.me>
> Date: Sun, 4 Feb 2024 05:48:27 +0900
> Cc: 68913@debbugs.gnu.org
> 
> I'm using Emacs 29.2 on macOS.
> GNU Emacs 29.2 (build 2, aarch64-apple-darwin23.3.0, NS appkit-2487.40 
> Version 14.3 (Build 23D56))
>  of 2024-01-26
> 
> This problem is most noticeable when using markdown-mode and 
> goto-address-mode, 
> but it also seems to occur even if goto-address-mode is disabled in text-mode 
> or fundamental-mode.
> 
> You can see the problem by evaluating the Lisp code below.

Thanks, I installed your patch on the master branch, and I'm closing
this bug.


--- End Message ---

reply via email to

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