From 5a4ca5fdf3082426a5d6aa8595492b3b1d50fd1b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Fri, 26 Feb 2021 20:11:08 +0000 Subject: [PATCH] Urify better See also https://microsoft.github.io/language-server-protocol/specifications/specification-current/#uri. * eglot.el (eglot--path-to-uri): use directory-file-name. GitHub-reference: per https://github.com/joaotavora/eglot/issues/627 --- lisp/progmodes/eglot.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 86e0d01118f..017b8200bfa 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1168,7 +1168,8 @@ If optional MARKER, return a marker instead" (defun eglot--path-to-uri (path) "URIfy PATH." (url-hexify-string - (concat "file://" (if (eq system-type 'windows-nt) "/") (file-truename path)) + (concat "file://" (if (eq system-type 'windows-nt) "/") + (directory-file-name (file-truename path))) url-path-allowed-chars)) (defun eglot--uri-to-path (uri) -- 2.39.2