Subject: bug#55357: closed (Re: bug#55357: 29.0.50; [PATCH] Fix browse-url-emacs on file:// urls)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 11 May 2022 18:37:02 +0000

Your bug report

#55357: 29.0.50; [PATCH] Fix browse-url-emacs on file:// urls

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
55357: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55357
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#55357: 29.0.50; [PATCH] Fix browse-url-emacs on file:// urls
From: Yuan Fu <[email-masked]>
To: [email-masked]
Date: Wed, 11 May 2022 11:35:58 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

> On May 11, 2022, at 11:35 AM, Yuan Fu <[email-masked]> wrote:
> 
> 
> 
>> On May 11, 2022, at 4:37 AM, Eli Zaretskii <[email-masked]> wrote:
>> 
>>> Resent-From: Yuan Fu <[email-masked]>
>>> Original-Sender: "Debbugs-submit" <[email-masked]>
>>> Resent-CC: [email-masked]
>>> Resent-Sender: [email-masked]
>>> From: Yuan Fu <[email-masked]>
>>> Date: Wed, 11 May 2022 00:05:50 -0700
>>> 
>>> 
>>> [1:text/plain Hide]
>>> 
>>> 
>>> If you call browse-url-emacs with a file:// url, Emacs does not open the correct file:
>>> 
>>> (browse-url-emacs "file://~/a/b") opens /a/b
>>> (browse-url-emacs "file://a/b") opens /b
>>> 
>>> Basically unless the path is an absolute path, the first level is chopped because url parses it as host and throws it away. This patch concats the host back. If the path is absolute, host is empty string so it’s ok.
>> 
>> I think your URLs lack one or two more slashes. See
>> 
>> https://en.wikipedia.org/wiki/File_URI_scheme#How_many_slashes?
> 
> Ah! My bad. Closing.
> 
> Yuan
> 

Subject: 29.0.50; [PATCH] Fix browse-url-emacs on file:// urls
From: Yuan Fu <[email-masked]>
To: Bug Report Emacs <[email-masked]>
Date: Wed, 11 May 2022 00:05:50 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

If you call browse-url-emacs with a file:// url, Emacs does not open the correct file:

(browse-url-emacs "file://~/a/b") opens /a/b
(browse-url-emacs "file://a/b") opens /b

Basically unless the path is an absolute path, the first level is chopped because url parses it as host and throws it away. This patch concats the host back. If the path is absolute, host is empty string so it’s ok.

Yuan