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

From: Michael Albinus <[email-masked]>
Date: Wed, 16 Nov 2022 08:53:01 +0100

Danny Freeman <[email-masked]> writes:

Hi Danny,

>> Another approach is to simply require url-handlers in eglot.el, when it
>> comes to handle a URI. It shall do what you want.
>
> That is a really interesting idea. I didn't know about the url-handlers
> package. I think we would want the user to turn on that mode themselves
> if they were expecting those types of URLs (http, ftp, etc).

You could control this by a user option.

> There are other URI schemes we have seen come through this function that
> are outside the scope of the url-handlers package. The ones in this
> particular thread are `jar` and `zipfile` URIs. I've seen other obscure
> URIs as well that aren't really even standardized and only used by one
> particular LSP server.

url-handlers.el supports already non-canonical schemes, see
`url-tramp-protocols'. We could add "jar" and "zipfile" to another user
option, `url-archive-protocols', and let tramp-archive.el do the job.

The current restriction is, that tramp-archive.el works only on
GNU/Linux systems. When this is replaced by a native integration of
libarchive(3) into Emacs, it would work everywhere.

Best regards, Michael.