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

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Wed, 11 May 2022 07:06:02 UTC

Severity: normal

Tags: moreinfo, patch

Found in version 29.0.50

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 55357 <at> debbugs.gnu.org
Subject: bug#55357: 29.0.50; [PATCH] Fix browse-url-emacs on file:// urls
Date: Wed, 11 May 2022 09:53:59 +0200
On Mai 11 2022, Yuan Fu wrote:

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

That is correct.  The component after file:// is always the host part.
See RFC8089 for the full specification.

> 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.

The host part can be non-empty, too.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




This bug report was last modified 3 years and 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.