Subject: bug#58464: 28.1; browse-url-emacs doesn't work for local files on Windows

From: Eli Zaretskii <[email-masked]>
Date: Wed, 12 Oct 2022 17:25:08 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Wed, 12 Oct 2022 15:18:10 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > No, the misleading message is likely just a symptom of the root
> > cause.  The root cause is that the buffer-file-name is set
> > incorrectly, and likewise the default-directory.
> 
> Well...  have a look at bug#bug#42431, it analyses the problem.  (Which
> is that any usage if insert-file-contents that doesn't reference an
> actual file on the file system will signal an error, and that's a
> mistake, I think?)

So why isn't what I proposed there TRT?  We _know_ we are visiting a
local file, so why not convert the file:// URL to a local file name
before doing anything with it?