bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58790: Eglot URI parsing bug when using clojure-lsp server


From: Eli Zaretskii
Subject: bug#58790: Eglot URI parsing bug when using clojure-lsp server
Date: Wed, 23 Nov 2022 15:33:58 +0200

> From: João Távora <joaotavora@gmail.com>
> Date: Wed, 23 Nov 2022 12:36:37 +0000
> Cc: Danny Freeman <danny@dfreeman.email>, Felician Nemeth 
> <felician.nemeth@gmail.com>, 
>       58790@debbugs.gnu.org, Stefan Kangas <stefankangas@gmail.com>, 
>       Dmitry Gutov <dgutov@yandex.ru>, Eli Zaretskii <eliz@gnu.org>, 
>       Michael Albinus <michael.albinus@gmx.de>
> 
> Yes,I think I follow.  To be clear I think the problem is somewhere in 
> 
> (defun eglot--path-to-uri (path)
>   "URIfy PATH."
>   (let ((truepath (file-truename path)))
>     (if (url-type (url-generic-parse-url truepath))
>         ;; Path is already a URI, so forward it to the LSP server
>         ;; untouched.  The server should be able to handle it, since
>         ;; it provided this URI to clients in the first place.
>         truepath
>       ...)
> 
> So either url-generic-parse-url and url-type is fixed in url-parse.el, or 
> we must add some Windows-specific guards in eglot.el.  Or likely
> both, since url-parse.el is not a :core ELPA package.
> 
> Richard/Danny, can you perhaps come up with some patch?

>From where I stand, the solution was already proposed here:

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59338#53

You said you wanted to augment it with something that didn't depend on
url-parse.el, because it wasn't in Emacs < 29, but I don't think I
understand the concern, since AFAICT url-parse.el is in all versions of
Emacs since at least Emacs 23.  So what am I missing?

In any case, I suggest that a solution be based on the patch shown in that
bug#59338 discussion.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]