Subject: bug#5362: 23.1.91; browse-url-of-dired-file vs. files::with::colons

From: Eli Zaretskii <[email-masked]>
Date: Sat, 26 Dec 2015 10:17:05 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Fri, 25 Dec 2015 23:15:08 +0100
> Cc: [email-masked]
> 
> (browse-url-file-url "/tmp/WWW::Facebook::API.html")
> => "ftp://tmp/WWW/:Facebook::API.html"
> 
> Which is wrong.
> 
> I don't quite understand why it does all this?  Why doesn't it just
> prepend "file://" to the file name?

See the doc string of browse-url-filename-alist: it's for ange-ftp
support.  It aims at transparently supporting file names like
/[email-masked]:/:X:/IMPORTANT.TEXT.ON.BS2000.  Now you
tell me how should browse-url distinguish that from the file name the
OP shows in this bug report?

> Ideas?

Since browse-url-of-dired-file knows it is operating on a local file,
it could simply bind browse-url-filename-alist to some value (nil?)
that would disable the offending translations.  Would that work?