Subject: Re: bug#54721: 29.0.50; browse-url-file-url fails on Windows since e06319b

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 06 Apr 2022 11:59:48 +0200

Kiên Nguyễn Quang <[email-masked]> writes:

> -          (push "" components)
> +          (push (if (string-empty-p dir) "" (substring dir 0 -1)) components)

Thanks; applied with some changes.

> +    (let ((url-unreserved-chars `(?: ,@url-unreserved-chars)))
> +      (setq file (mapconcat #'url-hexify-string
> +                            (file-name-split file)
> +                            "/"))))

This isn't quite correct, because we do want to encode : characters in
file names in general -- just not the first bit on Windows.  So I've
adjusted the patch and pushed to Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no