One shouldn't unhex the URI before parsing it. Just consider a
filename with a # character in it. The character is encoded as C%23,
after unhexing the file name becomes.
/tmp/C#/Program.cs
Now, parsing this as the URL will fail completely as the # mean
"anchor" in URLs.
* eglot.el (eglot--uri-to-path): Fix thinko.
(when (keywordp uri) (setq uri (substring (symbol-name uri) 1)))
(let* ((server (eglot-current-server))
(remote-prefix (and server (eglot--trampish-p server)))
- (retval (url-filename (url-generic-parse-url (url-unhex-string uri))))
+ (retval (url-unhex-string (url-filename (url-generic-parse-url uri))))
;; Remove the leading "/" for local MS Windows-style paths.
(normalized (if (and (not remote-prefix)
(eq system-type 'windows-nt)