From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Danny Freeman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Wed, 26 Oct 2022 15:50:02 -0400 Message-ID: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> References: Reply-To: Danny Freeman Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1787"; mail-complaints-to="usenet@ciao.gmane.io" To: Stefan Kangas , 58790@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 26 21:56:52 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1onmWB-0000B1-GH for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Oct 2022 21:56:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onmQb-0003vA-7E; Wed, 26 Oct 2022 15:51:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onmQZ-0003uU-8Y for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 15:51:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onmQY-0007hl-U2 for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 15:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1onmQY-0006gZ-G7 for bug-gnu-emacs@gnu.org; Wed, 26 Oct 2022 15:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Danny Freeman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Oct 2022 19:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58790 X-GNU-PR-Package: emacs Original-Received: via spool by 58790-submit@debbugs.gnu.org id=B58790.166681381325639 (code B ref 58790); Wed, 26 Oct 2022 19:51:02 +0000 Original-Received: (at 58790) by debbugs.gnu.org; 26 Oct 2022 19:50:13 +0000 Original-Received: from localhost ([127.0.0.1]:55322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onmPl-0006fT-Fm for submit@debbugs.gnu.org; Wed, 26 Oct 2022 15:50:13 -0400 Original-Received: from out0.migadu.com ([94.23.1.103]:32779) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onmPh-0006fG-4F for 58790@debbugs.gnu.org; Wed, 26 Oct 2022 15:50:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1666813805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=L3Kd2XzNs+jl2G9332FmfFVulimuJweCEE3w0KX1l8s=; b=V4QUgPnTCTfo4DWp9zm6nuL5YOlwmckMCGll7ktwL5Y7fnc6vQoMpVg1QlJ9xaCo2+KOwM I5JNyyOuUSU9FYzKcXg8JjYp49Fl2+MPiTvhtHXnpYYxcVUpyzZ/qbBFYJ3v/YsMow/PFr fp0mYJjKCPpdjKcXbUHrmGEuZxh7l3s= Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. Autocrypt: addr=danny@dfreeman.email; keydata= xsFNBF/FF5oBEACwm2hCve4DBa0zxaHGuT5G8ul/QXCCeFXgDpmQv56giEh1aeFz0O1NkbcV 4Y/1aw8Jwc2A84QuYbYDXiuLGyB8DSUAGbZCgSz5pJadSniv7Qy/fNsE7gb23+vqcZRZ1Wcc 0C5pEuCVnqqim9hBirTahbQXVj8cXocI9hKxCSDJDHc0RABi4llTRWAQXNGxImaQqFML2IEG I5LoWbLswdoZNfE181lX2iY9EeH1SyOHL6VN3O+EMpsfe3409Vc4OXABTb64RX4JchtfSgil LVPq1mK5xKOacmTPe+gQytdIvmCsw+bvD2Isuao1vSfwsFaFpl6p1AhSx9SXl9SsSML4FUVV kQVYbDThp8epGu6ceVswU96ZFYBlLARTI9EwzfvoClBkHtj6TNVBzIYK8IIOHolY26qYXNk9 bOn0eeEezkB37/DM81Z9OzYmwHlmeFLSzhNk/106uFSL2X1N3o2Yowz4Na0y0TwkG5KFvyAb c5dN3YWFhqjIZ0yoc1XJExzn/cuV8JJd8QZ5wDGbX/nbLhBxVlYPUhdbx6c/Xm5L24tOwy8+ EXUFFmPVs8wTON/sjRzrlkhrai32PIO1LUTzqrDTW05bqH3BCpP9ilOwvt4Reegg9NNk9G0o kY4ANlUip4x7nt4pD9SH29BlJ/F3NHJODprJ6IQ3vU+GF538LwARAQABzSREYW5ueSBGcmVl bWFuIDxkYW5ueUBkZnJlZW1hbi5lbWFpbD7CwY4EEwEIADgWIQRmWaR91YJz1zZ7X1Q2nVVu IE0Z1gUCYeXbkgIbAwULCQgHAgYVCgkICwIEFg In-Reply-To: X-Migadu-Flow: FLOW_OUT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246255 Archived-At: Carrying on a conversation from github > > Does eglot (or maybe project.el) have a mechanism for adding an > > external directory to the current project? I think that would be > > what I need to do this automatically. > I think project.el does. But then again this seems like a completely > different approach and seems to negate the need for the patches you > sent to Eglot. The patches would still be necessary. The patches simply make eglot correctly parse the "jar:" scheme URIs from lsp servers that use them. It doesn't have much to do with how emacs is handling the file paths once it is parsed. > In my mind, project.el should support adding jars as collections of > source files just like it supports adding directories as collections > of source files. Many years ago, Eclipse did this. You could add a jar > as a library or a file as a library: it's just a different > implementation detail. Maybe so, it's unclear in my mind how that would work with lsp servers. Without the files being extracted somewhere would they be able to perform any analysis on them? Right now I don't think clojure-lsp is capable, and I doubt other lsp servers are as well. I think maybe there is some way I could extend the `project-external-roots` after I've extracted the file somewhere to make project (and thus eglot) consider the newly extracted to directory part of the original project. Either way, I think that is still work to do separately outside of eglot right now. I'm sort of using that jarchive package I wrote as a place to experiment with ideas like this.