Subject: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows

From: Arash Esbati <[email-masked]>
Date: Fri, 18 Nov 2022 21:01:54 +0100

Danny Freeman <[email-masked]> writes:

> I can confirm it works on linux, but I don't have a windows machine.
> Someone else would need to verify it there.

Many thanks for working on this.  I tried your patch on my Windows box
and this is what I get:

  (require 'eglot)
  (insert "\n" (format "%s" (eglot--path-to-uri
                             "d:/digestif-test/tikz-test.tex")))
  => file:///d%3A/digestif-test/tikz-test.tex

  (insert "\n" (format "%s" (eglot--path-to-uri
                             "d:/digestif-test/tikz test.tex")))
  => file:///d%3A/digestif-test/tikz%20test.tex

As Eli already mentioned, %-escaping the colon seems to be wrong (I
couldn't find a definitive source for this, though), but it seems a
deliberate decision in eglot.el's `eglot--uri-path-allowed-chars', which
also references this GitHub issue[1].  My original problem is solved and
digestif-LSP works on Windows again.  So for now, I suggest to apply
your patch and close this report.

Best, Arash

Footnotes:
[1]  https://github.com/joaotavora/eglot/pull/639