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: Thu, 10 Nov 2022 11:49:39 +0200

Ping!  João, any comments on this patch?

> Cc: 58790@debbugs.gnu.org, felician.nemeth@gmail.com,
>  Stefan Kangas <stefankangas@gmail.com>, Dmitry Gutov <dgutov@yandex.ru>
> Date: Thu, 03 Nov 2022 13:10:32 -0400
> From:  Danny Freeman via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> João Távora <joaotavora@gmail.com> writes:
> 
> > I think it's better to patch eglot--uri-to-path so that if X looks
> > anything other than file://, Eglot leaves it untouched.  After all, it's
> > the only safe translation Eglot can make.
> 
> I've attached patch
> 0001-Only-handle-file-type-URIs-in-eglot-explicitly.patch
> to this email that does this pretty well
> 
> > And in eglot--path-to-uri, we do likewise.  If the PATH argument already
> > looks vaguely URIish (say, it makes something like "^[[:alnum:]]+://")
> > we leave it unchanged.
> 
> This is done by just trying to parse the path as a URL and checking the
> url-type instead of checking a regex.
> 
> > Felicián also suggested that Eglot warns the user when it doesn't know
> > an URI scheme.  I think that can make sense in some situations, for now
> > let's assume it isn't as important as getting your new Jar
> > file-name-handler to integrate with Eglot.  Maybe in some later patch
> > Eglot can somehow predict if there is a file-name-handler entry for a
> > given URI and only warn if there isn't.
> 
> This change is only a matter of consulting the `find-file-name-handler`
> function. I added another patch for that as
> 0002-Warn-when-eglot-receives-a-non-file-type-URI-that-Em.patch





reply via email to

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