GNU bug report logs -
#58790
Eglot URI parsing bug when using clojure-lsp server
Previous Next
Full log
View this message in rfc822 format
Ping! João, any comments on this patch?
> Cc: 58790 <at> debbugs.gnu.org, felician.nemeth <at> gmail.com,
> Stefan Kangas <stefankangas <at> gmail.com>, Dmitry Gutov <dgutov <at> 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 <at> gnu.org>
>
> João Távora <joaotavora <at> 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
This bug report was last modified 2 years and 166 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.