From: João Távora Date: Fri, 26 Feb 2021 20:11:08 +0000 (+0000) Subject: Urify better X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~161 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5a4ca5fdf3082426a5d6aa8595492b3b1d50fd1b;p=emacs.git 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 --- 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)