From unknown Sun Jun 22 17:11:51 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#58790 <58790@debbugs.gnu.org> To: bug#58790 <58790@debbugs.gnu.org> Subject: Status: Eglot URI parsing bug when using clojure-lsp server Reply-To: bug#58790 <58790@debbugs.gnu.org> Date: Mon, 23 Jun 2025 00:11:51 +0000 retitle 58790 Eglot URI parsing bug when using clojure-lsp server reassign 58790 emacs submitter 58790 Danny Freeman severity 58790 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 26 01:07:41 2022 Received: (at submit) by debbugs.gnu.org; 26 Oct 2022 05:07:41 +0000 Received: from localhost ([127.0.0.1]:52943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onYdg-0001sW-Gt for submit@debbugs.gnu.org; Wed, 26 Oct 2022 01:07:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:55894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onRiw-0007WJ-HV for submit@debbugs.gnu.org; Tue, 25 Oct 2022 17:44:39 -0400 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 1onRiv-0006iW-Oi for bug-gnu-emacs@gnu.org; Tue, 25 Oct 2022 17:44:38 -0400 Received: from out0.migadu.com ([94.23.1.103]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onRir-0001ZX-Mk for bug-gnu-emacs@gnu.org; Tue, 25 Oct 2022 17:44:37 -0400 Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1666734267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type:autocrypt:autocrypt; bh=a8D9+WXrxzCtPoZZBpuGsL9+IHGU13TZTsqG0jqMSLc=; b=DXnRhdHroGnWPIkd+rzzD83Rbgk8nhOaRHk/LgPQvUSORh90DOlzNlor+KhrV0fUHLs65Q ZPkdzlfxx0GJDjzBtAO0BgCpeLDGtbzEuHupG7QsaVrSq+xuqXj3alUHPi7iadGcks0jJz K9Bb0g02CXBLkXKjzjRcPIYPJ1z2wMo= Date: Tue, 25 Oct 2022 17:44:22 -0400 MIME-Version: 1.0 Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman 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+GF538LwARA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HrU53QCbxCBqMXJ3lqe0ISYS190y QC5dRNVIyZCY+siOwXj2NHufvU8h8pliCBCdIbtkL3SVG0KghkVDXB/tCutwLXo93Q4ywxpv peOODDWTRi9uidWjjwhq1Ax01bDMqylo+1ZPAOnALkQVsD5fzMQuiP7z To: bug-gnu-emacs@gnu.org Subject: Eglot URI parsing bug when using clojure-lsp server Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------vQwXSS0qop70NApqIwNe54kC" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=94.23.1.103; envelope-from=danny@dfreeman.email; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 26 Oct 2022 01:07:34 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------vQwXSS0qop70NApqIwNe54kC Content-Type: multipart/mixed; boundary="------------AF1zQNHk20Y3Wd01YAnakxXy"; protected-headers="v1" From: Danny Freeman To: bug-gnu-emacs@gnu.org Message-ID: Subject: Eglot URI parsing bug when using clojure-lsp server --------------AF1zQNHk20Y3Wd01YAnakxXy Content-Type: multipart/mixed; boundary="------------9wzEIyy7AI1grtHHHCckWK6l" --------------9wzEIyy7AI1grtHHHCckWK6l Content-Type: text/plain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sDQpEYW5ueSBGcmVlbWFuDQo= --------------9wzEIyy7AI1grtHHHCckWK6l Content-Type: text/x-patch; charset=UTF-8; name="0001-Initialize-clojure-lsp-with-the-zipfile-dependency-s.patch" Content-Disposition: attachment; filename*0="0001-Initialize-clojure-lsp-with-the-zipfile-dependency-s.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSBjMjBjMDE4NTkyOWZiYjNmNWNhMDEwMWNhYjM4NzIxZGRhYzQxMmQ2IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBkYW5ueWZyZWVtYW4gPGRhbm55QGRmcmVlbWFuLmVt YWlsPgpEYXRlOiBUdWUsIDI1IE9jdCAyMDIyIDA4OjE1OjI2IC0wNDAwClN1YmplY3Q6IFtQ QVRDSF0gSW5pdGlhbGl6ZSBjbG9qdXJlLWxzcCB3aXRoICB0aGUgInppcGZpbGUiIGRlcGVu ZGVuY3ktc2NoZW1lCiBvcHRpb24KCldoZW4gZWdsb3QgaXMgcHJvdmlkZWQgY2xvanVyZSBk ZXBlbmRlbmNpZXMgdGhhdCBhcmUgbG9jYXRlZCBpbiBleHRlcm5hbApqYXJzLCB0aGVyZSBh cmUgdHdvIGZvcm1hdHMgdGhleSBjb3VsZCBiZSBwcm92aWRlZCBpbi4KClRoZSByZWNvbW1l bmRlZCBmb3JtYXQgaXMgImphciIsIHdoaWNoIGNvbnRhaW5zIGEgamFyIFVSSSBsaWtlCiJq YXI6ZmlsZTovLy9wYXRoL3RvL2phciEvcGF0aC9pbi9qYXIiCnRoaXMgVVJJIGNvbnRhaW5z IGEgbmVzdGVkIFVSSSB0aGF0IGVnbG90IGlzIG5vdCBlcXVpcHBlZCB0byBoYW5kbGUuCgpT ZXR0aW5nIHRoaXMgdmFsdWUgdG8gInppcGZpbGUiIHByb3ZpZGVzIHRoZW0gaW4gdGhlIGZv bGxvd2luZyBmb3JtYXQKInppcGZpbGU6Ly8vcGF0aC90by9qYXI6Oi9wYXRoL2luL2phciIK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W1v ZGUgY2xvanVyZXNjcmlwdC1tb2RlIGNsb2p1cmVjLW1vZGUpCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAuICgiY2xvanVyZS1sc3AiKSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIC4gKCJjbG9qdXJlLWxzcCIgOmluaXRpYWxpemF0aW9uT3B0aW9u cyAoOmRlcGVuZGVuY3ktc2NoZW1lICJ6aXBmaWxlIikpKQogICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAoY3NoYXJwLW1vZGUgLiAoIm9tbmlzaGFycCIgIi1sc3AiKSkKICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHB1cmVzY3JpcHQtbW9kZSAuICgicHVy ZXNjcmlwdC1sYW5ndWFnZS1zZXJ2ZXIiICItLXN0ZGlvIikpCiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChwZXJsLW1vZGUgLiAoInBlcmwiICItTVBlcmw6Okxhbmd1YWdl U2VydmVyIiAiLWUiICJQZXJsOjpMYW5ndWFnZVNlcnZlcjo6cnVuIikpCi0tIAoyLjM3LjMK Cg== --------------9wzEIyy7AI1grtHHHCckWK6l Content-Type: text/x-patch; charset=UTF-8; name="0001-Parse-jar-scheme-URIs-in-eglot-correctly.patch" Content-Disposition: attachment; filename="0001-Parse-jar-scheme-URIs-in-eglot-correctly.patch" Content-Transfer-Encoding: base64 RnJvbSBmNmUwYTZkMWZmNTU3NzE5YjExY2RmMzU3ZmMyNDI0NmM5ZGE2YTg2IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBkYW5ueWZyZWVtYW4gPGRhbm55QGRmcmVlbWFuLmVt YWlsPgpEYXRlOiBUdWUsIDI1IE9jdCAyMDIyIDA4OjIyOjIwIC0wNDAwClN1YmplY3Q6IFtQ QVRDSF0gUGFyc2UgImphciIgc2NoZW1lIFVSSXMgaW4gZWdsb3QgY29ycmVjdGx5CgpqYXIg c2NoZW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KSkKLSAgICAgICAgIChyZXR2YWwgKHVybC11bmhleC1zdHJpbmcgKHVybC1maWxlbmFt ZSAodXJsLWdlbmVyaWMtcGFyc2UtdXJsIHVyaSkpKSkKKyAgICAgICAgIChyZXR2YWwgKGVn bG90LS1wYXJzZS11cmkgdXJpKSkKICAgICAgICAgIDs7IFJlbW92ZSB0aGUgbGVhZGluZyAi LyIgZm9yIGxvY2FsIE1TIFdpbmRvd3Mtc3R5bGUgcGF0aHMuCiAgICAgICAgICAobm9ybWFs aXplZCAoaWYgKGFuZCAobm90IHJlbW90ZS1wcmVmaXgpCiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAoZXEgc3lzdGVtLXR5cGUgJ3dpbmRvd3MtbnQpCi0tIAoyLjM3LjMKCg== --------------9wzEIyy7AI1grtHHHCckWK6l Content-Type: application/pgp-keys; name="OpenPGP_0x369D556E204D19D6.asc" Content-Disposition: attachment; filename="OpenPGP_0x369D556E204D19D6.asc" Content-Description: OpenPGP public key Content-Transfer-Encoding: quoted-printable -----BEGIN PGP PUBLIC KEY BLOCK----- xsFNBF/FF5oBEACwm2hCve4DBa0zxaHGuT5G8ul/QXCCeFXgDpmQv56giEh1aeFz 0O1NkbcV4Y/1aw8Jwc2A84QuYbYDXiuLGyB8DSUAGbZCgSz5pJadSniv7Qy/fNsE 7gb23+vqcZRZ1Wcc0C5pEuCVnqqim9hBirTahbQXVj8cXocI9hKxCSDJDHc0RABi 4llTRWAQXNGxImaQqFML2IEGI5LoWbLswdoZNfE181lX2iY9EeH1SyOHL6VN3O+E Mpsfe3409Vc4OXABTb64RX4JchtfSgilLVPq1mK5xKOacmTPe+gQytdIvmCsw+bv D2Isuao1vSfwsFaFpl6p1AhSx9SXl9SsSML4FUVVkQVYbDThp8epGu6ceVswU96Z FYBlLARTI9EwzfvoClBkHtj6TNVBzIYK8IIOHolY26qYXNk9bOn0eeEezkB37/DM 81Z9OzYmwHlmeFLSzhNk/106uFSL2X1N3o2Yowz4Na0y0TwkG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GgDCgK47Q1+jIx/PPLv9HwUMscbeqcyYzYxJTrsaNrG 4QNqzKM+39fcB7HyvtpfU1OH/eDDTgIM2CStV6X2gvVBKEmVHYixhpCUK8UVfuTH B+7EQ2Mh8dr99jXVJDsqKRPxTiorcNAqwfNe8G0vi7Al2LjqOTFIfxin/DMYHfFS d4QjjAjXIwl7JBFLc569TX+6yrRy3jCZXM2DHrU53QCbxCBqMXJ3lqe0ISYS190y QC5dRNVIyZCY+siOwXj2NHufvU8h8pliCBCdIbtkL3SVG0KghkVDXB/tCutwLXo9 3Q4ywxpvpeOODDWTRi9uidWjjwhq1Ax01bDMqylo+1ZPAOnALkQVsD5fzMQuiP7z =3DLEku -----END PGP PUBLIC KEY BLOCK----- --------------9wzEIyy7AI1grtHHHCckWK6l-- --------------AF1zQNHk20Y3Wd01YAnakxXy-- --------------vQwXSS0qop70NApqIwNe54kC Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEZlmkfdWCc9c2e19UNp1VbiBNGdYFAmNYWLYFAwAAAAAACgkQNp1VbiBNGda2 ShAAn90g58pizj8SdaELXaB2qjlxbPPW855FpMNIHZ5COTx3wD7ZnhlBMQ79oCkmUW5oxxkLMhRe e8+yWwAQniyZWoxqVRpjSZ9zJcE/+hZnaWzCdEtcu9glRTqV7S+lw3pfQ0JUaTuNbmUrHQiibGmF JOZ7KRsC8RKJ0t3F1qPUfFxna56Zl7RecES5a9szEZpduTRSelhAUpT9umho2ZuUEi8fVXoAVvQe d7pnl4dlGhUGCmOefgiOufVt6Y535r2qsIrtD1nHcQAhgcAi02weXjnyUEob/moE8iDwKlt+2axD oYnhsyrYjUaVT90lFs0yQTjUYuB+MySU+1k6fg7VKGp8AORBiQ4mF/PolZFZIGQNuvG9U1nTIIt1 hHXvUJTeCacwF8Vne5kUriLyqFhQI9m05IGhYuctQrV3OBIj3M2TZd9JYgA3e4t3M0/XIU4/fPIE G0lF/kaCIzbLmMaCtfB8hZf3U8nPLDelmpJ4bHaVyVZhI+W2gAn9b+V7s3fGZ4Eaem5Ua4vQgtKV GLeMe7UjVgi6kMij1hSElE9kzoWdAyxt4VD6sy3xwMgdrvxDJBNlwyS8YKc/vo+/BBYxYeDcph01 IFgVi2c1i69U96POX+XqvBahXVPLEzjHMfcxOR8/qJaB+rOiPnwmXdVXN6YPsrW8mnAVd93m0Kz+ Lm0= =I8wJ -----END PGP SIGNATURE----- --------------vQwXSS0qop70NApqIwNe54kC-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 26 02:22:55 2022 Received: (at 58790) by debbugs.gnu.org; 26 Oct 2022 06:22:55 +0000 Received: from localhost ([127.0.0.1]:53070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onZoU-0008Kg-PD for submit@debbugs.gnu.org; Wed, 26 Oct 2022 02:22:55 -0400 Received: from mail-ot1-f50.google.com ([209.85.210.50]:36382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1onZoS-0008KR-UH for 58790@debbugs.gnu.org; Wed, 26 Oct 2022 02:22:53 -0400 Received: by mail-ot1-f50.google.com with SMTP id v40-20020a056830092800b00661e37421c2so9311844ott.3 for <58790@debbugs.gnu.org>; Tue, 25 Oct 2022 23:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:from:to:cc:subject:date:message-id :reply-to; bh=D+GR12sTLo4q6XBrX6TdWebjyAh0to4d1VV2d8KREAE=; b=KsKa0Kix6Kze/aiDi5f7ip9LY8YRiiIwpLjKoiZbE2txipFOwBmbB0BKj3Si4+Ei2j 9jig1bWTG9HL7Jj5JVkUQNXkRI6jQ3O2DtXB9US2dDz51E5zPV3CDmJ4JslOe/fT+WFf Ery84+wKok4uU7eMqQ7iBQbXa8KoYQWfzcpWAitxlTP9CZtswYZ4ODPatmRQLzNEisWX 9rOZxar+mFuL06h9Sunzu6ybt39T/JN1B13EjUnbbta8rugGcDcdgtj7gIRKdD//iSGR /ULz/66hbA5dy54JrXH9UelsiDn8G3Rw16H56m40oSMqWHQoQvHMVPRcPubDkCfjDXBx Q9ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=D+GR12sTLo4q6XBrX6TdWebjyAh0to4d1VV2d8KREAE=; b=wbescbiecRVJ+aFu2RtrglF9l3qqQ08zZq5/bEBXvin1gpVRVGZthfhgHWUAphv74r xJ0DxMAQUOxPR9iBHabZ0ccmxd/HJX1RgTyAaZfoeoXhUI5ETyDwNX4y4U/x749Yf5HX s0AdWwN0cN44Caf1P1+7QJBxfpEKk5LmatoWfnY18VOF9H+ndM6rGukTqbK4jPjRzbsO yL9W1CctS1ZhOz5fzTpnv6jUosG4FZVAOX95hko5vKBAwjsvEYx3Y4McgioVZOoEmNc3 yQXOsn4lyARfr/aRO1xaaDGEk5KZBAp/5xlW7VzFDMmuuTt4W7Rhtx+DOndRrVKN7yN4 khmg== X-Gm-Message-State: ACrzQf1Wfluo8EeA3njeWTDUpy3OGmOOmPdZGeky+PBJjLLBbaN0zZz3 v/IH9n2ODOUHobPGGCZ/9jw3MU7bzgOANhqKucY= X-Google-Smtp-Source: AMsMyM4b6FxsVQRbxXTnvPTMdPhSjpAxE7DARAB0lJ5IemiaHhRAF+QYDNie2gxnVJeSstb35tQ8gcFa8WVy/EBFJzM= X-Received: by 2002:a05:6830:3c1:b0:637:28be:7920 with SMTP id p1-20020a05683003c100b0063728be7920mr20487262otc.105.1666765367095; Tue, 25 Oct 2022 23:22:47 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 25 Oct 2022 23:22:46 -0700 From: Stefan Kangas In-Reply-To: References: X-Hashcash: 1:20:221026:joaotavora@gmail.com::Nn8LBxsFz1NONxTd:4FJA MIME-Version: 1.0 Date: Tue, 25 Oct 2022 23:22:46 -0700 Message-ID: Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server To: Danny Freeman , 58790@debbugs.gnu.org, =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Danny Freeman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > I am submitting 2 patches that were discussed over on eglot's github > issue tracker: https://github.com/joaotavora/eglot/issues/661 > > Only one of the patches is needed to solve the issue, but I wanted to > present both options. Copying in Jo=C3=A3o here. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 26 15:50:13 2022 Received: (at 58790) by debbugs.gnu.org; 26 Oct 2022 19:50:13 +0000 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 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 Message-ID: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> 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= Date: Wed, 26 Oct 2022 15:50:02 -0400 MIME-Version: 1.0 Content-Language: en-US To: Stefan Kangas , 58790@debbugs.gnu.org, =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= References: X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman 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/Xm5L24t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X2gvVBKEmV HYixhpCUK8UVfuTHB+7EQ2Mh8dr99jXVJDsqKRPxTiorcNAqwfNe8G0vi7Al2LjqOTFIfxin /DMYHfFSd4QjjAjXIwl7JBFLc569TX+6yrRy3jCZXM2DHrU53QCbxCBqMXJ3lqe0ISYS190y QC5dRNVIyZCY+siOwXj2NHufvU8h8pliCBCdIbtkL3SVG0KghkVDXB/tCutwLXo93Q4ywxpv peOODDWTRi9uidWjjwhq1Ax01bDMqylo+1ZPAOnALkQVsD5fzMQuiP7z Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 27 11:08:21 2022 Received: (at 58790) by debbugs.gnu.org; 27 Oct 2022 15:08:21 +0000 Received: from localhost ([127.0.0.1]:58950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oo4UU-00060X-80 for submit@debbugs.gnu.org; Thu, 27 Oct 2022 11:08:21 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:46886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oo4US-00060E-5r for 58790@debbugs.gnu.org; Thu, 27 Oct 2022 11:08:16 -0400 Received: by mail-wr1-f45.google.com with SMTP id bk15so2639164wrb.13 for <58790@debbugs.gnu.org>; Thu, 27 Oct 2022 08:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=N6WJwSGNaHeYY35i/+rGqg2ph3Xb9Ay7ZZsnEYSE780=; b=UOFLReEj032rGkTStwM/z7NzRUVk4JAD+CWzPOUZigyG0rGKmvw2dg+2/Y8Pzu7cfl XKzH3LM0bmpolhC3XYZjz8Ry2Plsuiz5G6dtGDH3jhGfRrgJZRuy6FKfs5W6mdI7VhI5 wfDEd1F8b/CEq8Gfi2vs4AEo2yO+iigk1PLWSPNnzBYOHL5tkRfXxIiSr/gHCyI9tdb+ EK5FZ0DTWcFmkspKu+wtS3YPfV0b9kYKpbDWkT6S6np/Hq8X/hRZM9vBPy8051gOZ1i4 ZN6DMtDbftSO2ztWAmgzyBnBtkVZ64dOmfGrenxWJiHgWvmtMHKk/ReWebYtRDigvEUo WRcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=N6WJwSGNaHeYY35i/+rGqg2ph3Xb9Ay7ZZsnEYSE780=; b=t1JGBfWKUutAVOlhio4XIeh2nR+wS3qDkox6OlKWApVoiwsdSlQqjZBGBDFTKL/s/C /MWanRmUqtwUVfItWjt0dwbUuFUT+JSsYGKmFhes7P9Z31+yEyg3rhr/XUtznaLPTY8C mkOKkCwIR0fxaMcXkWQ7kdCS9+IcLaJhac5YBPL2A4lcIoUrlJJTNVHuaeIubBcZWQaB gyBsRf16RX8C9Jmnos028tFeIRGKeHz7lYkody/ENp7pxfiv4UDAAHvngLvb/a8q9JXH DfL2ChCHT2Qo59C+9D/FFyB2bzYic+M1Bln/lWcRj1HDZFx44bKOEgUrWFGamrO3XNQs JXxg== X-Gm-Message-State: ACrzQf2lwJMGi0hTU+j1fdDO3QwUW4vH2OzBGM1Iud4uZBzsMGgz3cRQ 4AmC+9E7XoFYrXDFPT1j5C374HZMN44= X-Google-Smtp-Source: AMsMyM6TBgzwtPANTEAGmr2uMswAAWZ7k3TiBwiTE4NhXQ21dknFiv2aVfhdGo0/JPbqBxEpY2GPcQ== X-Received: by 2002:a05:6000:1e0b:b0:236:8a6e:8d with SMTP id bj11-20020a0560001e0b00b002368a6e008dmr6042052wrb.20.1666883289794; Thu, 27 Oct 2022 08:08:09 -0700 (PDT) Received: from krug ([87.196.73.148]) by smtp.gmail.com with ESMTPSA id l3-20020a05600c4f0300b003a5f3f5883dsm5461399wmq.17.2022.10.27.08.08.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 08:08:08 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Danny Freeman , dgutov@yandex.ru Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> (Danny Freeman's message of "Wed, 26 Oct 2022 15:50:02 -0400") References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> Date: Thu, 27 Oct 2022 16:09:18 +0100 Message-ID: <87ilk5xq01.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Danny Freeman writes: > Danny: The patches would still be necessary. The patches simply make > eglot Danny: correctly parse the "jar:" scheme URIs from lsp servers > that use them. Danny: It doesn't have much to do with how emacs is > handling the file paths Danny: once it is parsed. Indeed, I am in agreement with the last sentence. And this means the result of this parsing is arbitrary as long as it's a bijection. >> 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. > > Danny: Maybe so, it's unclear in my mind how that would work with lsp > Danny: servers. Here's how I envision it working, from reading some of the source involved, but with no testing: 1. In buffer B1, the user uses M-. (xref-find-definition). Eglot requests :textDocument/definition from the LSP server, which returns a number of definitions. Some of these look like jar:file:///home/user/.m2/repository/org/clojure/clojure/1.10.3/clojur= e-1.10.3.jar!clojure/core.clj Call this value X. 2. Eglot converts the URI X into a some file designator Y, using eglot--uri-to-path. Y may or may not be =3D=3D=3D X, as long as there is exactly one X for every Y. Eglot makes xref-item objects from it using xref-make-match and xref-make-file-location. The designator Y goes into the 'file' slot of the xref-file-location object. We'll see later if and how eglot--uri-to-path needs to be changed to do this conversion in a way that doesn't hurt all the other conversions it already does there. One of the possibilities is just to leave X completely untouched and pass it onwards. The word "path" in eglot--uri-to-path should be understood as "file name" or "file designator" (depending on whether you are into Elisp or CL parlance). It does not necessarily represent a filesystem path. eglot--uri-to-path should probably be renamed, but that is a cosmetic tweak. 3. Using xref--show-location on one of these matches will eventually call xref-location-marker and invoke invoke find-file-noselect on Y. =20=20=20 Here, an entry of file-name-handler-alist should know how to handle the format Y. This is what Danny is working on as a separate package. If that entry exists, the process should land the user in some buffer B2 where buffer-file-name is set to Y. 4. B2 can be setup in a way so that project-current returns the same object which is returned in B. If this is true, eglot--current-server discovers the same connection which also manages B1 and Eglot adds buffer B2 to the list of managed buffers in that connection. However, if eglot-extend-to-xref is non-nil, eglot--current-server should also discover the correct connection. This is less ideal than making project-current know that the buffers of source code inside the jar are also in the same project, but it works. I can explain the downsides, but it's not very relevant right now. 5. Upon findin the "file", Eglot transmits a :textDocument/didOpen notification to the server. This requires eglot--path-to-uri, the reciprocal of eglot--uri-to-path to convert the path Y to URI X again. Again, maybe this conversion is just #'identity. Eventually, the LSP server knows that the client is now working on a textDocument whose relationship to other opened documents in the workspace it understands (which may or may not be read-only). 6. xref-find-definition on any part of the B2 should now work similarly to this whole flow. > Dmitry: Sounds like you want to advise project-vc-external-roots-function= . Or > Dmitry: change its whole value. I don't understand that "vc" has to do with this. The above implementation should work with any project backend, not just VC. To be clear, my suggestion was to add the ability to add a jar file to project-external-roots. Currently a root is a string representing a directory, per its docstring. But it could be generalized to a string representing any container of files. > Dmitry: Or create an Eglot-specific project backend. I don't understand this suggestion either. Normally Eglot is a client of project information maintained by other project.el backends. Very commonly VC projects, but not always necessarily so. That clashes with the idea of making Eglot simultaneously a supplier of this information. Please read the summary of the outlined above. Maybe there's nothing to be done in project.el if eglot-extend-to-xref is to be used. Or maybe I'm misunderstanding the whole flow, or missing some detail, in which case feel free to correct me. > Danny: Without the files being extracted somewhere would they be able to > Danny: perform any analysis on them? Maybe Eglot just needs to be changed to _not_ strip the leading "jar:file" and leave it completely unchanged. So the server should be able to sort itself out, as long as you give back the very same URI you got -- from the server itself -- to the in-JAR source code. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 28 21:22:56 2022 Received: (at 58790) by debbugs.gnu.org; 29 Oct 2022 01:22:56 +0000 Received: from localhost ([127.0.0.1]:34599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooaYq-0000mA-3x for submit@debbugs.gnu.org; Fri, 28 Oct 2022 21:22:56 -0400 Received: from mail-wr1-f42.google.com ([209.85.221.42]:39588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ooaYl-0000lt-7b for 58790@debbugs.gnu.org; Fri, 28 Oct 2022 21:22:54 -0400 Received: by mail-wr1-f42.google.com with SMTP id o4so8634590wrq.6 for <58790@debbugs.gnu.org>; Fri, 28 Oct 2022 18:22:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=YfpS1nR10Bfg6bgojWmVAj6D5e6eali6KRv8GD47aEA=; b=Sa2r8KUt4OPc99Tdt9qbhnI92ieSO/bEDYRtqubyN2E8HwahBRTxpH9nxjHXw2lv/a 2DVVsQC7xhz7sNoN+k/NAy1JbluU1AJMr2XLD4gqD9goDSWZxZZRDcIuYT56gqObcNPs +RcNVkbphKhGXt50SsUdZq8SaqVF9MvzMdPJ6o4ShAMtdMZsx7f0kFbT+kEDTzyv2xeX wUDnd2rnNClmgAMEG7EDYV2DezTFznLAnh3id4tvM8uiXvjysp8laboxHUI6vmi+PcXZ SbgsykK/mm2sx4tiwiZ56En7qY7iihRP1E21ewq0JXBz/RrSGoWsqYzRMWWM4b1PeYqd Cm0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YfpS1nR10Bfg6bgojWmVAj6D5e6eali6KRv8GD47aEA=; b=U9zOzQRXW5I79zvimNk/vx8LIS5TSnduzkdtulX8uCfEJ4BfRIPmSDsSKM8grg1tyy 2tYW8rHOLzf8tW+JP2utMWVJ9xysT7Dq0LL+0jzkk1VAe+MFGT2GPW7/xP4i7y59vvIR uSjeFRS//kqF0QT6KQqzlsKPjAAdxvjprL9m4rYBW8TFhJtFd+Ruk3AtnMUSTg3T2VBC oHxkCAnNg/YuU2FbIy1QmczHJLG/cc0g6WirkC6YAYnHpgA+0XQrQvZiH60Yq9sZBsjb dLhkSOY7AEHe8sEgTNoFAEu+0gZ/7W1TY+P5XR+HUbWOItjqMsFMP8ixmb1s6Lc1ZbMm u4jg== X-Gm-Message-State: ACrzQf1jntMUfHxusNWuJfMc723iYnb7MVD8hj8n4Wy4X/plx3+jL/ox yj7tC8QV1yfxFrPuv6QuE+I= X-Google-Smtp-Source: AMsMyM6hngVFBoN3v8IfPVtUAfJZp6/wrf2opymtVjRWQAFFu/KOtVhN9YmoExKL++AejmCfVjtrCA== X-Received: by 2002:adf:dc12:0:b0:236:6569:fccc with SMTP id t18-20020adfdc12000000b002366569fcccmr1029132wri.80.1667006565343; Fri, 28 Oct 2022 18:22:45 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id f16-20020a05600c155000b003b47e75b401sm134171wmg.37.2022.10.28.18.22.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Oct 2022 18:22:45 -0700 (PDT) Message-ID: Date: Sat, 29 Oct 2022 04:22:43 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Content-Language: en-US To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Danny Freeman References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> From: Dmitry Gutov In-Reply-To: <87ilk5xq01.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 27.10.2022 18:09, João Távora wrote: > 4. B2 can be setup in a way so that project-current returns the same > object which is returned in B. If this is true, > eglot--current-server discovers the same connection which also > manages B1 and Eglot adds buffer B2 to the list of managed buffers in > that connection. > > However, if eglot-extend-to-xref is non-nil, eglot--current-server > should also discover the correct connection. This is less ideal than > making project-current know that the buffers of source code inside > the jar are also in the same project, but it works. I can explain > the downsides, but it's not very relevant right now. This point seems to be key, to be able to continue 'M-.' from inside the jar. > 5. Upon findin the "file", Eglot transmits a :textDocument/didOpen > notification to the server. This requires eglot--path-to-uri, the > reciprocal of eglot--uri-to-path to convert the path Y to URI X > again. Again, maybe this conversion is just #'identity. > > Eventually, the LSP server knows that the client is now working on a > textDocument whose relationship to other opened documents in the > workspace it understands (which may or may not be read-only). > > 6. xref-find-definition on any part of the B2 should now work similarly > to this whole flow. > >> Dmitry: Sounds like you want to advise project-vc-external-roots-function. Or >> Dmitry: change its whole value. FWIW, project-external-roots might be a red herring for this discussion. I just saw somebody mention project-external-roots, and the above would be a way to add to that list. > I don't understand that "vc" has to do with this. The above > implementation should work with any project backend, not just VC. Okay... > To be clear, my suggestion was to add the ability to add a jar file to > project-external-roots. Currently a root is a string representing a > directory, per its docstring. But it could be generalized to a string > representing any container of files. Container or not, the return value of project-external-roots, just like that of project-root, is determined by the project backend, its internal structures, and how it is customized by the user. We don't provide a setter for 'project-root', so I don't understand the expectation of being able to modify project-external-roots for an arbitrary project type either. >> Dmitry: Or create an Eglot-specific project backend. > > I don't understand this suggestion either. Normally Eglot is a client > of project information maintained by other project.el backends. Very > commonly VC projects, but not always necessarily so. That clashes with > the idea of making Eglot simultaneously a supplier of this information. There is indeed certain tension, but if Eglot wants to decide stuff about the project (which, as I said in the past, could be a reasonable idea), then it could provide its own project backend. We're not necessarily at that point, though, because... > Please read the summary of the outlined above. Maybe there's nothing to > be done in project.el if eglot-extend-to-xref is to be used. ...indeed you could stop at that. Having the jars in project-external-roots could enable the users (after certain integration work) to search across their contents with project-or-external-find-regexp, or jump to files inside with project-or-external-find-file. But as for xref-find-definitions, item 4 in your list should be enough (with either of the alternatives as underlying implementation). From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 28 22:01:56 2022 Received: (at 58790) by debbugs.gnu.org; 29 Oct 2022 02:01:56 +0000 Received: from localhost ([127.0.0.1]:34645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oobAZ-0001nB-IM for submit@debbugs.gnu.org; Fri, 28 Oct 2022 22:01:56 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:38474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oobAX-0001mw-WE for 58790@debbugs.gnu.org; Fri, 28 Oct 2022 22:01:54 -0400 Received: by mail-wr1-f52.google.com with SMTP id a14so8707918wru.5 for <58790@debbugs.gnu.org>; Fri, 28 Oct 2022 19:01:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k6D+aMLmo3F1em4O1Frs1910+vtqTiHvqTu2QcDrGPE=; b=CFKJyjwgEG7ChGewlIrs8Lf/dDKopyeoNeWcq1ReBzucDPSsmGRbKhD5W3Gnre3lC5 FqnsGbGlAzaVM76BjpuLOCg9XJqbWrTo1ARj93UuTnZf9U/oi8xLvJdoErezeCWiSSyR 1rxG1y81LXkiRAGZFLXpQcDbeuWsq//SOtSuXahn5yJzG9E4zQT1wxXC+B/I5jlSXn9l uAUV12d8Ad6z8ZULvv1XSWQ9/3GSLmU8Q87Kf6Eprg4xduf6af73lSO9ItDE5ZJE/QGt FCortUmmamxdE/XAdo6OSFjE+OOgjDHHbsCml4i5iqcu/GvknNr58fhMi1VIStpZFoUY i7oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=k6D+aMLmo3F1em4O1Frs1910+vtqTiHvqTu2QcDrGPE=; b=E6/SC1XdMWZLiam38UYSfWn+Ca2H1kFHGR4topdYHGi/sG2p443lC0v844K27UYSvz ralEKFdyei7rJx7R83zSeB+c4tee7sLUskxyf/jOPVghb03W5EkkaoaPPZKIgF2+yBWE hEYpQXXf+DBSot2puUNN46lKpanwI+YO/VoS0HLbAXneh5ITR3w5AzcUTC7zsSV1sI25 dw/jGXkQ3VtsgJTvvZ1Uj5sZnGw+cgGXHFZ3B6G+Yby5APyCj1asztjVjHxFGgu6aReA z38kd/NNGUCxDYOUZILDqzxViroqP4KV575t+NrBAnRxO/nCcjmV4G5lbM0/aHt0cgO+ 6EVQ== X-Gm-Message-State: ACrzQf3qo5EDML3aL/x5Q+PUdo/LS+6ZQvW/DI9ePAhE3Qaekdegxe1D IKrv/iD4GFYz3GFRVz8rKJo= X-Google-Smtp-Source: AMsMyM5u00U/fmvjC5KKWd5gafxAZueoCNFahrUoFMcMJ+Mjj2u6TbNxWOC2D/275L1u8ju905XlIg== X-Received: by 2002:a5d:59a5:0:b0:236:8d38:4f1d with SMTP id p5-20020a5d59a5000000b002368d384f1dmr1113013wrr.131.1667008907632; Fri, 28 Oct 2022 19:01:47 -0700 (PDT) Received: from krug (87-196-74-89.net.novis.pt. [87.196.74.89]) by smtp.gmail.com with ESMTPSA id v23-20020a05600c215700b003c5571c27a1sm217376wml.32.2022.10.28.19.01.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 19:01:46 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Dmitry Gutov Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: (Dmitry Gutov's message of "Sat, 29 Oct 2022 04:22:43 +0300") References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> Date: Sat, 29 Oct 2022 03:02:56 +0100 Message-ID: <87r0yrwfn3.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, Stefan Kangas , Danny Freeman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: > We don't provide a setter for 'project-root', so I don't understand > the expectation of being able to modify project-external-roots for an > arbitrary project type either. I think I understand your confusion. I'm not suggesting that Eglot modifies it. I'll explain better below. >>> Dmitry: Or create an Eglot-specific project backend. >> I don't understand this suggestion either. Normally Eglot is a >> client >> of project information maintained by other project.el backends. Very >> commonly VC projects, but not always necessarily so. That clashes with >> the idea of making Eglot simultaneously a supplier of this information. > > There is indeed certain tension, but if Eglot wants to decide stuff > about the project (which, as I said in the past, could be a reasonable > idea), then it could provide its own project backend. We're not > necessarily at that point, though, because... Eglot doesn't want to decide anything about project. Eglot justs wants to go into user visible projects and answer the question: (project-current). It wants this because it maps project/major-mode pairs to server connections.=20 Eglot doesn't care if the project is of type 'vc, 'transient, 'visual-studio-solution-file, 'joes-complicated-project, etc.=20=20 So Eglot providing a project backend doesn't make sense. Maybe you think I'm suggesting that Eglot that could collect these references to jars coming from the LSP server and add them to project-external-roots somehow. I'm not suggesting that.=20=20 It's just that an arbitrary project backend, other than 'vc or 'transient, could add a method to project-external-roots. That would be the user's job. I suppose Clojure packages declare somewhere which jars they use. They probably store this information in a file. Java used some ghastly .xml Ant file or Maven or whatever. A specialized project backend could read the file and use it in an implementation of project-external-roots. At this this is how I interpret project.el's CLOS-like protocol for defining new project backends. >> Please read the summary of the outlined above. Maybe there's nothing to >> be done in project.el if eglot-extend-to-xref is to be used. > > ...indeed you could stop at that. Maybe. eglot-extend-to-xref works very well for non-jars, at least for C++ and clangd. Subsequent M-. work very well, too. The downside is that once a system file discovered by the LSP server, it is associated with a given server (_not project_) in Eglot. I don't know what happens if another server also points to the same file. Probably nothing very bad, but there may be some suprising behavior: I haven't tested. > Having the jars in project-external-roots could enable the users > (after certain integration work) to search across their contents with > project-or-external-find-regexp, or jump to files inside with > project-or-external-find-file. That's a very nice point. I don't use Java fortunately, but when I did a long time ago, I think I remember Eclipse let me do this. > But as for xref-find-definitions, item 4 in your list should be enough > (with either of the alternatives as underlying implementation). Let's see what Danny says. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 10:54:33 2022 Received: (at 58790) by debbugs.gnu.org; 29 Oct 2022 14:54:33 +0000 Received: from localhost ([127.0.0.1]:36337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oonEH-0003GO-4K for submit@debbugs.gnu.org; Sat, 29 Oct 2022 10:54:33 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:33532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oonEF-0003GA-Df for 58790@debbugs.gnu.org; Sat, 29 Oct 2022 10:54:32 -0400 Received: by mail-wr1-f43.google.com with SMTP id h9so10128354wrt.0 for <58790@debbugs.gnu.org>; Sat, 29 Oct 2022 07:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=+IkzGP/PDMIUP/e70aAvBQZ8Hpo7hGnab7V/V0bonq0=; b=EnOU+aUeTEpCSGGgUme9+aimn1pH4Li9Gx2Hw4J047NE2f7xLIB+S78PKl8WIhK1H6 1esFzLItI82QorS9O+u+2vfI8kZJWNuV/uc/x5rGtYV5hMXAW3m5xR1wzpxjDqPe9qm9 AEMhzU2Y82bdmTrj0Rd55WIM6f4vqKZQGLD+Op7IIaoOdFCrhb7q8xSjslJYLzRYDK3W EUHqm5xQigksp+4JDrWCAfdJH0a2A78PTMq4PtMP7NBCizojW/Tnct6+DajtYlPU3PPB UpEI0k+RlgdUj4nY5LyocmNH9Lp3ZykdNO+qOqE3bj4d8Lt5IRXXXPssdq0mIsOzi1zJ ydfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+IkzGP/PDMIUP/e70aAvBQZ8Hpo7hGnab7V/V0bonq0=; b=fZtadXJOqQCAPbvJVfhvwkNb71zNz2nhoGEX8leZike+MpKri2xY5K288kUWZzdzjd GjgagOpkVEYlQg7GmyPY37M0T/DBMxzpZ6VeK01/PizBjq8Q/cVRsyIVRJqzs6TqDUFT KH1QC7HMwUWkgWx0HcwprrVsu7SYSZy8lvxDm0IQkUq08tNvBan8Q6pw8A63zNhnSo0x Piq0SoqKls8vW/pKk5avVBTV01fs7FM9YbEFgXxcpkxvvNnzjJh8bdYl+8EDTg6EOlj0 Nycs+0/NfSSSutigreSAkdYRb8jahyahQSIi/8VcqkujQSfUD3P5WQvL9ig5ksfrr9Yn HRyA== X-Gm-Message-State: ACrzQf0mEuI/CAygvN++LQuy9LRHGV5jdISwj2oMc5It1OBzE1ZdHnII 5BfHfq96ckszeO7fnFXnw+k= X-Google-Smtp-Source: AMsMyM7jBDVFD6EmDfInAJyE/TAVJAdC10ogwFEayc1J2fx8M9fDTpF/okN5veGzHYNoBC0kPXIyhw== X-Received: by 2002:a5d:590d:0:b0:236:4ddd:1869 with SMTP id v13-20020a5d590d000000b002364ddd1869mr2423966wrd.709.1667055265210; Sat, 29 Oct 2022 07:54:25 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id bd26-20020a05600c1f1a00b003c6b70a4d69sm1833119wmb.42.2022.10.29.07.54.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 Oct 2022 07:54:24 -0700 (PDT) Message-ID: <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> Date: Sat, 29 Oct 2022 17:54:23 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Content-Language: en-US To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> From: Dmitry Gutov In-Reply-To: <87r0yrwfn3.fsf@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, Stefan Kangas , Danny Freeman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 29.10.2022 05:02, João Távora wrote: > Eglot doesn't want to decide anything about project. Eglot justs wants > to go into user visible projects and answer the question: > (project-current). It wants this because it maps project/major-mode > pairs to server connections. > > Eglot doesn't care if the project is of type 'vc, 'transient, > 'visual-studio-solution-file, 'joes-complicated-project, etc. > > So Eglot providing a project backend doesn't make sense. Maybe you > think I'm suggesting that Eglot that could collect these references to > jars coming from the LSP server and add them to project-external-roots > somehow. I'm not suggesting that. That was my impression, yes. > It's just that an arbitrary project backend, other than 'vc or > 'transient, could add a method to project-external-roots. That would be > the user's job. I suppose Clojure packages declare somewhere which jars > they use. They probably store this information in a file. Java used > some ghastly .xml Ant file or Maven or whatever. A specialized project > backend could read the file and use it in an implementation of > project-external-roots. At this this is how I interpret project.el's > CLOS-like protocol for defining new project backends. Okay: some new project type. Or a new feature that parses build files. Or etc. All of that could be reasonable, but is yet for somebody to design and implement. IMHO a feature that takes up the goal of providing comprehensive IDE support could take up that responsibility too. But I'm fine either way. That would also depend on whether the LSP protocol is ever going to be extended toward providing build file information, running build tasks, etc. >>> Please read the summary of the outlined above. Maybe there's nothing to >>> be done in project.el if eglot-extend-to-xref is to be used. >> >> ...indeed you could stop at that. > > Maybe. eglot-extend-to-xref works very well for non-jars, at least for > C++ and clangd. Subsequent M-. work very well, too. > > The downside is that once a system file discovered by the LSP server, it > is associated with a given server (_not project_) in Eglot. I don't > know what happens if another server also points to the same file. > Probably nothing very bad, but there may be some suprising behavior: I > haven't tested. The dilemma of having external files associated with just the latest server seems unavoidable. Of course you could collect the full list of servers which the external file "belongs to", and then flat_map the requests through them all. But it's probably not what the user expects most of the time. >> Having the jars in project-external-roots could enable the users >> (after certain integration work) to search across their contents with >> project-or-external-find-regexp, or jump to files inside with >> project-or-external-find-file. > > That's a very nice point. I don't use Java fortunately, but when I did > a long time ago, I think I remember Eclipse let me do this. Maybe it's covered by existing LSP functionality, though. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 11:36:29 2022 Received: (at 58790) by debbugs.gnu.org; 29 Oct 2022 15:36:29 +0000 Received: from localhost ([127.0.0.1]:36373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oonsr-0004IP-2O for submit@debbugs.gnu.org; Sat, 29 Oct 2022 11:36:29 -0400 Received: from mail-ed1-f48.google.com ([209.85.208.48]:47082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oonsq-0004ID-5k for 58790@debbugs.gnu.org; Sat, 29 Oct 2022 11:36:28 -0400 Received: by mail-ed1-f48.google.com with SMTP id u24so2605547edd.13 for <58790@debbugs.gnu.org>; Sat, 29 Oct 2022 08:36:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=8K0r07jJ6n0JR/cLu2aCL5eYhNo4/GzoEzNzfZWS7Gs=; b=PWU5gl/ukknrDFpQhQBWg0XLtxO0V+TBsNpE5fsSc6Gky4HKZQ0rpIF+hNwnMBjFue 3KK7UbKEHPyWw8sbvThgso/eyxEsBZBP9JotaHGUpxltAHXmlTdWtW8gthVyVjR+WOzh /D1hQMRbNFzT2kO3UjlQ4a6Z1GRJZf962vHpGHyrju7zEGD+vGComOowuScrAkYRrDXj TJKwPqUeWpKbyVq7E/HbVqsGlNrcwnjG/Lh5lyVIRbJq3imz3qVb+Y1KYfSINe+A5rKC ++MOxhsUUGaip+583ueeq7Iy/gQneFkzprBl9sJovwLyz1Oxbr3T8rYp0OyHUIhdcHaf 1zLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8K0r07jJ6n0JR/cLu2aCL5eYhNo4/GzoEzNzfZWS7Gs=; b=0iL+i7V31GmLDfsGDZGUa47psLVm+NtvopaQAeBLyQlwsfTCmFuXp618JWimjiZShJ 1M1U8XnuJlK9muKC16GuWgklfR9tkM2IQjntsZitGxr2uHMGeey3yiKVK9Yg32fEI7Cp Yhq2mW9WpZd3ZgR958H4/+eZUhCqYuXGYg4tPNDVKV1OeHj73KclKhQZqFT9mm7BXX5r 9wrzLT6+6XN0I3xAAVItZrYEwIW/NJxXE2T96iZiGmJfbk+kK0plJHyPs1hmW2qHWbdD N3CFAr2DOKS1diz82zhr+Aro/1bPEYyanX5shtLtnEDU5TkFX35WRnJxIHfmQwLFKxK6 q57w== X-Gm-Message-State: ACrzQf0u4OALFdAasHNED2grHE8iiZAugwF320RZQa4BGtQ9rUGkYl0D F7xNR+YMjsazZExUhTer+eU= X-Google-Smtp-Source: AMsMyM7C2IXry6x3zNlB/BYS7JxXoH7kJGS9ABbyZahhnvAp41OdTY2l3Uwfa5RWjbSb1CpxJzWOSw== X-Received: by 2002:a05:6402:2319:b0:45c:4231:de18 with SMTP id l25-20020a056402231900b0045c4231de18mr4804388eda.383.1667057782053; Sat, 29 Oct 2022 08:36:22 -0700 (PDT) Received: from betli.gmail.com (catv-86-101-66-128.catv.fixed.vodafone.hu. [86.101.66.128]) by smtp.gmail.com with ESMTPSA id vl14-20020a170907b60e00b007803083a36asm790108ejc.115.2022.10.29.08.36.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Oct 2022 08:36:21 -0700 (PDT) From: Felician Nemeth To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server References: Date: Sat, 29 Oct 2022 17:36:18 +0200 In-Reply-To: (Danny Freeman via's message of "Tue, 25 Oct 2022 17:44:22 -0400") Message-ID: <87fsf6k5fx.fsf@betli.tmit.bme.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEUMBwgHAgMFAAGPjY7/ //80MDHq6eqJt3pKAAABr0lEQVQ4jX2UzZKDIAzHqR177q7TPbtx2HMr6guQcrbY9txZ0fd/hA0f onXazcEJ/CD8E4Js8/HS9mwjXtqeMRxHXJkakTEm4b4GPVQW8PU8ov4fQCqeThlF60MBWdo1IXzd 2nEEZE7CEAZLwI0N/gJAhTj7ESQAX4gPgO8lyI+cvgViSVPlNomAj2M9gW40eg7VWY3cATjUcyiO Z+i03cFruGLYoUR7VyU3HihdmCEVhoDN65FXkpbSxkomOzsTQN/gySaodGb9Gdi1oSRXP46gdBWh LcUKJNdeGCWac74GKakmne0aHCFvyqJPYLsCFAVlhRTvGdzMdLHqtgRyUulyXIAH7CYQ3AB0Nody JQhAkq/qtOnbjhxdzYDkXPxlH5y4WdUAeUcX1NVJ6GR7UQEYPGWoAnA36OQNn5lRRp38vHTAp9Br LoTmvlPPDoRCKzpjG1SXT89AaT5l456BamJuMcs+NIOMzJ/s5dI6yUVcrARlruwOebfdv6gunTn4 ww3+QjGBEn5suVyLHoSGvAqREuDLN+iqZ+VcFg+HBbsJUU9+FZthbez9T+bdb+kPv2Ls6ct3hTkA AAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, Stefan Kangas , Danny Freeman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > The problem occurs when using `xref-find-defintions` while eglot is > managing a clojure buffer with clojure-lsp. If the symbol that > xref-find-definitions is activated on is defined in a jar file, > clojure-lsp by default will provide a location with a response like > the following > > (:jsonrpc "2.0" :id 14 :result > (:uri > "zipfile:///Users/andreperictavares/.m2/repository/org/clojure/tools.namespace/0.3.1/tools.namespace-0.3.1.jar::clojure/tools/namespace/find.clj" > ... )) > Can you, please, consider merging something like github#854? https://github.com/joaotavora/eglot/pull/854 Currently, Eglot assumes that the uri-scheme is always "file". I think Eglot should at least warn the user if this assumption is false instead of silently failing as it currently does. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 13:09:58 2022 Received: (at 58790) by debbugs.gnu.org; 29 Oct 2022 17:09:58 +0000 Received: from localhost ([127.0.0.1]:36518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oopLJ-0000TM-K5 for submit@debbugs.gnu.org; Sat, 29 Oct 2022 13:09:57 -0400 Received: from mail-oa1-f51.google.com ([209.85.160.51]:43982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oopLF-0000T2-2y for 58790@debbugs.gnu.org; Sat, 29 Oct 2022 13:09:56 -0400 Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-13c2cfd1126so9560756fac.10 for <58790@debbugs.gnu.org>; Sat, 29 Oct 2022 10:09:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=j1lJFD0UdY/Mle22YRrc10YGVB7p2T97qE1UNQOjeEg=; b=ME2GwVfuNa72hy2GqNiQRbzkTwpm2DP5OilHYDkEgnV2JgpKzCsaXAmbWSoGkBqFm5 15O/UzoWuaokfuHrr7KwMGWu3fjKhG5Xg6IbK2TsCg/YY72SlQbscgBwNYjuBT6NaxFS jbGJTwxYCL9v0+Uep/wEfwBc+FnZ64sZrYBmzP/GcuPsyioCz3c05HaKZLNdlzfVNc2a ByT6ZxAk95nViOfwDO3KC0ordcRZrgxwPLUMll++NAznuYbqHDDwh0itgbKwCo7Niqxt EhAz1QBxc+4JRZdDTGV1G/vweV7/IK1ueIl4eDLr0UMLdGki1obXqnoZD6TYzOMtZHF6 FoRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=j1lJFD0UdY/Mle22YRrc10YGVB7p2T97qE1UNQOjeEg=; b=0ngD2t9OOvGx6mHMRoK/L3Vc81LksI0DzAb8BBA56DIaa/mJbVJl899SoCBim5P2C5 F6UxtPTsIYihprShjlcZ7/c1D5XafsVQ/Qpyxq8IWBsAbPyG2JerfnILeWvcFr3eoFEh oy5UwpkXzfbGEHUTUtnfHwAAWcClt1belmXLi4UHFfp7Vh/ODz1GcwzFJ7OO1cIYhibX pf6/7tjkPPv2UNsoZfTrXWnv4aZlgm8YuTyZ1kx+BkMTPDj+/Z/Y1ftJGhsVsR+xnvBZ sxPiykdGEi8uRT7oEbFNLY1STweikSUFkP38NXo960xF6eRu68oZSN+FTcA1DaiO+KPo eg8g== X-Gm-Message-State: ACrzQf21fnJCyMINmLEA5agTqOqzbWZSj4V+m7CLwxBKkTlqBf232GZa ZxHY2E3ACkZgWqoJW/NiU4o0mgLj/RuaPANj0qI= X-Google-Smtp-Source: AMsMyM6hWlalHZ82QMi8GwY4eaQuQyEYuuFiTVEyibn9oRZ1M5gg9A+D/Br2A7HSj66jsyEuChT3x58TYVjZQO6xKq4= X-Received: by 2002:a05:6870:2155:b0:13c:8db1:2446 with SMTP id g21-20020a056870215500b0013c8db12446mr3920084oae.171.1667063387374; Sat, 29 Oct 2022 10:09:47 -0700 (PDT) MIME-Version: 1.0 References: <87fsf6k5fx.fsf@betli.tmit.bme.hu> In-Reply-To: <87fsf6k5fx.fsf@betli.tmit.bme.hu> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Sat, 29 Oct 2022 18:09:36 +0100 Message-ID: Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server To: Felician Nemeth Content-Type: multipart/alternative; boundary="00000000000005c76905ec2f713f" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, Stefan Kangas , Danny Freeman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000005c76905ec2f713f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes, i think that makes sense. Can't look at that pull request right now, but my current thinking is to leave the URI unprocessed if the scheme is anything other than file://. Then file-name-handler-alist can decide what to do with it. But warning the user on such occasions sounds a bit too noisy. Maybe a one-time warning. The only other thing to watch out for is that wherever find-file lands is, its buffer-file-name should probably be left with the unchanged URI, so that eglot--path-to-uri can return it and tell the LSP server that we're now managing the buffer using the original URI. Jo=C3=A3o On Sat, Oct 29, 2022, 16:36 Felician Nemeth wrote: > > The problem occurs when using `xref-find-defintions` while eglot is > > managing a clojure buffer with clojure-lsp. If the symbol that > > xref-find-definitions is activated on is defined in a jar file, > > clojure-lsp by default will provide a location with a response like > > the following > > > > (:jsonrpc "2.0" :id 14 :result > > (:uri > > > "zipfile:///Users/andreperictavares/.m2/repository/org/clojure/tools.nam= espace/0.3.1/tools.namespace-0.3.1.jar::clojure/tools/namespace/find.clj" > > ... )) > > > > Can you, please, consider merging something like github#854? > https://github.com/joaotavora/eglot/pull/854 > > Currently, Eglot assumes that the uri-scheme is always "file". I think > Eglot should at least warn the user if this assumption is false instead > of silently failing as it currently does. > > Thanks. > --00000000000005c76905ec2f713f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yes, i think that makes sense. Can't look at that pul= l request right now, but my current thinking is to leave the URI unprocesse= d if the scheme is anything other than file://.=C2=A0

Then file-name-handler-alist can = decide what to do with it.

But warning the user on such occasions sounds a bit too noisy. Maybe a o= ne-time warning.

The= only other thing to watch out for is that wherever find-file lands is, its= buffer-file-name should probably be left with the unchanged URI, so that e= glot--path-to-uri can return it and tell the LSP server that we're now = managing the buffer using the original URI.

Jo=C3=A3o

On Sat, Oct 29, 2022, 16:36 Felici= an Nemeth <felician.nemeth@= gmail.com> wrote:
> The= problem occurs when using `xref-find-defintions` while eglot is
> managing a clojure buffer with clojure-lsp. If the symbol that
> xref-find-definitions is activated on is defined in a jar file,
> clojure-lsp by default will provide a location with a response like > the following
>
> (:jsonrpc "2.0" :id 14 :result
>=C2=A0 =C2=A0(:uri
>=C2=A0 =C2=A0"zipfile:///Users/andreperictavares/.m2/repository/or= g/clojure/tools.namespace/0.3.1/tools.namespace-0.3.1.jar::clojure/tools/na= mespace/find.clj"
> ... ))
>

Can you, please, consider merging something like github#854?
https://github.com/joaotavora/eglot/pull/854<= /a>

Currently, Eglot assumes that the uri-scheme is always "file".=C2= =A0 I think
Eglot should at least warn the user if this assumption is false instead
of silently failing as it currently does.

Thanks.
--00000000000005c76905ec2f713f-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 29 15:35:35 2022 Received: (at 58790) by debbugs.gnu.org; 29 Oct 2022 19:35:35 +0000 Received: from localhost ([127.0.0.1]:36735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oorcF-0006Y2-6W for submit@debbugs.gnu.org; Sat, 29 Oct 2022 15:35:35 -0400 Received: from out2.migadu.com ([188.165.223.204]:12932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oorcB-0006Xq-8f for 58790@debbugs.gnu.org; Sat, 29 Oct 2022 15:35:33 -0400 Message-ID: <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> Date: Sat, 29 Oct 2022 15:35:24 -0400 MIME-Version: 1.0 Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server To: Dmitry Gutov , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman 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 bWFuIDxkYW5ueUBkZnJlZW1hbi5lbWFpbD7CwY4EEwE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btkL3SVG0KghkVDXB/tCutwLXo93Q4ywxpv peOODDWTRi9uidWjjwhq1Ax01bDMqylo+1ZPAOnALkQVsD5fzMQuiP7z In-Reply-To: <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------WAuGL1sPiGFgmkAk034hgDyP" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------WAuGL1sPiGFgmkAk034hgDyP Content-Type: multipart/mixed; boundary="------------8agN9bTUvfQyTWABQeqF70AQ"; protected-headers="v1" From: Danny Freeman To: Dmitry Gutov , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Cc: 58790@debbugs.gnu.org, Stefan Kangas Message-ID: <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> In-Reply-To: <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> --------------8agN9bTUvfQyTWABQeqF70AQ Content-Type: multipart/mixed; boundary="------------j0ijsPoPz6QZ5vQm6uwVDIzU" --------------j0ijsPoPz6QZ5vQm6uwVDIzU Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 ID4gMi4gRWdsb3QgY29udmVydHMgdGhlIFVSSSBYIGludG8gYSBzb21lIGZpbGUgZGVzaW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FIGV4cGVyZWluY2UsIGFuZCBkb2VzIHNvIGF0IHRoZSBoZWF2eXdlaWdodCBj b3N0IG9mDQpydW5uaW5nIHRoZSBhY3R1YWwgcHJvamVjdC4NCg0KVGhhbmsgeW91IGJvdGgg Zm9yIHRoZSBpbnB1dC4gSXQncyBnaXZlbiBtZSBhIF9sb3RfIHRvIHRoaW5rIGFib3V0IGFu ZA0KZXhwZXJpbWVudCB3aXRoLiBJdCB3aWxsIHByb2JhYmx5IHRha2UgbWUgc29tZSB0aW1l IHRvIHdvcmsgdGhyb3VnaCB0aGVzZQ0KcHJvYmxlbXMgY29uc2lkZXJpbmcgbXkgZGF5IGpv YiBhbmQgYmFieS4gRm9yZ2l2ZSBtZSBpZiBpdCB0YWtlcyBzb21lIA0KdGltZSBmb3INCm1l IHRvIHJlc3BvbmQuDQoNCg== --------------j0ijsPoPz6QZ5vQm6uwVDIzU Content-Type: application/pgp-keys; name="OpenPGP_0x369D556E204D19D6.asc" Content-Disposition: attachment; filename="OpenPGP_0x369D556E204D19D6.asc" Content-Description: OpenPGP public key Content-Transfer-Encoding: quoted-printable -----BEGIN PGP PUBLIC KEY BLOCK----- xsFNBF/FF5oBEACwm2hCve4DBa0zxaHGuT5G8ul/QXCCeFXgDpmQv56giEh1aeFz 0O1NkbcV4Y/1aw8Jwc2A84QuYbYDXiuLGyB8DSUAGbZCgSz5pJadSniv7Qy/fNsE 7gb23+vqcZRZ1Wcc0C5pEuCVnqqim9hBirTahbQXVj8cXocI9hKxCSDJDHc0RABi 4llTRWAQXNGxImaQqFML2IEGI5LoWbLswdoZNfE181lX2iY9EeH1SyOHL6VN3O+E Mpsfe3409Vc4OXABTb64RX4JchtfSgilLVPq1mK5xKOacmTPe+gQytdIvmCsw+bv D2Isuao1vSfwsFaFpl6p1AhSx9SXl9SsSML4FUVVkQVYbDThp8epGu6ceVswU96Z FYBlLARTI9EwzfvoClBkHtj6TNVBzIYK8IIOHolY26qYXNk9bOn0eeEezkB37/DM 81Z9OzY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Iqtl8lScC2QoIgkDDkozV03h oi7zIZSrobrDXaB/19BluGgDCgK47Q1+jIx/PPLv9HwUMscbeqcyYzYxJTrsaNrG 4QNqzKM+39fcB7HyvtpfU1OH/eDDTgIM2CStV6X2gvVBKEmVHYixhpCUK8UVfuTH B+7EQ2Mh8dr99jXVJDsqKRPxTiorcNAqwfNe8G0vi7Al2LjqOTFIfxin/DMYHfFS d4QjjAjXIwl7JBFLc569TX+6yrRy3jCZXM2DHrU53QCbxCBqMXJ3lqe0ISYS190y QC5dRNVIyZCY+siOwXj2NHufvU8h8pliCBCdIbtkL3SVG0KghkVDXB/tCutwLXo9 3Q4ywxpvpeOODDWTRi9uidWjjwhq1Ax01bDMqylo+1ZPAOnALkQVsD5fzMQuiP7z =3DLEku -----END PGP PUBLIC KEY BLOCK----- --------------j0ijsPoPz6QZ5vQm6uwVDIzU-- --------------8agN9bTUvfQyTWABQeqF70AQ-- --------------WAuGL1sPiGFgmkAk034hgDyP Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEZlmkfdWCc9c2e19UNp1VbiBNGdYFAmNdgHwFAwAAAAAACgkQNp1VbiBNGdaM 9RAArFUe5JrWIZaaUO7/DRXlOk5Q1NnmlyPP4fVoCWHuMB5lq3BEsjaSoes57couaPYQXMRcSfdd CqXpBbbeFTxuXFFS6dhE7jcdIe6/l0dpNGGGGzL7dX7vNGI3UzE7bGnXU+Cl2Elnp/bm9vngjsm9 Y3CTfAyxSJBG0EvBW014V7siSAIG1Ge8iHXjs1TJ1hR6bYUhCgQClYkerWYfjDiipVoajACfNvOS d93s/c68H7SfRSwWrZq82k2bswxuJpM5boNVL8+KqmbgIMmV7iUJiLZc+dMOEXDqGtmXYBW9lU1k cfTW1HlA2xM7vpys/Pq9j88AkXpk8NhCuegBCQDFpliRv7gFUFkDQ6PlkcMMhAgQdHI4nC1sgFIc zQhOLXGH8v+2REofdDrZ4+bGlUruNNZLSPux2bq+mq3d1Pz3owwuQ4WYTkKvMaH6FtVtbRHwsogk aRoOdGQdsnQwUmYprH5pkowoIuzjCd2gyJn2EUCKoVmp9RsQB9oJVjKx0Im6cf5sdUhX8lsdYdFg 7mkqxG29C3ubH4n0Dsw3QHWXKSvfssix4lI+iI5P6MekG/j2v7rUZM8dShb9W498FMP7cnFvQykd ZjQG1+vpw3BrUntf+DPqkRnUbjNKSZYNEMwPMMHfLpMn5G2gLhYGBILwp/svvMsmDDNZwEmrVAFU Cjc= =ekRY -----END PGP SIGNATURE----- --------------WAuGL1sPiGFgmkAk034hgDyP-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 31 10:40:31 2022 Received: (at 58790) by debbugs.gnu.org; 31 Oct 2022 14:40:31 +0000 Received: from localhost ([127.0.0.1]:41474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opVxm-000434-O2 for submit@debbugs.gnu.org; Mon, 31 Oct 2022 10:40:31 -0400 Received: from out0.migadu.com ([94.23.1.103]:48063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opVxj-00042v-S0 for 58790@debbugs.gnu.org; Mon, 31 Oct 2022 10:40:29 -0400 Content-Type: multipart/mixed; boundary="------------0HhFE34BX7RjIzlTVDyCKbjZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1667227226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=vF70c3FvKB48pZwP5dMrrGUK/IqXMS55jQeatyYAkyw=; b=tgPYxBai8bIgp35QfJj+Zk4Y+KZ/qHN/jbB5dsQTD+xE44FXDTFPzTbdZH+eKGcu+9552w WESfOYupyk9vR6dQJ6Pqw5RfD8O4BNiZitcgzB/LZBOMPf4quSqUuv7SLR6ACkp5iQNFYK aEMKwhrxdSdLcsYFkPjeqJYynTVt2ng= Message-ID: <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> Date: Mon, 31 Oct 2022 10:40:22 -0400 MIME-Version: 1.0 Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Dmitry Gutov , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> 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 kY4ANlUip4x7nt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FSd4QjjAjXIwl7JBFLc569TX+6yrRy3jCZXM2DHrU53QCbxCBqMXJ3lqe0ISYS190y QC5dRNVIyZCY+siOwXj2NHufvU8h8pliCBCdIbtkL3SVG0KghkVDXB/tCutwLXo93Q4ywxpv peOODDWTRi9uidWjjwhq1Ax01bDMqylo+1ZPAOnALkQVsD5fzMQuiP7z Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This is a multi-part message in MIME format. --------------0HhFE34BX7RjIzlTVDyCKbjZ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit I have a new patch attached that does what João suggested in the 5 point list, which I will respond to again > 2. Eglot converts the URI X into a some file designator Y, using > eglot--uri-to-path. Y may or may not be === X, as long as there is > exactly one X for every Y. Eglot makes xref-item objects from it > using xref-make-match and xref-make-file-location. The designator Y > goes into the 'file' slot of the xref-file-location object. The patch leaves X === Y for `jar` type URIs. My updated packages now deals with the full jar URIs. No conversion are done. My new package can be found here: https://git.sr.ht/~dannyfreeman/jarchive/tree/9148ed7ada03ff2516f6e4ede20c453974d6da19/item/jarchive.el > 4. B2 can be setup in a way so that project-current returns the same > object which is returned in B. If this is true, > eglot--current-server discovers the same connection which also > manages B1 and Eglot adds buffer B2 to the list of managed buffers in > that connection. > > However, if eglot-extend-to-xref is non-nil, eglot--current-server > should also discover the correct connection. This is less ideal than > making project-current know that the buffers of source code inside > the jar are also in the same project, but it works. I can explain > the downsides, but it's not very relevant right now. My newly updated package does nothing with `project-current`, as I have no obvious way to access the previous project when extracting files from the jar. (Extracting now happens in `insert-file-contents` instead of `get-file-buffer`) BUT eglot-extend-to-xref works as it should with this, and I think I prefer that. It allows people who don't want that behavior to disable `eglot-extend-to-xref` and have eglot start up a new lsp server when visiting the file. Idk why anyone would want that but you never know. > 5. Upon findin the "file", Eglot transmits a :textDocument/didOpen > notification to the server. This requires eglot--path-to-uri, the > reciprocal of eglot--uri-to-path to convert the path Y to URI X > again. Again, maybe this conversion is just #'identity. > > Eventually, the LSP server knows that the client is now working on a > textDocument whose relationship to other opened documents in the > workspace it understands (which may or may not be read-only). Sending the full jar uri back to the lsp server worked exactly as intended here. I am honestly surprised I didn't have to change anything in clojure-lsp. It can do it's analysis on the file without issue. > 6. xref-find-definition on any part of the B2 should now work similarly > to this whole flow. It does!!!!! As for this question > I don't know what happens if another server also points to the same file. > Probably nothing very bad, but there may be some suprising behavior: I > haven't tested. The same file continues to work with respect to the original lsp server that was used to open it. The second lsp server is not conidered. I guess because eglot can only work with one lsp server at a time. If you want to associate the un-jar'd file with the second server, close it and xref-find-defintions to it from a file in the second server. That seems like a fine workaround to me, and its not something I've ever encountered in my routine development workflow. So, what do yall think about the patch? Is that something you might consider for eglot? I believe I could also accomplish something similar with "advice" in my package and leave eglot alone, but I would be poking at eglot internals which seems not ideal. --------------0HhFE34BX7RjIzlTVDyCKbjZ Content-Type: text/x-patch; charset=UTF-8; name="0001-Do-not-parse-jar-type-URIs-provided-by-lsp-servers-i.patch" Content-Disposition: attachment; filename*0="0001-Do-not-parse-jar-type-URIs-provided-by-lsp-servers-i.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSA2NzFkMzExN2JkOWE4MTA2MTZkZDViYmRmZmZhMThlOTFhNGQ5ODk2IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBkYW5ueWZyZWVtYW4gPGRhbm55QGRmcmVlbWFuLmVt YWlsPgpEYXRlOiBNb24sIDMxIE9jdC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pbGUgY2hhbmdlZCwgMjUgaW5zZXJ0aW9ucygrKSwgMTIgZGVsZXRpb25zKC0pCgpkaWZm IC0tZ2l0IGEvbGlzcC9wcm9nbW9kZXMvZWdsb3QuZWwgYi9saXNwL3Byb2dtb2Rlcy9lZ2xv dC5lbAppbmRleCBjNTg3MDYxODM3Li5iOGY1MGUzY2Q4IDEwMDY0NAotLS0gYS9saXNwL3By b2dtb2Rlcy9lZ2xvdC5lbAorKysgYi9saXNwL3Byb2dtb2Rlcy9lZ2xvdC5lbApAQCAtMjMx LDcgKzIzMSw3IEBAIGVnbG90LXNlcnZlci1wcm9ncmFtcwogICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAoaHRtbC1tb2RlIC4gLChlZ2xvdC1hbHRlcm5hdGl2ZXMgJygoInZz Y29kZS1odG1sLWxhbmd1YWdlLXNlcnZlciIgIi0tc3RkaW8iKSAoImh0bWwtbGFuZ3VhZ2Vz ZXJ2ZXIiICItLXN0ZGlvIikpKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KGRvY2tlcmZpbGUtbW9kZSAuICgiZG9ja2VyLWxhbmdzZXJ2ZXIiICItLXN0ZGlvIikpCiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY2xvanVyZS1tb2RlIGNsb2p1cmVz Y3JpcHQtbW9kZSBjbG9qdXJlYy1tb2RlKQotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgLiAoImNsb2p1cmUtbHNwIikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAuICgiY2xvanVyZS1sc3AiIDppbml0aWFsaXphdGlvbk9wdGlvbnMgKDpkZXBlbmRl bmN5LXNjaGVtZSAiamFyIikpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo Y3NoYXJwLW1vZGUgLiAoIm9tbmlzaGFycCIgIi1sc3AiKSkKICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKHB1cmVzY3JpcHQtbW9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V0IGZv ciB0cmFtcHkgcGF0aHMuCi0gICAgICAgICAgICAgKGRpcmVjdG9yeS1maWxlLW5hbWUgKGZp bGUtbG9jYWwtbmFtZSB0cnVlcGF0aCkpCi0gICAgICAgICAgICAgZWdsb3QtLXVyaS1wYXRo LWFsbG93ZWQtY2hhcnMpKSkpCisgIChpZiAoYW5kIGVnbG90LXByZXNlcnZlLWphci11cmkg KGVxdWFsICJqYXIiICh1cmwtdHlwZSAodXJsLWdlbmVyaWMtcGFyc2UtdXJsIHBhdGgpKSkp CisgICAgICBwYXRoCisgICAgKGxldCAoKHRydWVwYXRoIChmaWxlLXRydWVuYW1lIHBhdGgp KSkKKyAgICAgIChjb25jYXQgImZpbGU6Ly8iCisgICAgICAgICAgICAgIDs7IEFkZCBhIGxl YWRpbmcgIi8iIGZvciBsb2NhbCBNUyBXaW5kb3dzLXN0eWxlIHBhdGhzLgorICAgICAgICAg ICAgICAoaWYgKGFuZCAoZXEgc3lzdGVtLXR5cGUgJ3dpbmRvd3MtbnQpCisgICAgICAgICAg ICAgICAgICAgICAgIChub3QgKGZpbGUtcmVtb3RlLXAgdHJ1ZXBhdGgpKSkKKyAgICAgICAg ICAgICAgICAgICIvIikKKyAgICAgICAgICAgICAgKHVybC1oZXhpZnktc3RyaW5nCisgICAg ICAgICAgICAgICA7OyBBZ2FpbiB3YXRjaCBvdXQgZm9yIHRyYW1weSBwYXRocy4KKyAgICAg ICAgICAgICAgIChkaXJlY3RvcnktZmlsZS1uYW1lIChmaWxlLWxvY2FsLW5hbWUgdHJ1ZXBh dGgpKQorICAgICAgICAgICAgICAgZWdsb3QtLXVyaS1wYXRoLWFsbG93ZWQtY2hhcnMpKSkp KQorCisoZGVmdW4gZWdsb3QtLXBhcnNlLXVyaSAodXJpKQorICAiVHJ5IHRvIHBhcnNlIGEg VVJJLiIKKyAgKGxldCAoKHVybCAodXJsLWdlbmVyaWMtcGFyc2UtdXJsIHVyaSkpKQorICAg IChpZiAoYW5kIGVnbG90LXByZXNlcnZlLWphci11cmkgKHN0cmluZz0gImphciIgKHVybC10 eXBlIHVybCkpKQorICAgICAgICB1cmkKKyAgICAgICh1cmwtdW5oZXgtc3RyaW5nICh1cmwt ZmlsZW5hbWUgdXJsKSkpKSkKIAogKGRlZnVuIGVnbG90LS11cmktdG8tcGF0aCAodXJpKQog ICAiQ29udmVydCBVUkkgdG8gZmlsZSBwYXRoLCBoZWxwZWQgYnkgYGVnbG90LS1jdXJyZW50 LXNlcnZlcicuIgogICAod2hlbiAoa2V5d29yZHAgdXJpKSAoc2V0cSB1cmkgKHN1YnN0cmlu ZyAoc3ltYm9sLW5hbWUgdXJpKSAxKSkpCiAgIChsZXQqICgoc2VydmVyIChlZ2xvdC1jdXJy ZW50LXNlcnZlcikpCiAgICAgICAgICAocmVtb3RlLXByZWZpeCAoYW5kIHNlcnZlciAoZWds b3QtLXRyYW1waXNoLXAgc2VydmVyKSkpCi0gICAgICAgICAocmV0dmFsICh1cmwtdW5oZXgt c3RyaW5nICh1cmwtZmlsZW5hbWUgKHVybC1nZW5lcmljLXBhcnNlLXVybCB1cmkpKSkpCisg ICAgICAgICAocmV0dmFsIChlZ2xvdC0tcGFyc2UtdXJpIHVyaSkpCiAgICAgICAgICA7OyBS ZW1vdmUgdGhlIGxlYWRpbmcgIi8iIGZvciBsb2NhbCBNUyBXaW5kb3dzLXN0eWxlIHBhdGhz LgogICAgICAgICAgKG5vcm1hbGl6ZWQgKGlmIChhbmQgKG5vdCByZW1vdGUtcHJlZml4KQog ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGVxIHN5c3RlbS10eXBlICd3aW5kb3dz LW50KQotLSAKMi4zNy4zCgo= --------------0HhFE34BX7RjIzlTVDyCKbjZ-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 01 13:37:28 2022 Received: (at 58790) by debbugs.gnu.org; 1 Nov 2022 17:37:28 +0000 Received: from localhost ([127.0.0.1]:44156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opvCZ-0002VO-Oy for submit@debbugs.gnu.org; Tue, 01 Nov 2022 13:37:27 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:56891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opvCY-0002Uz-71 for 58790@debbugs.gnu.org; Tue, 01 Nov 2022 13:37:27 -0400 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 62DA41BF205; Tue, 1 Nov 2022 17:37:16 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: (Dmitry Gutov's message of "Sat, 29 Oct 2022 04:22:43 +0300") Organization: LINKOV.NET References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> Date: Tue, 01 Nov 2022 19:25:48 +0200 Message-ID: <8635b2li4z.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, =?iso-8859-1?Q?Jo=E3o_T=E1vora?= , Danny Freeman , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> Please read the summary of the outlined above. Maybe there's nothing to >> be done in project.el if eglot-extend-to-xref is to be used. > > Having the jars in project-external-roots could enable the users (after > certain integration work) to search across their contents with > project-or-external-find-regexp, or jump to files inside with > project-or-external-find-file. FWIW, here's a possible way how to get everything to work, so that 'C-x p G' works either when a file is visited in a project dir or in a lib dir, and eglot is connected to the project server by visiting any file in the lib dir (that eglot-extend-to-xref can't do): ``` (defvar my-project-dir "...") (defvar my-lib-dir "...") (add-hook 'prog-mode-hook (lambda () (when (string-match-p my-project-dir default-directory) (setq-local project-vc-external-roots-function (lambda () (list my-lib-dir))) (eglot-ensure)))) (defun my-project-try-lib (dir) (when (string-match-p my-lib-dir dir) (if (bound-and-true-p eglot-lsp-context) ;; for eglot.el `(vc Git ,my-project-dir) ;; for project.el `(transient . ,my-lib-dir)))) (with-eval-after-load 'project (add-to-list 'project-find-functions 'my-project-try-lib)) ``` From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 02 04:08:24 2022 Received: (at 58790) by debbugs.gnu.org; 2 Nov 2022 08:08:24 +0000 Received: from localhost ([127.0.0.1]:44860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oq8nQ-000216-9I for submit@debbugs.gnu.org; Wed, 02 Nov 2022 04:08:24 -0400 Received: from mail-wr1-f54.google.com ([209.85.221.54]:45002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oq8nO-00020s-5C for 58790@debbugs.gnu.org; Wed, 02 Nov 2022 04:08:23 -0400 Received: by mail-wr1-f54.google.com with SMTP id v1so23285440wrt.11 for <58790@debbugs.gnu.org>; Wed, 02 Nov 2022 01:08:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DXpvfkQnHfay6Z7KUCZr0AjrF6jnC6R5QChT+j2cS/I=; b=GI3C3zadwsVryBwDGdAbu1yf6sPlFhtXcL/f35p2y/qiA9AsJWGkblZ9/vzVm3Yn9n 5UbheP/HIxKcetK70lQPm8IcH+YIafVAAqPOtDZB3F2vrdhinj9pDbmcXViOZB4W846+ GRTAZKpaHf27LluiapbbdoYj3WIEDvjELF4fGY/DiyNKdWJ2EZhtcnbMFf01BjUSNUZt oXJ10Pz9aRkZFQkKO3ofKCk8q/sYtJUOglB+Jk7wCpc0MYBWMee/rpe5Z6Qvt7avnXJc ULaieaJ4YhHmXUZsj6AcIS6l/YgbZRhYxStabUt0TjfC2ensede5S3quIZOuoBcsUy7r lXWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=DXpvfkQnHfay6Z7KUCZr0AjrF6jnC6R5QChT+j2cS/I=; b=wsA/OdoD1jTWLnjj88D0TvgPaPiRXV/hlF8s0CiDyhuPhdtFXhSawafWHg0AuIyT1j QfsuAg7afg/8GJ9DfXxhDxDNlKRw8vIcgJK59sjKMWYtfyiZKV5wD/JcwS4kHOKfVT5Y /jy+UGWlYK08nuPCFaubGblgK6P20+0fcbiKtDlBokbbZOMC8CwXa3GCA5NqSBuSQ1Ee vn84QkOzQzXz2raEbVhUydZhoZQTxf0gzUAVlS96kUfQ4v3QKcxi20VREFKfzcLjXUGg dxuxy0I0pmDAaf/FhG1tGIh2uMmKKMrW0n4IrrTNp/RzGM2K7wC7ToweUVAQn9Tdr87e LhwQ== X-Gm-Message-State: ACrzQf3dMwVPFRNqQV6Su6p9cYN98zZUjMfhuQ7dzj6O3I/8ekyu2lTq BjuXkO21y2f05WNDxeHyx2w= X-Google-Smtp-Source: AMsMyM7oIkoLaubdiYzbFBZ2jFNzzGr+rmiwfUKVAnIeOd4gTPb5ph8HSm8a4EwxxYp4+JhVzv7VcA== X-Received: by 2002:a05:6000:156e:b0:236:ed91:5354 with SMTP id 14-20020a056000156e00b00236ed915354mr1638651wrz.203.1667376496478; Wed, 02 Nov 2022 01:08:16 -0700 (PDT) Received: from krug ([87.196.81.36]) by smtp.gmail.com with ESMTPSA id p7-20020a05600c430700b003b31c560a0csm1168461wme.12.2022.11.02.01.07.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 01:08:16 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Danny Freeman Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> (Danny Freeman's message of "Mon, 31 Oct 2022 10:40:22 -0400") References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> Date: Wed, 02 Nov 2022 08:09:05 +0000 Message-ID: <87v8nxsrq6.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, felician.nemeth@gmail.com, Stefan Kangas , Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Danny Freeman writes: > I have a new patch attached that does what Jo=C3=A3o suggested in the 5 > point list, > which I will respond to again > >> 2. Eglot converts the URI X into a some file designator Y, using >> eglot--uri-to-path. Y may or may not be =3D=3D=3D X, as long as ther= e is >> exactly one X for every Y. Eglot makes xref-item objects from it >> using xref-make-match and xref-make-file-location. The designator Y >> goes into the 'file' slot of the xref-file-location object. > > The patch leaves X =3D=3D=3D Y for `jar` type URIs. My updated packages n= ow > deals with > the full jar URIs. No conversion are done. My new package can be found he= re: > https://git.sr.ht/~dannyfreeman/jarchive/tree/9148ed7ada03ff2516f6e4ede20= c453974d6da19/item/jarchive.el Cool, I had a brief look, and it looks pretty reasonable. There are indeed many operations, but most of them seem trivial. If you're bothered by the repetitive structure, you can probably use sth like cl-case or pcase to cut down a bit. >> 5. Upon findin the "file", Eglot transmits a :textDocument/didOpen >> notification to the server. This requires eglot--path-to-uri, the >> reciprocal of eglot--uri-to-path to convert the path Y to URI X >> again. Again, maybe this conversion is just #'identity. >> >> Eventually, the LSP server knows that the client is now working on a >> textDocument whose relationship to other opened documents in the >> workspace it understands (which may or may not be read-only). > > Sending the full jar uri back to the lsp server worked exactly as > intended here. Nice. >> 6. xref-find-definition on any part of the B2 should now work similarly >> to this whole flow. > > It does!!!!! Double nice. > As for this question > >> I don't know what happens if another server also points to the same file. >> Probably nothing very bad, but there may be some suprising behavior: I >> haven't tested. > > The same file continues to work with respect to the original lsp server > that was used to open it. The second lsp server is not conidered. I > guess because eglot can only work with one lsp server at a time. If > you want to > associate the un-jar'd file with the second server, close it and > xref-find-defintions to it from a file in the second server. That > seems like a > fine workaround to me, and its not something I've ever encountered in > my routine > development workflow. This isn't specific to clojure. I don't think it's a big issue: noone has complained and your description of how it works suggests that it doesn't do anything exceptionally silly. > So, what do yall think about the patch? Is that something you might > consider for > eglot? I believe I could also accomplish something similar with > "advice" in my > package and leave eglot alone, but I would be poking at eglot > internals which > seems not ideal. Yes, a patch is in order. Comments below: diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index c587061837..b8f50e3cd8 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -231,7 +231,7 @@ eglot-server-programs (html-mode . ,(eglot-alternatives '(("vsco= de-html-language-server" "--stdio") ("html-languageserver" "--stdio")))) (dockerfile-mode . ("docker-langserver" "-= -stdio")) ((clojure-mode clojurescript-mode clojurec= -mode) - . ("clojure-lsp")) + . ("clojure-lsp" :initializationOptions (= :dependency-scheme "jar"))) (csharp-mode . ("omnisharp" "-lsp")) (purescript-mode . ("purescript-language-s= erver" "--stdio")) (perl-mode . ("perl" "-MPerl::LanguageServer" "-e" "Perl::LanguageServer::run")) Didn't you say that "jar" is already the default for clojure-lsp? Do we really need to force it? What can happen if we don't? +(defvar eglot-preserve-jar-uri nil + "If non-nil, jar: type URIs will not be converted to paths. +This means they will be provided to xref as URIs and not file paths.") We don't need this variable. Eglot should no nothing about jars (except perhaps in only place where "clojure" is mentioned, which is in eglot-server-programs). 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. 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. Let me know if that makes sense and you can implement it, else I'll try it myself. Felici=C3=A1n 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. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 02 09:16:31 2022 Received: (at 58790) by debbugs.gnu.org; 2 Nov 2022 13:16:31 +0000 Received: from localhost ([127.0.0.1]:45177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqDba-0004AA-VK for submit@debbugs.gnu.org; Wed, 02 Nov 2022 09:16:31 -0400 Received: from out2.migadu.com ([188.165.223.204]:60643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqDbX-00049y-Oy for 58790@debbugs.gnu.org; Wed, 02 Nov 2022 09:16:29 -0400 References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1667394986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GO7H5nQc9n795pFnlt3ByluTzCxSCqDF6T2ggyxaazM=; b=EkzVpHM2KB69Uzgxibl7xKVYcq9buhRdQjBBCq+RsmK+hXoSygyTX09IylTuJlMkwOO4rd VCdf1565cX08nccuwlsz8f4h1qIN0Rolwkavjzhy59ZaNcvUmpLLNIdMC9IkRDgyA/ssMd w0sL0D463eSnf1XhzMnt55seE7w3lR4= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Wed, 02 Nov 2022 09:15:36 -0400 In-reply-to: <87v8nxsrq6.fsf@gmail.com> Message-ID: <877d0do5sp.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, felician.nemeth@gmail.com, Stefan Kangas , Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora writes: > Yes, a patch is in order. Comments below: > > diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el > index c587061837..b8f50e3cd8 100644 > --- a/lisp/progmodes/eglot.el > +++ b/lisp/progmodes/eglot.el > @@ -231,7 +231,7 @@ eglot-server-programs > (html-mode . ,(eglot-alternatives '(("vs= code-html-language-server" "--stdio") ("html-languageserver" "--stdio")))) > (dockerfile-mode . ("docker-langserver" = "--stdio")) > ((clojure-mode clojurescript-mode clojur= ec-mode) > - . ("clojure-lsp")) > + . ("clojure-lsp" :initializationOptions= (:dependency-scheme "jar"))) > (csharp-mode . ("omnisharp" "-lsp")) > (purescript-mode . ("purescript-language= -server" "--stdio")) > (perl-mode . ("perl" > "-MPerl::LanguageServer" "-e" > "Perl::LanguageServer::run")) > > Didn't you say that "jar" is already the default for clojure-lsp? Do we > really need to force it? What can happen if we don't? "jar" is not the default, "zipfile" is. The clojure-lsp maintainers want to make jar the default but have not pulled the trigger on that yet. Other lsp clients seem to be forcing "jar" in the initialization options as well. If we don't force it then I would be getting zipfile URIs, which is not the end of the world, but I would prefer to only deal with the scheme that the clojure-lsp devs want to use going forward. I could either set the jar initialization option myself, tell the user to, or also support the zipfile scheme. Setting it here is seems to be the easiest thing. Including it does not have any downsides that I know of. Either way, without some special file-name-handler dependencies in jars returned by clojure-lsp cannot be opened. The end result is the same empty buffer. > +(defvar eglot-preserve-jar-uri nil > + "If non-nil, jar: type URIs will not be converted to paths. > +This means they will be provided to xref as URIs and not file paths.") > > We don't need this variable. Eglot should no nothing about jars (except > perhaps in only place where "clojure" is mentioned, which is in > eglot-server-programs). > > 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. > > 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. > > Let me know if that makes sense and you can implement it, else I'll try > it myself. This makes sense and seems very reasonable to me. I will send an updated patch that tries to do this. One question I have is, does it make sense to still parse the escape sequences (via url-unhex-string) in the full URI? Or do we continue to leave it as is? In my local testing I've left it as is but don't have any jars that I can navigate to with special characters in the path. > Felici=C3=A1n also suggested that Eglot warns the user when it doesn't kn= ow > 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. I think it would be pretty straight forward to see if something like `find-file-name-handler` would pick up an unaltered URI for a common operation that we know eglot will be using, like `expand-file-name`. If it doesn't then a warning can be issued. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 03 13:17:15 2022 Received: (at 58790) by debbugs.gnu.org; 3 Nov 2022 17:17:15 +0000 Received: from localhost ([127.0.0.1]:50315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqdq6-0000mP-Vc for submit@debbugs.gnu.org; Thu, 03 Nov 2022 13:17:15 -0400 Received: from out0.migadu.com ([94.23.1.103]:15162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqdq4-0000mC-4J for 58790@debbugs.gnu.org; Thu, 03 Nov 2022 13:17:13 -0400 References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1667495830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6Va+BsLVL9dkF+aaeO9n53YksKLFIoe1+3pmEDOIJYU=; b=sKBNAHSCyFa6vVO882arDvFd2MeZzN/2ab+3/YLOjGV4Ij7kDjqz4rltx9MfkuF6YRBUSp nPoUggkaWkp1Kr1TQFDeGti0IndoHX1oRNcd584UavSE7Q/FkIAhWXnRZVY0o9BxRr/AUY 1EZIkwuKhc6POcl4WXQm56iUbS16Z6o= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Thu, 03 Nov 2022 13:10:32 -0400 In-reply-to: <87v8nxsrq6.fsf@gmail.com> Message-ID: <87cza40xgs.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, felician.nemeth@gmail.com, Stefan Kangas , Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jo=C3=A3o T=C3=A1vora 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=C3=A1n also suggested that Eglot warns the user when it doesn't kn= ow > 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Only-handle-file-type-URIs-in-eglot-explicitly.patch Content-Description: 0001-Only-handle-file-type-URIs-in-eglot-explicitly.patch >From 936034d0e72621815584680a9e75f44a4448ba9d Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Thu, 3 Nov 2022 09:39:16 -0400 Subject: [PATCH 1/2] Only handle file:// type URIs in eglot explicitly (Bug#58790) This issue originated with clojure-lsp sending clients "jar": type URIs that emacs is unable to handle out of the box. Before this change, jar: URIs were parsed once, but since jar: URIs contain a nested URI, this resulted in a file being dispatched with a partially parsed path that looked like `file://path/to.jar!/path/in/jar`. Now eglot will not attempt to parse URIs that are not file:// type at all, instead let file-name-handler-alist entries to deal with them. Not parsing them at all allows the file-name-handler-alist regexps to identify them more accurately. By also checking if eglot received a URI in eglot--path-to-uri, the file-name-handler-alist can provide the non-file type URI back to the lsp server, which presumably will know how to handle them since it is also giving them out to clients. --- lisp/progmodes/eglot.el | 42 ++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 204121045a..b272d370ab 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1496,29 +1496,37 @@ eglot--uri-path-allowed-chars (defun eglot--path-to-uri (path) "URIfy PATH." (let ((truepath (file-truename path))) - (concat "file://" - ;; Add a leading "/" for local MS Windows-style paths. - (if (and (eq system-type 'windows-nt) - (not (file-remote-p truepath))) - "/") - (url-hexify-string - ;; Again watch out for trampy paths. - (directory-file-name (file-local-name truepath)) - eglot--uri-path-allowed-chars)))) + (if (url-type (url-generic-parse-url truepath)) + ;; Path is already a URI, forward it to the lsp server untouched + truepath + (concat "file://" + ;; Add a leading "/" for local MS Windows-style paths. + (if (and (eq system-type 'windows-nt) + (not (file-remote-p truepath))) + "/") + (url-hexify-string + ;; Again watch out for trampy paths. + (directory-file-name (file-local-name truepath)) + eglot--uri-path-allowed-chars))))) (defun eglot--uri-to-path (uri) "Convert URI to file path, helped by `eglot--current-server'." (when (keywordp uri) (setq uri (substring (symbol-name uri) 1))) (let* ((server (eglot-current-server)) (remote-prefix (and server (eglot--trampish-p server))) - (retval (url-unhex-string (url-filename (url-generic-parse-url uri)))) - ;; Remove the leading "/" for local MS Windows-style paths. - (normalized (if (and (not remote-prefix) - (eq system-type 'windows-nt) - (cl-plusp (length retval))) - (substring retval 1) - retval))) - (concat remote-prefix normalized))) + (url (url-generic-parse-url uri))) + (if (string= "file" (url-type url)) + (let* ((retval (url-unhex-string (url-filename url))) + ;; Remove the leading "/" for local MS Windows-style paths. + (normalized (if (and (not remote-prefix) + (eq system-type 'windows-nt) + (cl-plusp (length retval))) + (substring retval 1) + retval))) + (concat remote-prefix normalized)) + ;; Leave non-file type URIs untouched, `file-name-handler-alist' + ;; handlers can be used to dispatch them properly. + uri))) (defun eglot--snippet-expansion-fn () "Compute a function to expand snippets. -- 2.38.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-Warn-when-eglot-receives-a-non-file-type-URI-that-Em.patch Content-Description: 0002-Warn-when-eglot-receives-a-non-file-type-URI-that-Em.patch >From 4c5dbc458ca1b13a897b6f01f69cacd9490c1ee1 Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Thu, 3 Nov 2022 09:57:45 -0400 Subject: [PATCH 2/2] Warn when eglot receives a non-file type URI that Emacs can't handle (bug#58790) The file-name-operation being checked, any-handler, has no significant meaning, other than that it is not one that would be suppressed by inhibit-file-name-operation. We just want to check that a handler exists and has the potential to handle this URI, not actually dispatch a file-name-operation right now. --- lisp/progmodes/eglot.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index b272d370ab..f0969290d0 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1524,6 +1524,8 @@ eglot--uri-to-path (substring retval 1) retval))) (concat remote-prefix normalized)) + (unless (find-file-name-handler uri 'any-handler) + (eglot--message "Received URI with unexpected scheme: %s" uri)) ;; Leave non-file type URIs untouched, `file-name-handler-alist' ;; handlers can be used to dispatch them properly. uri))) -- 2.38.0 --=-=-= Content-Type: text/plain -- Danny Freeman --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 08 20:00:06 2022 Received: (at 58790) by debbugs.gnu.org; 9 Nov 2022 01:00:06 +0000 Received: from localhost ([127.0.0.1]:38410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1osZRl-0000PF-PB for submit@debbugs.gnu.org; Tue, 08 Nov 2022 20:00:06 -0500 Received: from mail-ed1-f53.google.com ([209.85.208.53]:40505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1osZRj-0000OD-Pk for 58790@debbugs.gnu.org; Tue, 08 Nov 2022 20:00:04 -0500 Received: by mail-ed1-f53.google.com with SMTP id r14so25055256edc.7 for <58790@debbugs.gnu.org>; Tue, 08 Nov 2022 17:00:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Y6/H12Q2Iy6PsPnnV53VuCmk8t0jms0Tt8YBKdLnUaI=; b=YN+81039Iqy4dlJCpr5x8ZNJyhP0rJC2nMY0RKgJLdJUKkrWPxZ9tVYpgh4CTLb2P5 8D8PFSaTa966EQPy+mofUlmBCWYpEYQVZZ63dD33TclqUcFQqPOgn6pN5pP3SKohf0GU 7JIskU7QHgD9FuVVTRW4ijePjZ3d+atj+QiW93s5WraspOSrt4WHSFN0FFQm4C6BCrK0 norga/PQg4v396w0ma+aWW+OVx7Dkf/jqEw9Y7Nm0Z8m0BV+aSs/5gYHMiWNsJkg6d/R eGwHEYxcm7W4dz0N8r8LCBPDvDp9H6fnP/bbsF42nZMr+0RjYbY2A9Pt9l99Q3IdpUd4 smmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Y6/H12Q2Iy6PsPnnV53VuCmk8t0jms0Tt8YBKdLnUaI=; b=3JTu/YFFzkddY3uBkYQcjfJpMaNz++5/LbnRVs2y9HG8Z2EfYH1ADvQgqFvJmWbCTb ZJt11fvxrKMvMCutS1NdGslzb7nzh/PIewL2o4mWnzlh/papqnabdlOjXh/UZhbFcxmO AS+D/GFCFzVq4tNPC7Oz6pkG3PasKQnzDSBXmhkl1TIw5o8ID9ijtZx3JxnZEziHo9LB Ijh+lJ2q7PvbEp7FCa+dP7/UPJezllog2a/84L30YRr4ze3dSaHdZDxlUvgZBWML53re nIiA5QloQm++xcy0FqumuWM8A/ONmoN8jxWkOrAytSEeXB5RUa4oH5hFbeUekWy5rj5U 22KQ== X-Gm-Message-State: ACrzQf183BBGow2StoVI1TSBocJVR5KOF44YQMpl7Jro7qE4Py/oGq+2 3HsNIDrhIeB+kFsiVClqWCm+qS9wS45IHrtbGI+mJt1h X-Google-Smtp-Source: AMsMyM6LCFf+ulpCY2kc/ex+9zU5uGvG+DWYPoX8DmdRlAM6ZcABn+b2qF8XVq0nsGBH71aVMlvaFJk6mwLkzpRZHHM= X-Received: by 2002:aa7:c504:0:b0:461:122b:882b with SMTP id o4-20020aa7c504000000b00461122b882bmr59152313edq.14.1667955597024; Tue, 08 Nov 2022 16:59:57 -0800 (PST) MIME-Version: 1.0 From: Robert Brown Date: Tue, 8 Nov 2022 19:59:45 -0500 Message-ID: Subject: To: 58790@debbugs.gnu.org Content-Type: multipart/mixed; boundary="000000000000dcb37b05ecff2ce3" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I use a Java language server with Eglot that returns "jar:" URIs like those discussed in this bug thread. I took Danny's jarchive.el and combined it with the attached patch, which modifies Eglot so th [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robert.brown[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.53 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.53 listed in wl.mailspike.net] 2.0 BLANK_SUBJECT Subject is present but empty X-Debbugs-Envelope-To: 58790 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --000000000000dcb37b05ecff2ce3 Content-Type: text/plain; charset="UTF-8" I use a Java language server with Eglot that returns "jar:" URIs like those discussed in this bug thread. I took Danny's jarchive.el and combined it with the attached patch, which modifies Eglot so that it does not convert non-file URIs into file paths. With this patch and jarchive.el, "goto definition" works as expected when the Java source code is inside a jar file. --000000000000dcb37b05ecff2ce3 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Do-not-convert-non-file-URIs-into-file-paths.patch" Content-Disposition: attachment; filename="0001-Do-not-convert-non-file-URIs-into-file-paths.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_la8xnzw50 RnJvbSA3YTVlOTk1OWNhOWMxOTg5ZjQ2MTExOTk3MTBkOTVhODRhYzlkMjZiIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBSb2JlcnQgQnJvd24gPHJvYmVydC5icm93bkBnbWFpbC5jb20+ CkRhdGU6IFR1ZSwgOCBOb3YgMjAyMiAxOTo1Nzo1MCAtMDUwMApTdWJq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JlY3RvcnktZmlsZS1uYW1lIChmaWxlLWxvY2FsLW5hbWUgdHJ1ZXBhdGgpKQotICAg ICAgICAgICAgIGVnbG90LS11cmktcGF0aC1hbGxvd2VkLWNoYXJzKSkpKQorICAiV2hlbiBQQVRI IGlzIGEgZmlsZSBwYXRoIGRlcml2ZWQgZnJvbSBhIGZpbGUgVVJJLCBjb252ZXJ0IGl0IGludG8g YSBVUkkuCitPdGhlcndpc2UsIFBBVEggaXMgYWxyZWFkeSBhIFVSSSwgc28ganVzdCByZXR1cm4g aXQuIgorICAobGV0ICgodXJsICh1cmwtZ2VuZXJpYy1wYXJzZS11cmwgcGF0aCkpKQorICAgIChp ZiAobnVsbCAodXJsLXR5cGUgdXJsKSkKKyAgICAgICAgOzsgUEFUSCBpcyBhIGZpbGUgcGF0aC4g IENvbnZlcnQgaXQgaW50byBhIFVSSS4KKyAgICAgICAgKGxldCAoKHRydWVwYXRoIChmaWxlLXRy dWVuYW1lIHBhdGgpKSkKKyAgICAgICAgICAoY29uY2F0ICJmaWxlOi8vIgorICAgICAgICAgICAg ICAgICAgOzsgQWRkIGEgbGVhZGluZyAiLyIgZm9yIGxvY2FsIE1TIFdpbmRvd3Mtc3R5bGUgcGF0 aHMuCisgICAgICAgICAgICAgICAgICAoaWYgKGFuZCAoZXEgc3lzdGVtLXR5cGUgJ3dpbmRvd3Mt bnQpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAobm90IChmaWxlLXJlbW90ZS1wIHRydWVw YXRoKSkpCisgICAgICAgICAgICAgICAgICAgICAgIi8iKQorICAgICAgICAgICAgICAgICAgKHVy bC1oZXhpZnktc3RyaW5nCisgICAgICAgICAgICAgICAgICAgOzsgQWdhaW4gd2F0Y2ggb3V0IGZv ciB0cmFtcHkgcGF0aHMuCisgICAgICAgICAgICAgICAgICAgKGRpcmVjdG9yeS1maWxlLW5hbWUg KGZpbGUtbG9jYWwtbmFtZSB0cnVlcGF0aCkpCisgICAgICAgICAgICAgICAgICAgZWdsb3Q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gICAgICAgICAgICAgICAgICAgICAoc3Vic3RyaW5nIHJldHZhbCAxKQot ICAgICAgICAgICAgICAgICAgICAgICByZXR2YWwpKSkKLSAgICAoY29uY2F0IHJlbW90ZS1wcmVm aXggbm9ybWFsaXplZCkpKQorICAobGV0ICgodXJsICh1cmwtZ2VuZXJpYy1wYXJzZS11cmwgdXJp KSkpCisgICAgKGlmIChlcXVhbCAodXJsLXR5cGUgdXJsKSAiZmlsZSIpCisgICAgICAgIDs7IFRy YW5zZm9ybSBhIGZpbGUgVVJJIGludG8gYSBmaWxlIHBhdGgsIHdoaWNoIG1heSBiZSBhCisgICAg ICAgIDs7IHJlbW90ZSB0cmFtcCBwYXRoLgorICAgICAgICAobGV0KiAoKHNlcnZlciAoZWdsb3Qt Y3VycmVudC1zZXJ2ZXIpKQorICAgICAgICAgICAgICAgKHJlbW90ZS1wcmVmaXggKGFuZCBzZXJ2 ZXIgKGVnbG90LS10cmFtcGlzaC1wIHNlcnZlcikpKQorICAgICAgICAgICAgICAgKHJldHZhbCAo dXJsLXVuaGV4LXN0cmluZyAodXJsLWZpbGVuYW1lIHVybCkpKQorICAgICAgICAgICAgICAgOzsg UmVtb3ZlIHRoZSBsZWFkaW5nICIvIiBmb3IgbG9jYWwgTVMgV2luZG93cy1zdHlsZSBwYXRocy4K KyAgICAgICAgICAgICAgIChub3JtYWxpemVkIChpZiAoYW5kIChub3QgcmVtb3RlLXByZWZpeCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChlcSBzeXN0ZW0tdHlwZSAnd2lu ZG93cy1udCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjbC1wbHVzcCAo bGVuZ3RoIHJldHZhbCkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzdWJzdHJp bmcgcmV0dmFsIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHZhbCkpKQorICAg ICAgICAgIChjb25jYXQgcmVtb3RlLXByZWZpeCBub3JtYWxpemVkKSkKKyAgICAgIDs7IE5vbi1m aWxlIFVSSXMgYXJlIHVubW9kaWZpbGVkLgorICAgICAgdXJpKSkpCiAKIChkZWZ1biBlZ2xvdC0t c25pcHBldC1leHBhbnNpb24tZm4gKCkKICAgIkNvbXB1dGUgYSBmdW5jdGlvbiB0byBleHBhbmQg c25pcHBldHMuCi0tIAoyLjI1LjEKCg== --000000000000dcb37b05ecff2ce3-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 04:49:48 2022 Received: (at 58790) by debbugs.gnu.org; 10 Nov 2022 09:49:49 +0000 Received: from localhost ([127.0.0.1]:41925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot4Bw-0004fN-H0 for submit@debbugs.gnu.org; Thu, 10 Nov 2022 04:49:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot4Bu-0004f9-A0 for 58790@debbugs.gnu.org; Thu, 10 Nov 2022 04:49:46 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot4Bo-0000JE-Q9; Thu, 10 Nov 2022 04:49:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=A//8ovQRzoyTmNCuJteSkunBIDU/W6i5Wk3Agzuzo54=; b=GmdOgLBQKnC7GxZL6mvq PZ0mifN7OW8wDSc98Z4jxJ2kMRhuYCqHo0ISHMZbKddLunyGSoljl4hbtM7ZGqdoNA4uDsSuO2AFv Y8E8a/S9zVD09wLb8g6u5RpW+on1RnHMIcpNNir4RXFjd5SP9UQCR5/HTmSEU/I5OOuwXiQAB+5s7 uYiQSi2NeiUxajciA/XswZik6opHxZZnGUC6MZzouuKdIjQUC1LXSm76SfE0TNJ9WmrR995Yv2lY0 ibo9WAXS83FApXMfehlvqeessrJnppYxdZSLGT0cPtpBxvZXBtJb4xsLLJd6aTEjmRqweYHPZaNZ6 bfFS/A5do7dkkA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot4Bm-0006At-Qt; Thu, 10 Nov 2022 04:49:39 -0500 Date: Thu, 10 Nov 2022 11:49:39 +0200 Message-Id: <83edubrvf0.fsf@gnu.org> From: Eli Zaretskii To: Danny Freeman In-Reply-To: <87cza40xgs.fsf@dfreeman.email> (bug-gnu-emacs@gnu.org) Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, dgutov@yandex.ru, felician.nemeth@gmail.com, joaotavora@gmail.com, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ping! João, any comments on this patch? > Cc: 58790@debbugs.gnu.org, felician.nemeth@gmail.com, > Stefan Kangas , Dmitry Gutov > 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" > > João Távora 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 05:59:11 2022 Received: (at 58790) by debbugs.gnu.org; 10 Nov 2022 10:59:11 +0000 Received: from localhost ([127.0.0.1]:42105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot5H5-0000Gj-Fi for submit@debbugs.gnu.org; Thu, 10 Nov 2022 05:59:11 -0500 Received: from mail-wm1-f51.google.com ([209.85.128.51]:38562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot5H3-0000GW-Lp for 58790@debbugs.gnu.org; Thu, 10 Nov 2022 05:59:10 -0500 Received: by mail-wm1-f51.google.com with SMTP id h133-20020a1c218b000000b003cf4d389c41so3118690wmh.3 for <58790@debbugs.gnu.org>; Thu, 10 Nov 2022 02:59:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TKoS1ZcD9QWQR/e7BvL2CFbPVbaf38Diyasum3oDqws=; b=HudLmpcMx//lJlrCZoYf3U/VJBzPbwkysfru4CKLBu7LgxHoimeO9K1kAMe2weGoTI U0Q8v5kEb0EXZbXKDT26cDXQXOGP8SIfuEvzDLydxNymZ5d7ZQnAyUT40j2mLAi4kS9M Vktc+JaJC4HSKevQ/RXTNtXbzkeBAMkecOSxFODwp7/IuMZ3bcYcyB2yBU9iFJJz6HFT HjBVsEqCrXFxvBmeNH6Dp3bsXL/dJAnvTkqbEyz1xm97mwRahE8S2fKB4YBB4PK2wQHM kLsWQQbWhjULyYwlGDcwLStfWfVi611vxgjluxMzc8J6qymw4GpGrgY2vGHdjX5Ue7+n QH8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=TKoS1ZcD9QWQR/e7BvL2CFbPVbaf38Diyasum3oDqws=; b=dJ0SbXD5XEXcTy4p3arit6hXBcJfPI5/55QHJKSTdUrwv+juKQNPabR2K5QHpPKZuR Duc1caSY5BdJZKnCrTHJCXfHLLeio+3AwiustUw1DDXR5VbXUkLPDV0+R5AGGY1kR1KL qnec8Nt+EYT8SP/ttaCiQ43dLh2UQt9XJkG27GCCfjdBWkOPnirNWtx9gPD9ncb6OU1P Xrf8RDC6u776iFMuMSq+JHarhuRMr4A9a10+jc9HIVRh2JkjgaRYxl825fciq+q76ENj MShdP7aR2mQoVT7Houf+iyC8FiZ7lHhKhK2XezgxRBLX0cTpWGWxBRL3k2KYDUy4eGnW iGEw== X-Gm-Message-State: ACrzQf2w9BZCpkCSJszMFPnTR+RPiom0N+vw+Qca0MAO/m92Pjb27jnP 0IkENv6EURI6U04Cd+kde+Y= X-Google-Smtp-Source: AMsMyM5bs9ICyGzL6qVksCDusZFpjW4YIhKkt4f8CLvJkrK3eCWfKLrcQGwRcZSGohLbxMw1LFlZ/Q== X-Received: by 2002:a05:600c:35cb:b0:3c6:e382:62fb with SMTP id r11-20020a05600c35cb00b003c6e38262fbmr41903050wmq.22.1668077943501; Thu, 10 Nov 2022 02:59:03 -0800 (PST) Received: from krug (87-196-81-1.net.novis.pt. [87.196.81.1]) by smtp.gmail.com with ESMTPSA id ay19-20020a05600c1e1300b003c6bbe910fdsm5729358wmb.9.2022.11.10.02.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 02:59:03 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Eli Zaretskii Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <83edubrvf0.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 10 Nov 2022 11:49:39 +0200") References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> Date: Thu, 10 Nov 2022 11:00:18 +0000 Message-ID: <87cz9v9irh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, felician.nemeth@gmail.com, stefankangas@gmail.com, Danny Freeman , dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > Ping! Jo=C3=A3o, any comments on this patch? Hi Eli, thanks for pinging. Yes, had a look and _both_ patches look fine. The first patch touches a sensitive part. I hoped at this point to have Eglot's automated test running in Emacs's repo, but I don't. So I trust Danny has given some minimal testing to this, hopefully also with some other server, for good measure. The second patch is a little riskier because it has the potential to cause much warning noise, but I'd wait and see what it does in the wild. If it does happen I think we have some means of toning down warnings without making package's warning logic too complex. So again, both patches should be pushed. I'm in the middle of a bisection here, so if you can commit and push the patches, I'd be thankful. Else, I will attend to that later. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 09:09:22 2022 Received: (at 58790) by debbugs.gnu.org; 10 Nov 2022 14:09:22 +0000 Received: from localhost ([127.0.0.1]:42336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot8F7-0005d8-UT for submit@debbugs.gnu.org; Thu, 10 Nov 2022 09:09:22 -0500 Received: from out2.migadu.com ([188.165.223.204]:44019) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot8F5-0005cy-Fs for 58790@debbugs.gnu.org; Thu, 10 Nov 2022 09:09:20 -0500 References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668089357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DZVbw5REhVrkVgEiwtKySLaPLkmgJTEK4O+sn9srATw=; b=uK5EeUapxoLJw4ArYUUH9Xy+hVHvruYLu2nb0W6Llprqc7WGPTOSucdJL7xEXiEilf7EGE SWiFghTlKe6kqUOFLM6yuDhCToZ0dQB3Dn4VWYHMvmnXdO1HIm/O1IqTh5RY2gbqn3M4xu I/94ghjNFKbCSmM8GbRZEuN+WN/Nw7k= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Thu, 10 Nov 2022 08:47:32 -0500 In-reply-to: <87cz9v9irh.fsf@gmail.com> Message-ID: <871qqavr3q.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: Eli Zaretskii , dgutov@yandex.ru, felician.nemeth@gmail.com, 58790@debbugs.gnu.org, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora writes: > Eli Zaretskii writes: > >> Ping! Jo=C3=A3o, any comments on this patch? > > Hi Eli, thanks for pinging. Yes, had a look and _both_ patches look > fine. > > The first patch touches a sensitive part. I hoped at this point to have > Eglot's automated test running in Emacs's repo, but I don't. So I trust > Danny has given some minimal testing to this, hopefully also with some > other server, for good measure. If it gives you some piece of mind, I've been running this code for a while in some large clojure, clojurescript, and typescript projects, all without issue.=20 I also ran through and did a quick test on a zig project (via zls) and in the emacs C source (via clangd) this morning. I've not noticed any issues there either, but also don't know much about either language.=20 > The second patch is a little riskier because it has the potential to > cause much warning noise, but I'd wait and see what it does in the wild. > If it does happen I think we have some means of toning down warnings > without making package's warning logic too complex. I will keep an eye out in this mailing list and try to help resolve any problems that might come up because of it. > So again, both patches should be pushed. I'm in the middle of a > bisection here, so if you can commit and push the patches, I'd be > thankful. Else, I will attend to that later. > > Jo=C3=A3o Thank you!! --=20 Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 10:38:53 2022 Received: (at 58790) by debbugs.gnu.org; 10 Nov 2022 15:38:53 +0000 Received: from localhost ([127.0.0.1]:44025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot9dk-0008Fe-Hm for submit@debbugs.gnu.org; Thu, 10 Nov 2022 10:38:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ot9di-0008FR-4P for 58790@debbugs.gnu.org; Thu, 10 Nov 2022 10:38:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot9dc-0002Cz-75; Thu, 10 Nov 2022 10:38:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=rQyQ+1L1fyfWz+eKPJUMXyvCkbwtci9iJ5BNjMmwag0=; b=P/h5mcpH8tpSS5BlLVdk +hwXs6eDrHwYKZ+DEr8OcEsqsYcB1M+8QgP4MPNmdowwEbcgS4W46EHzG5eeBAWN69dQd9d58UBTg ipeh2R0yhdc3u4CIECYcrmFPw9QP6IdFY5pTCMYMOL49J0uS0egZHD4q3CD1HJHOpsKbhU9VC8iwX kE4Jr04JX9coPPOrWHWF/uM7979lNuHfOeGu9SFSDr4auDKUIBOjZh2r4jOMfLUWMqwWmA0664b/j 6wTgDzVXLq1rgapLsBmscwjQc7mPB8oOFKc4zm0/uOdf3iWb4RTCmxlSfde4tR0rXH6OQrh+iKAY6 U7gfZWiamDqdNw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot9da-0002SZ-Ny; Thu, 10 Nov 2022 10:38:43 -0500 Date: Thu, 10 Nov 2022 17:38:41 +0200 Message-Id: <83o7terf9a.fsf@gnu.org> From: Eli Zaretskii To: danny@dfreeman.email, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: <87cz9v9irh.fsf@gmail.com> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Thu, 10 Nov 2022 11:00:18 +0000) Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, felician.nemeth@gmail.com, stefankangas@gmail.com, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Távora > Cc: Danny Freeman , 58790@debbugs.gnu.org, > felician.nemeth@gmail.com, stefankangas@gmail.com, dgutov@yandex.ru > Date: Thu, 10 Nov 2022 11:00:18 +0000 > > Eli Zaretskii writes: > > > Ping! João, any comments on this patch? > > Hi Eli, thanks for pinging. Yes, had a look and _both_ patches look > fine. OK, then I have a few minor comments, before this can be installed: > >From 936034d0e72621815584680a9e75f44a4448ba9d Mon Sep 17 00:00:00 2001 > From: dannyfreeman > Date: Thu, 3 Nov 2022 09:39:16 -0400 > Subject: [PATCH 1/2] Only handle file:// type URIs in eglot explicitly > > (Bug#58790) > > This issue originated with clojure-lsp sending clients "jar": type URIs > that emacs is unable to handle out of the box. Before this change, jar: > URIs were parsed once, but since jar: URIs contain a nested URI, > this resulted in a file being dispatched with a partially parsed path > that looked like `file://path/to.jar!/path/in/jar`. > > Now eglot will not attempt to parse URIs that are not file:// type at > all, instead let file-name-handler-alist entries to deal with them. > Not parsing them at all allows the file-name-handler-alist regexps to > identify them more accurately. > > By also checking if eglot received a URI in eglot--path-to-uri, the > file-name-handler-alist can provide the non-file type URI back to the > lsp server, which presumably will know how to handle them since it is > also giving them out to clients. This lacks ChangeLog-style parts which specify the file(s) and function(s) which were changed. Also, in the text above, please leave two spaces between sentences, per our conventions, and refill the text to be at most 63 columns. Finally, please consider moving some of the text above to comments explaining why the code does what it does. > >From 4c5dbc458ca1b13a897b6f01f69cacd9490c1ee1 Mon Sep 17 00:00:00 2001 > From: dannyfreeman > Date: Thu, 3 Nov 2022 09:57:45 -0400 > Subject: [PATCH 2/2] Warn when eglot receives a non-file type URI that Emacs > can't handle > > (bug#58790) > > The file-name-operation being checked, any-handler, has no significant > meaning, other than that it is not one that would be suppressed by > inhibit-file-name-operation. We just want to check that a handler exists > and has the potential to handle this URI, not actually dispatch a > file-name-operation right now. Same here. And in this case, the text should definitely be in comments. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 16:54:57 2022 Received: (at 58790) by debbugs.gnu.org; 10 Nov 2022 21:54:57 +0000 Received: from localhost ([127.0.0.1]:44555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otFVh-0004z6-Ay for submit@debbugs.gnu.org; Thu, 10 Nov 2022 16:54:57 -0500 Received: from out2.migadu.com ([188.165.223.204]:25357) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otFVe-0004yw-SR for 58790@debbugs.gnu.org; Thu, 10 Nov 2022 16:54:56 -0500 References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668117293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UK5lZJKmqMm64qxAJci2nj4OIi9SloMYSiZTZHW9JmA=; b=upWrd8RYVmdpIvLJb3M9lK+QhobZpfxSF4BmLo3A4E1IkXe+C79RnL8enW0+c42ZPP22Fn 3cjberkiM67xXw+hznPD6qaySK/HcUvLiI2V0FgcjOguJgQCtdWi8XVbCPXfwwJeh2Mcxo jCn2V55SrBYGqa/4anJHWguPel4mYtY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Eli Zaretskii Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Thu, 10 Nov 2022 16:45:27 -0500 In-reply-to: <83o7terf9a.fsf@gnu.org> Message-ID: <87k042tqze.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, dgutov@yandex.ru, felician.nemeth@gmail.com, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: > > OK, then I have a few minor comments, before this can be installed: > > This lacks ChangeLog-style parts which specify the file(s) and > function(s) which were changed. Thanks for your patience, I believe I've got that corrected now. See the attachments. > Also, in the text above, please leave two spaces between sentences, > per our conventions, and refill the text to be at most 63 columns. I cut it down to 63. I don't mind either way, but thought I would mention that the CONTRIBUTE file mentions 79 columns, which is what I normally default to in commit messages. >> The file-name-operation being checked, any-handler, has no significant >> meaning, other than that it is not one that would be suppressed by >> inhibit-file-name-operation. We just want to check that a handler exists >> and has the potential to handle this URI, not actually dispatch a >> file-name-operation right now. > > Same here. And in this case, the text should definitely be in > comments. Done!!! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Eglot-Only-handle-URIs-with-the-file-scheme.patch Content-Description: Only parse file: URIs >From a5b1b6b34d3d455e06757bbb1c10df8f81121f1f Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Thu, 3 Nov 2022 09:39:16 -0400 Subject: [PATCH] Eglot: Only handle URIs with the file:// scheme This fixes Bug#58790 * lisp/progmodes/eglot.el (eglot--path-to-uri, eglot--uri-to-path): This issue originated with clojure-lsp sending clients "jar" type URIs that Emacs is unable to handle out of the box. Before this change, jar: URIs were parsed once, but since jar: URIs contain a nested URI, this resulted in a file being dispatched with a partially parsed path that looked like `file://path/to.jar!/path/in/jar`. Now eglot will not attempt to parse them at all. --- lisp/progmodes/eglot.el | 46 ++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index b707a6b059..11bf0884ac 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1500,29 +1500,41 @@ eglot--uri-path-allowed-chars (defun eglot--path-to-uri (path) "URIfy PATH." (let ((truepath (file-truename path))) - (concat "file://" - ;; Add a leading "/" for local MS Windows-style paths. - (if (and (eq system-type 'windows-nt) - (not (file-remote-p truepath))) - "/") - (url-hexify-string - ;; Again watch out for trampy paths. - (directory-file-name (file-local-name truepath)) - eglot--uri-path-allowed-chars)))) + (if (url-type (url-generic-parse-url truepath)) + ;; Path is already a URI, so forward it to the lsp server untouched. + ;; This assumes that the server can handle the same non-file + ;; scheme URIs that it provides to clients. + truepath + (concat "file://" + ;; Add a leading "/" for local MS Windows-style paths. + (if (and (eq system-type 'windows-nt) + (not (file-remote-p truepath))) + "/") + (url-hexify-string + ;; Again watch out for trampy paths. + (directory-file-name (file-local-name truepath)) + eglot--uri-path-allowed-chars))))) (defun eglot--uri-to-path (uri) "Convert URI to file path, helped by `eglot--current-server'." (when (keywordp uri) (setq uri (substring (symbol-name uri) 1))) (let* ((server (eglot-current-server)) (remote-prefix (and server (eglot--trampish-p server))) - (retval (url-unhex-string (url-filename (url-generic-parse-url uri)))) - ;; Remove the leading "/" for local MS Windows-style paths. - (normalized (if (and (not remote-prefix) - (eq system-type 'windows-nt) - (cl-plusp (length retval))) - (substring retval 1) - retval))) - (concat remote-prefix normalized))) + (url (url-generic-parse-url uri))) + ;; Only attempt to parse URIs with the file scheme. + (if (string= "file" (url-type url)) + (let* ((retval (url-unhex-string (url-filename url))) + ;; Remove the leading "/" for local MS Windows-style paths. + (normalized (if (and (not remote-prefix) + (eq system-type 'windows-nt) + (cl-plusp (length retval))) + (substring retval 1) + retval))) + (concat remote-prefix normalized)) + ;; Leave non-file scheme URIs untouched. + ;; Handlers registered with `file-name-handler-alist' can + ;; identify these URIs and decide how to handle them. + uri))) (defun eglot--snippet-expansion-fn () "Compute a function to expand snippets. -- 2.38.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Eglot-warn-when-receiving-a-non-file-scheme-URI.patch Content-Description: Warn when unhandled file: URI is received >From 7fd1e7c4a264d74360d79c6cbee3f0e0aceeab5c Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Thu, 10 Nov 2022 13:05:49 -0500 Subject: [PATCH] Eglot: warn when receiving a non-file scheme URI Addresses bug#58790 * lisp/progmodes/eglot.el (eglot--uri-to-path): Write a message when eglot encounters a non-file scheme URI that Emacs is not capable of handling. --- lisp/progmodes/eglot.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 11bf0884ac..dfa18b885f 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1531,6 +1531,13 @@ eglot--uri-to-path (substring retval 1) retval))) (concat remote-prefix normalized)) + ;; `any-handler', has no significant meaning, other than that it + ;; is not one that would be suppressed by `inhibit-file-name-operation'. + ;; We just want to check that a handler exists and has the potential + ;; to handle this URI, not actually dispatch a + ;; file-name-operation right now. + (unless (find-file-name-handler uri 'any-handler) + (eglot--message "Received URI with unexpected scheme: %s" uri)) ;; Leave non-file scheme URIs untouched. ;; Handlers registered with `file-name-handler-alist' can ;; identify these URIs and decide how to handle them. -- 2.38.1 --=-=-= Content-Type: text/plain Thank you, -- Danny Freeman --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 16:58:40 2022 Received: (at 58790) by debbugs.gnu.org; 10 Nov 2022 21:58:40 +0000 Received: from localhost ([127.0.0.1]:44564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otFZH-00054X-IP for submit@debbugs.gnu.org; Thu, 10 Nov 2022 16:58:39 -0500 Received: from mail-oa1-f47.google.com ([209.85.160.47]:45641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otFZF-00054J-Qm for 58790@debbugs.gnu.org; Thu, 10 Nov 2022 16:58:38 -0500 Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-13be3ef361dso3605225fac.12 for <58790@debbugs.gnu.org>; Thu, 10 Nov 2022 13:58:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YbAZCXTjnEXcI9lnOcmW+Kraxv82tUXYkzSKbslatKs=; b=SWBv7Ni4Dcg50rUdQFRhu7fahyoEERJjpsVMDdPT737DTOJbd6vfuWoz+HJDuR+cWk uVCzevOi69m6rEVGn4vOu8e+w+oM428cvXMLjgv8/LNlczjJJ5tkbu+m5rfhIwBpfKZF cg0XG2/G3/sKXHMB8J2xHqGEtazgeFxB0PRWUg4uuCnYqneKEbZUjuOHtJVpJqKSGB9X T3AINuNDxAWoy5hc8LW+r7PW7HjMzAGNbGAtwR3tqRG9SqoG/neqS+XzxDMEiFz5QeKg Fyn4o+wOdk3biH1c+WNtU8Mn8rreN3vUF44qajFUofdncpFnNLzeEuM4o5+SMhJfinSm NT9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YbAZCXTjnEXcI9lnOcmW+Kraxv82tUXYkzSKbslatKs=; b=kPQ2vMMop3lOGAFCLe1AvlzoU1MP3NyY7kPPO1cSrOX8co7bwqVvnkJ/Bpf3rLRSTA +mchFKph+o1A1zTRp2IDD++6CbTpfNkfVDngpnMw9baoVY7lvqOc4faSDPxBU2Iulhc8 cw7kQNYgBWaH4CPwryX7TtxKC20Qr1IwtInkvmQmnyJrJMIwvgKfcx5KORp0l8r6Y9p/ 47nQCGCrfxeitzgDBmhOwNiLfG3HK+h4gkOs58mK+gmS/i7uVhQoiBlVHfgSdwmbksp+ ISyMMFWBI+8fdg/8OTWGzfWc6yRfYxKwgh7Co0uHHjdMWEILL1hggTk9yuRGKpv+RVZJ SjRg== X-Gm-Message-State: ACrzQf1EuwnH9M6QEr54l4tkXricJQvTcJTqXLhyXj5NtirRMnXllLuj R/UNJyJWxAPZlIOuE6y7QzSFfMGlQAtWwhCnGPY= X-Google-Smtp-Source: AMsMyM7N9BHSfvEjmKz/YuSd93LaHjOiUvATl//Qp1nbaOhqqM+M4dQGIF/MIOFcbfqlq78Mjek6k5XNtN0A0pS5qC4= X-Received: by 2002:a05:6870:2402:b0:132:a103:ae22 with SMTP id n2-20020a056870240200b00132a103ae22mr2332475oap.215.1668117512104; Thu, 10 Nov 2022 13:58:32 -0800 (PST) MIME-Version: 1.0 References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> In-Reply-To: <87k042tqze.fsf@dfreeman.email> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Thu, 10 Nov 2022 21:59:37 +0000 Message-ID: Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server To: Danny Freeman Content-Type: multipart/alternative; boundary="000000000000c0add305ed24dfde" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: Eli Zaretskii , dgutov@yandex.ru, felician.nemeth@gmail.com, 58790@debbugs.gnu.org, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000c0add305ed24dfde Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I agree on the two comments about the ChangeLog style entries and the spacing. But when dealing with eglot.el, which I am the prime maintainer of, I really prefer to see design described in the commit message where the design was introduced. It plays very well with vc-region-history. So Danny, if you don't mind, please revert that part. Jo=C3=A3o On Thu, Nov 10, 2022 at 9:54 PM Danny Freeman wrote: > > Eli Zaretskii writes: > > > > > OK, then I have a few minor comments, before this can be installed: > > > > This lacks ChangeLog-style parts which specify the file(s) and > > function(s) which were changed. > > Thanks for your patience, I believe I've got that corrected now. See the > attachments. > > > Also, in the text above, please leave two spaces between sentences, > > per our conventions, and refill the text to be at most 63 columns. > > I cut it down to 63. I don't mind either way, but thought I would > mention that the CONTRIBUTE file mentions 79 columns, which is what I > normally default to in commit messages. > > >> The file-name-operation being checked, any-handler, has no significant > >> meaning, other than that it is not one that would be suppressed by > >> inhibit-file-name-operation. We just want to check that a handler exis= ts > >> and has the potential to handle this URI, not actually dispatch a > >> file-name-operation right now. > > > > Same here. And in this case, the text should definitely be in > > comments. > > Done!!! > > > > Thank you, > -- > Danny Freeman > --=20 Jo=C3=A3o T=C3=A1vora --000000000000c0add305ed24dfde Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I agree on the two comments about the ChangeLog style= entries and the
spacing.=C2=A0

But= when dealing with eglot.el, which I am the prime maintainer of,
=
I really prefer to see design described in the commit message where th= e
design was introduced. It plays very well with vc-region-h= istory.

So Danny, if you don't mind, pleas= e revert that part.=C2=A0

Jo=C3=A3o
=
On Thu= , Nov 10, 2022 at 9:54 PM Danny Freeman <danny@dfreeman.email> wrote:=

Eli Zaretskii <
eliz@gn= u.org> writes:

>
> OK, then I have a few minor comments, before this can be installed: >
> This lacks ChangeLog-style parts which specify the file(s) and
> function(s) which were changed.

Thanks for your patience, I believe I've got that corrected now. See th= e
attachments.

> Also, in the text above, please leave two spaces between sentences, > per our conventions, and refill the text to be at most 63 columns.

I cut it down to 63. I don't mind either way, but thought I would
mention that the CONTRIBUTE file mentions 79 columns, which is what I
normally default to in commit messages.

>> The file-name-operation being checked, any-handler, has no signifi= cant
>> meaning, other than that it is not one that would be suppressed by=
>> inhibit-file-name-operation. We just want to check that a handler = exists
>> and has the potential to handle this URI, not actually dispatch a<= br> >> file-name-operation right now.
>
> Same here.=C2=A0 And in this case, the text should definitely be in > comments.

Done!!!



Thank you,
--
Danny Freeman


--
Jo=C3=A3o T=C3=A1vora
--000000000000c0add305ed24dfde-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 17:26:28 2022 Received: (at 58790) by debbugs.gnu.org; 10 Nov 2022 22:26:28 +0000 Received: from localhost ([127.0.0.1]:44577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otG0B-0005hy-KB for submit@debbugs.gnu.org; Thu, 10 Nov 2022 17:26:28 -0500 Received: from out0.migadu.com ([94.23.1.103]:41115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otG07-0005hm-AI for 58790@debbugs.gnu.org; Thu, 10 Nov 2022 17:26:25 -0500 References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668119181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MYiAxnbvk87jUR89SkSZrd5Kid/WQuD0f0VVmxR5GZ8=; b=u3xMemzp0sbTDsyEdCIadr8sE8sw+KEymwhLoyaJe+wDSrgsm5YS7wGh5uJqmOm0GaoIsn RhXt7Mrxax11X8ARpP6xM0cT4baGg2NwwhtNvHAC0gdsAazBAbbxP3srs3tsSU96ChFWrA 9C2acre1C09QiickYaD/qL+GFwh2ci4= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Thu, 10 Nov 2022 17:22:15 -0500 In-reply-to: Message-ID: <87fseqtpiu.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: Eli Zaretskii , dgutov@yandex.ru, felician.nemeth@gmail.com, 58790@debbugs.gnu.org, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jo=C3=A3o T=C3=A1vora writes: > I agree on the two comments about the ChangeLog style entries and the > spacing.=20=20 > > But when dealing with eglot.el, which I am the prime maintainer of,=20 > I really prefer to see design described in the commit message where the=20 > design was introduced. It plays very well with vc-region-history. > > So Danny, if you don't mind, please revert that part.=20=20 > > Jo=C3=A3o Yall all really taking me for a ride on this lol. In reviewing the comments over and over I've made a modification to the second patch involving the warning message. Instead of using an arbitrary symbol I realized that the function `find-file-name-handler' works when a nil value for the second argument (operation). Anyways, here they are again. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Eglot-Only-handle-URIs-with-the-file-scheme.patch >From e56e987cbf601f6caffac7edfdd580a0b7da921f Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Thu, 3 Nov 2022 09:39:16 -0400 Subject: [PATCH 1/2] Eglot: Only handle URIs with the file:// scheme This fixes Bug#58790 * lisp/progmodes/eglot.el (eglot--path-to-uri, eglot--uri-to-path): Eglot will not attempt to parse URIs that are not file:// type at all, instead let `file-name-handler-alist' entries to deal with them. Not parsing them at all allows the `file-name-handler-alist' regexps to identify them more accurately. By also checking if eglot received a URI in `eglot--path-to-uri', the `file-name-handler-alist' can provide the non-file type URI back to the lsp server, which presumably will know how to handle them since it is also giving them out to clients. This issue originated with clojure-lsp sending clients "jar": type URIs that emacs is unable to handle out of the box. Before this change, jar: URIs were parsed once, but since jar: URIs contain a nested URI, this resulted in a file being dispatched with a partially parsed path that looked like "file://path/to.jar!/path/in/jar". --- lisp/progmodes/eglot.el | 43 +++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 1b1302d689..2463f68f97 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1501,29 +1501,38 @@ eglot--uri-path-allowed-chars (defun eglot--path-to-uri (path) "URIfy PATH." (let ((truepath (file-truename path))) - (concat "file://" - ;; Add a leading "/" for local MS Windows-style paths. - (if (and (eq system-type 'windows-nt) - (not (file-remote-p truepath))) - "/") - (url-hexify-string - ;; Again watch out for trampy paths. - (directory-file-name (file-local-name truepath)) - eglot--uri-path-allowed-chars)))) + (if (url-type (url-generic-parse-url truepath)) + ;; Path is already a URI, so forward it to the lsp server untouched. + truepath + (concat "file://" + ;; Add a leading "/" for local MS Windows-style paths. + (if (and (eq system-type 'windows-nt) + (not (file-remote-p truepath))) + "/") + (url-hexify-string + ;; Again watch out for trampy paths. + (directory-file-name (file-local-name truepath)) + eglot--uri-path-allowed-chars))))) (defun eglot--uri-to-path (uri) "Convert URI to file path, helped by `eglot--current-server'." (when (keywordp uri) (setq uri (substring (symbol-name uri) 1))) (let* ((server (eglot-current-server)) (remote-prefix (and server (eglot--trampish-p server))) - (retval (url-unhex-string (url-filename (url-generic-parse-url uri)))) - ;; Remove the leading "/" for local MS Windows-style paths. - (normalized (if (and (not remote-prefix) - (eq system-type 'windows-nt) - (cl-plusp (length retval))) - (substring retval 1) - retval))) - (concat remote-prefix normalized))) + (url (url-generic-parse-url uri))) + ;; Only attempt to parse URIs with the file scheme. + (if (string= "file" (url-type url)) + (let* ((retval (url-unhex-string (url-filename url))) + ;; Remove the leading "/" for local MS Windows-style paths. + (normalized (if (and (not remote-prefix) + (eq system-type 'windows-nt) + (cl-plusp (length retval))) + (substring retval 1) + retval))) + (concat remote-prefix normalized)) + ;; Leave non-file type URIs untouched, `file-name-handler-alist' + ;; handlers can be used to dispatch them properly. + uri))) (defun eglot--snippet-expansion-fn () "Compute a function to expand snippets. -- 2.38.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-Eglot-warn-when-receiving-a-non-file-scheme-URI.patch >From a2b92859d0a327c843bcd677eede72c0c100821f Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Thu, 10 Nov 2022 13:05:49 -0500 Subject: [PATCH 2/2] Eglot: warn when receiving a non-file scheme URI * lisp/progmodes/eglot.el (eglot--uri-to-path): Write a message when eglot encounters a non-file scheme URI that Emacs is not capable of handling. Note that the file-name-handler operation checked is `nil' because we don't want to use a real one that may be suppressed by `inhibit-file-name-operation'. We just want to check that a handler exists and has the potential to handle this URI, not actually dispatch a file-name-operation right now. Addresses bug#58790 --- lisp/progmodes/eglot.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 2463f68f97..1850334b84 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1530,6 +1530,8 @@ eglot--uri-to-path (substring retval 1) retval))) (concat remote-prefix normalized)) + (unless (find-file-name-handler uri nil) + (eglot--message "Received URI with unexpected scheme: %s" uri)) ;; Leave non-file type URIs untouched, `file-name-handler-alist' ;; handlers can be used to dispatch them properly. uri))) -- 2.38.1 --=-=-= Content-Type: text/plain -- Danny Freeman --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 17:29:49 2022 Received: (at 58790) by debbugs.gnu.org; 10 Nov 2022 22:29:49 +0000 Received: from localhost ([127.0.0.1]:44583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otG3R-0005mU-Ct for submit@debbugs.gnu.org; Thu, 10 Nov 2022 17:29:49 -0500 Received: from mail-wm1-f41.google.com ([209.85.128.41]:43593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otG3N-0005mF-PP for 58790@debbugs.gnu.org; Thu, 10 Nov 2022 17:29:48 -0500 Received: by mail-wm1-f41.google.com with SMTP id a11-20020a05600c2d4b00b003cf6f5fd9f1so2085782wmg.2 for <58790@debbugs.gnu.org>; Thu, 10 Nov 2022 14:29:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fSoUytEMHxXZueMzxrLqmcJa8ncKWKBYyORO2X93hsQ=; b=P71lr/3SmLk8qKzNml5Uqtnszl/q2L6QpqL6QPobNAf+5hjon8BU774kqeg3AtVM0P eZrhNWuTg57TcLM+q9OFJ47T4b8r2sws2F8KLFE8mWVu5tuJrCzHTaKOyQMrBMnl+Pcm CLQO4Tl2KB8SIh9KVuDYvgQM9W3WPoccO1OjImaMtN87ia4OYUwcdUUzu4Pc3ri62LAU xvmzfSbJvBQP+wTiQW7kgnRK7opToddTUtu3VhoCWiHh13VxUifQrBSMK+brMBoB/AMI E3S9iIB/Ej4tZA2OScUli5rkJ88Ps+j9Goe+j5Fb8GTPCQ0aFTwYn/vt+R6WwzVUXL9i pVZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fSoUytEMHxXZueMzxrLqmcJa8ncKWKBYyORO2X93hsQ=; b=D+9RYZd2yQxev32kS61gQ8oAsLodAKj0Ttr2tV+jkMBgMWeFmF9+wpJsitebzb38KC ooXvbgqfS6OQwqg6+QWfNNmMrdxjKqLZ5pEWMtqLqN/v9reeRSM4HXezBJ+sBTbCXzoN nG1Fbtl4dFZjfzev9v5P1dz/seJnsodYKq3vhNO3pireFwXz9yxMXCqEEOiqQsgyrM7t mgHGb4X3PYi3Wzx2bD841BdmichZKMLjnv4prmJNSXHdUloCWkKb16P+Ghoikg/r8HWT zl+BkQsPCRmucQoZCAHiHE1wHD9WarbVBnf9eWpDGS3ajJ8KrHjfX7GwJMv6CcrbmqI8 bqcg== X-Gm-Message-State: ACrzQf0wvAY9X7KL3WI482rsy5NorcEq2whUHsYoLssEH2f8vVRgROmP zwKoYjshRxIo5LI/BNr7/Hw= X-Google-Smtp-Source: AMsMyM7e87btaYezOKU6wvY6ytIrDaWGmZuilMdbVL2Bm4r8F1nHgCO0ekowmMi7i4aK0S37k/k1SQ== X-Received: by 2002:a05:600c:6023:b0:3cf:7dc1:e08e with SMTP id az35-20020a05600c602300b003cf7dc1e08emr35308880wmb.154.1668119379641; Thu, 10 Nov 2022 14:29:39 -0800 (PST) Received: from krug (87-196-81-1.net.novis.pt. [87.196.81.1]) by smtp.gmail.com with ESMTPSA id az40-20020a05600c602800b003b492753826sm794733wmb.43.2022.11.10.14.29.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 14:29:39 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Danny Freeman Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <87fseqtpiu.fsf@dfreeman.email> (Danny Freeman's message of "Thu, 10 Nov 2022 17:22:15 -0500") References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> Date: Thu, 10 Nov 2022 22:30:54 +0000 Message-ID: <87a64y8msh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: Eli Zaretskii , dgutov@yandex.ru, felician.nemeth@gmail.com, 58790@debbugs.gnu.org, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Danny Freeman writes: > Jo=C3=A3o T=C3=A1vora writes: > >> I agree on the two comments about the ChangeLog style entries and the >> spacing.=20=20 >> >> But when dealing with eglot.el, which I am the prime maintainer of,=20 >> I really prefer to see design described in the commit message where the= =20 >> design was introduced. It plays very well with vc-region-history. >> >> So Danny, if you don't mind, please revert that part.=20=20 >> >> Jo=C3=A3o > > Yall all really taking me for a ride on this lol. Sorry. The Emacs commit message format is a bit of work in the beginning but it pays off in the end. I will make minor adjustment to your patches and push them now. > In reviewing the comments over and over I've made a modification to the > second patch involving the warning message. Instead of using an > arbitrary symbol I realized that the function `find-file-name-handler' > works when a nil value for the second argument (operation). OK, I will look at this part, too. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 17:47:17 2022 Received: (at 58790) by debbugs.gnu.org; 10 Nov 2022 22:47:17 +0000 Received: from localhost ([127.0.0.1]:44599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otGKK-0006Cs-O3 for submit@debbugs.gnu.org; Thu, 10 Nov 2022 17:47:16 -0500 Received: from mail-wr1-f43.google.com ([209.85.221.43]:41898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otGKG-0006Cc-3N for 58790@debbugs.gnu.org; Thu, 10 Nov 2022 17:47:14 -0500 Received: by mail-wr1-f43.google.com with SMTP id w14so4256108wru.8 for <58790@debbugs.gnu.org>; Thu, 10 Nov 2022 14:47:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qDmHQGf6DS+lFV6DI3TH9sA7SpbMIuD9MtoGmVuahbU=; b=LWg5C/nnMl3xU4QvxO57tVS10+7wgVTQtuZ5VhiNt4nrCuCuKACcw+wkpPFqyFolsd NKpcqNVbL2F0vvUad9i1/t1bhD+rgWB/vHdYL3MeF6fhhGb14v3aUameuSKerPShk2wW jn7Ph9vMHuBKHR+W36Zqgla3+5HkabTb/+3KeikS4OklAwafwB3oMKyYh2huuZGTt7M3 Li3DPm00ktt8MoeQO+5wRC1tEUKstGiLqZ9MdNnFB1pq0HOnj0hBEanORUr6RJ5OrvyB KgErgTYDWGfVZifQr4UI5S678jq54v7aV0rkup+UDksi1aBWTx3427UJ2CxUMWuIj0Ul qDiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=qDmHQGf6DS+lFV6DI3TH9sA7SpbMIuD9MtoGmVuahbU=; b=1oUBvGxpGYdfHqlthJWZg2xJUAfFCYUIst2N4PGNRx1sa6Xwfj/4oCswzDIoduv8T7 mCXv7stWS3e0yRuh59zh1TCgw8IbRKvgbheKYsxjxrGIFJPfN4x0xKDgjsdrkn/CLCIi 3UVcZlC1L3E/Q0bsiIIL1u99Zqzb8HAvulgahrB9wBXPG+DhAJ/T2uZw68hhfrWZeyi2 EO3uWpEOjr1VfnRCqy+qDK1HS5pYnsK9alfcBQAASY39ROrD8gVX+RTTq77b7ZxuCqy4 Vebuq4X7aX71KQjinLxeQjPHkKt7xhQo2Jnxuud7OUbTzQbFuSCoE2MZ9Y3Myk3Y4Xz8 Z07A== X-Gm-Message-State: ACrzQf3MrYqqe3wbsfNNESFMcpLw9zOGj75dUEy6odzAcSgtd4rPivWc mpkqP1MfagFH8/rNk+P0YWs= X-Google-Smtp-Source: AMsMyM7DjyaVA9oeoB522Lc0JOORKxyM2g6chybJWMVoqtAUa3EEqE/Wz6i/Srx7dH7L/2iynEDlqg== X-Received: by 2002:adf:a31c:0:b0:236:ba0d:246b with SMTP id c28-20020adfa31c000000b00236ba0d246bmr39998526wrb.448.1668120426159; Thu, 10 Nov 2022 14:47:06 -0800 (PST) Received: from krug (87-196-81-1.net.novis.pt. [87.196.81.1]) by smtp.gmail.com with ESMTPSA id l26-20020a05600c2cda00b003cf774c31a0sm6952135wmc.16.2022.11.10.14.47.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 14:47:05 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Danny Freeman Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <87fseqtpiu.fsf@dfreeman.email> (Danny Freeman's message of "Thu, 10 Nov 2022 17:22:15 -0500") References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> Date: Thu, 10 Nov 2022 22:48:20 +0000 Message-ID: <875yfm8lzf.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: Eli Zaretskii , dgutov@yandex.ru, felician.nemeth@gmail.com, 58790@debbugs.gnu.org, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Danny Freeman writes: > In reviewing the comments over and over I've made a modification to > the second patch involving the warning message. Instead of using an > arbitrary symbol I realized that the function `find-file-name-handler' > works when a nil value for the second argument (operation). I've now pushed the first patch, but I held off the second patch. I don't see this OPERATION=3Dnil option documented in the docstring of find-file-name-handler, so I'm not sure we should rely on it. I think we should provide OPERATION here, because what we want to check is if we, Emacs, can actually visit the file designated by the URI. So I think passing something like 'access-file' as the OPERATION argument makes more sense. But Eli probably has more knowledge here. Maybe passing nil is indeed correct. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 17:52:18 2022 Received: (at 58790) by debbugs.gnu.org; 10 Nov 2022 22:52:18 +0000 Received: from localhost ([127.0.0.1]:44604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otGPC-0006MG-FZ for submit@debbugs.gnu.org; Thu, 10 Nov 2022 17:52:18 -0500 Received: from out2.migadu.com ([188.165.223.204]:21517) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otGP9-0006M7-Mv for 58790@debbugs.gnu.org; Thu, 10 Nov 2022 17:52:17 -0500 References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <87a64y8msh.fsf@gmail.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668120734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m3B/TBA6nlT3VvRJZQiDyUqHo9eLVPbihAYULwUaiJ8=; b=DQxhQ7MYQDXsYs8PYXrhH5Tr4C/CXl/+VnfXp2OibUy8g6xnUeINsyAradiypsqkZonTko W9dYyNquqMzTx0CUQ7sTTB4J+1qysnNopoVM2a80FbERJFU1MJII3OxbLeoyNkgRUL6dEo qgA37cJXGFRl947a+tbEAgM2iaoUvGc= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Thu, 10 Nov 2022 17:48:30 -0500 In-reply-to: <87a64y8msh.fsf@gmail.com> Message-ID: <8735aqwhgl.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: Eli Zaretskii , dgutov@yandex.ru, felician.nemeth@gmail.com, 58790@debbugs.gnu.org, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora writes: > > Sorry. The Emacs commit message format is a bit of work in the > beginning but it pays off in the end. I will make minor adjustment to > your patches and push them now. Its really no problem. I appreciate that so much thought is put into the commit messages. Most repositories I deal with for work don't enforce standards for commits at all, so this is a breath of fresh air! > OK, I will look at this part, too. Thanks again! --=20 Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 10 18:03:52 2022 Received: (at 58790) by debbugs.gnu.org; 10 Nov 2022 23:03:53 +0000 Received: from localhost ([127.0.0.1]:44608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otGaO-0006cq-Ln for submit@debbugs.gnu.org; Thu, 10 Nov 2022 18:03:52 -0500 Received: from out0.migadu.com ([94.23.1.103]:17841) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otGaJ-0006cf-Dr for 58790@debbugs.gnu.org; Thu, 10 Nov 2022 18:03:51 -0500 References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668121426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xuhS6qaIKMfZnbXJ5U4n5ApWlPJ+nyScYCvUVcx9lvc=; b=WDqqBJC3MmB7PyfwckGAYunxPExVqv95WzShIISvqbFMyt+ahlEplcmNaV30nrOG4vZRtj xatIdyuH2EH3oAl6AWi3RwscnIQLQllHeGbenot7vuDs8BBLnkto0pzuIKgASDNNt0bvPk +1LLMMiyUiRDFGssAG6T1CiEmCKCVOU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Thu, 10 Nov 2022 17:57:30 -0500 In-reply-to: <875yfm8lzf.fsf@gmail.com> Message-ID: <87v8nmv2cx.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: Eli Zaretskii , dgutov@yandex.ru, felician.nemeth@gmail.com, 58790@debbugs.gnu.org, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Jo=C3=A3o T=C3=A1vora writes: > I've now pushed the first patch, but I held off the second patch. > > I don't see this OPERATION=3Dnil option documented in the docstring of > find-file-name-handler, so I'm not sure we should rely on it. > > I think we should provide OPERATION here, because what we want to check > is if we, Emacs, can actually visit the file designated by the URI. So > I think passing something like 'access-file' as the OPERATION argument > makes more sense. But Eli probably has more knowledge here. Maybe > passing nil is indeed correct. If we want to not use nil I think a real operation argument like `access-file' or `expand-file-name' would be more warranted then. The made up one I initially used I was not a big fan of. --=20 Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 02:16:14 2022 Received: (at 58790) by debbugs.gnu.org; 11 Nov 2022 07:16:14 +0000 Received: from localhost ([127.0.0.1]:44976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otOGr-0006Uc-U1 for submit@debbugs.gnu.org; Fri, 11 Nov 2022 02:16:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otOGq-0006U9-Q5 for 58790@debbugs.gnu.org; Fri, 11 Nov 2022 02:16:13 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otOGj-000569-BO; Fri, 11 Nov 2022 02:16:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=3C0r0y1ASu+RHqjPvKm0mKcDadmJorzh0KzhxhZQCAs=; b=PXLIf4UzOG1lcdbXuc9l vNjPuV7P3QgFAhx5dwZBL2BgE6y+t0YDAchuvqS/6vQ+XQPIHqPsr2/ewASC1R0QrsffYOajv9aC8 ihwzEy4vGfFLQppwCVI9XKmiy5kVxU/ial3KVozONBMY5QzzPKdfPN8Ew8Y/9uutV2TbkIIG3RhAj 8pquxhHT11Rf82OikJ6IDqM6SYSkZLyl/+UzF5twob3kNv/7p2e2KVxgcupPGxuEMyukwkzeAolQc m3MWW8lex1M7WH7/Se4iTrtoOvWNB07GyB2c6+NTF78TBVVghulW49bDdJBHFumYcxmJ0/ocUm0U/ 1CeUyyZOQ9Hjmw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otOGi-0008Mh-MN; Fri, 11 Nov 2022 02:16:04 -0500 Date: Fri, 11 Nov 2022 09:16:05 +0200 Message-Id: <83zgcyotai.fsf@gnu.org> From: Eli Zaretskii To: Danny Freeman In-Reply-To: <87k042tqze.fsf@dfreeman.email> (message from Danny Freeman on Thu, 10 Nov 2022 16:45:27 -0500) Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, dgutov@yandex.ru, felician.nemeth@gmail.com, joaotavora@gmail.com, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Danny Freeman > Cc: João Távora , > 58790@debbugs.gnu.org, > felician.nemeth@gmail.com, stefankangas@gmail.com, dgutov@yandex.ru > Date: Thu, 10 Nov 2022 16:45:27 -0500 > > > Also, in the text above, please leave two spaces between sentences, > > per our conventions, and refill the text to be at most 63 columns. > > I cut it down to 63. I don't mind either way, but thought I would > mention that the CONTRIBUTE file mentions 79 columns, which is what I > normally default to in commit messages. CONTRIBUTE describes the hard limit enforced by our Git commit hooks, not the preferences for entries that will look good in the ChangeLog files we produce from the Git logs. I clarified this issue in CONTRIBUTE, thanks for pointing this out. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 02:29:33 2022 Received: (at 58790) by debbugs.gnu.org; 11 Nov 2022 07:29:33 +0000 Received: from localhost ([127.0.0.1]:44982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otOTl-0006mk-CN for submit@debbugs.gnu.org; Fri, 11 Nov 2022 02:29:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otOTh-0006mW-6t for 58790@debbugs.gnu.org; Fri, 11 Nov 2022 02:29:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otOTa-0001PT-Lm; Fri, 11 Nov 2022 02:29:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=vn4F6gLq5tWCqWsA8B4YbfDwhB070wc4ECF1LG1vjmE=; b=r0z9DsH4vjCwmjMsmhwL x4ImtQ2GdPZ22OqPzWkIMsrupetCR5H0os7xszcIKae2jEk2rKsoKXRIoKcwm1xrPyKGtd3DimVVK aTYuJ0rGXrIlRQ0AbK1Cw3JQmT9Y7AnacOwJsCRCrZ3he0rduNb2o4rN2icMZmgS0Mud7zf3nPo5W 4lwbVNT2oylSFjt7i4YZm8Fw4/vKw6bvPufVhskP5EHfjp0PPyNxGdw7G5VI++Re1IR2vl6dqlKxK IDcHeMB6dU3CLqk9DXvdfoZNb/uZ/OUmhLx416SVs/mCxMIj2f++zXmckAFRL4/yDwFQGWJhq7s/1 VazGEZYiuJ6y0Q==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otOTO-0007dA-1w; Fri, 11 Nov 2022 02:29:21 -0500 Date: Fri, 11 Nov 2022 09:29:11 +0200 Message-Id: <83wn82osoo.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Michael Albinus In-Reply-To: <875yfm8lzf.fsf@gmail.com> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Thu, 10 Nov 2022 22:48:20 +0000) Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, felician.nemeth@gmail.com, stefankangas@gmail.com, danny@dfreeman.email, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Távora > Cc: Eli Zaretskii , 58790@debbugs.gnu.org, > felician.nemeth@gmail.com, stefankangas@gmail.com, dgutov@yandex.ru > Date: Thu, 10 Nov 2022 22:48:20 +0000 > > Danny Freeman writes: > > > In reviewing the comments over and over I've made a modification to > > the second patch involving the warning message. Instead of using an > > arbitrary symbol I realized that the function `find-file-name-handler' > > works when a nil value for the second argument (operation). > > I've now pushed the first patch, but I held off the second patch. > > I don't see this OPERATION=nil option documented in the docstring of > find-file-name-handler, so I'm not sure we should rely on it. > > I think we should provide OPERATION here, because what we want to check > is if we, Emacs, can actually visit the file designated by the URI. So > I think passing something like 'access-file' as the OPERATION argument > makes more sense. But Eli probably has more knowledge here. Maybe > passing nil is indeed correct. I think you are right, but Michael (CC'ed) will know for sure. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 03:30:33 2022 Received: (at 58790) by debbugs.gnu.org; 11 Nov 2022 08:30:33 +0000 Received: from localhost ([127.0.0.1]:45047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otPQm-0008HP-Ud for submit@debbugs.gnu.org; Fri, 11 Nov 2022 03:30:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otPQk-0008HC-2J for 58790@debbugs.gnu.org; Fri, 11 Nov 2022 03:30:31 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otPQe-0002m7-K1; Fri, 11 Nov 2022 03:30:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Dwh/a8p7mMTZTXzF/ZcLYE4vVhydzcRU9Yb/O1aKJKY=; b=U7ic7Vkfzpf2ftrBFy5T tcJGMhlJ5DJ4HzhBlRNEKnpkORFrJCvviKZPGL7NObwQfI/yohmvr8xr8NFYab7Ye3iogL4P/aT/b aynQLGnfuqILxtIBPDx8/gOC5GuwtnPciCwlVsE2Llno0oiD/D84DhAO9KUhO8WO11HLL3DjPidw+ N0s8NH0Og8CvMfcQVog3bSvtQ7qc1OkV/yZvvVlOzyWUnMUciJU6W1zPfvf+aJgmb5N8CESVyz6cC Tpos6aYxw4yFjAY7NnDKtkHdlNBNX3bACDRMCrfidRLyz9IO6hSeCAMVjjinuKcAqKeA3nNrB4Bhb rY22XO17XkDttg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otPQe-0000MJ-3N; Fri, 11 Nov 2022 03:30:24 -0500 Date: Fri, 11 Nov 2022 10:30:25 +0200 Message-Id: <83o7tdq4f2.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Thu, 10 Nov 2022 21:59:37 +0000) Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, felician.nemeth@gmail.com, stefankangas@gmail.com, danny@dfreeman.email, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Távora > Date: Thu, 10 Nov 2022 21:59:37 +0000 > Cc: Eli Zaretskii , 58790@debbugs.gnu.org, felician.nemeth@gmail.com, > stefankangas@gmail.com, dgutov@yandex.ru > > But when dealing with eglot.el, which I am the prime maintainer of, > I really prefer to see design described in the commit message where the > design was introduced. It plays very well with vc-region-history. This is not the design, these are comments that explain why the code does what it does the way it does that. IOW, these are implementation notes aimed at making the code more self-explanatory and easier to maintain. It is quite possible that you personally don't need these additional comments because you are very familiar with the code and with LSP servers in general. But future Emacs developers and maintainers might not have such insight, and I'm trying to represent them. This is part of my job and my responsibility. And since comments can never adversely affect code, I see no reason for you to object. vc-region-history is a very useful command, but in my book the code should explain itself; vc-region-history is for when one wants to understand the reasons for a change, not when one wants to study the code as a whole. I'm not objected to having the explanations in the commit log messages, but why would you object to having them in the code, even if the commit log already says that? That way everyone wins. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 04:44:01 2022 Received: (at 58790) by debbugs.gnu.org; 11 Nov 2022 09:44:01 +0000 Received: from localhost ([127.0.0.1]:45115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otQZs-0001bu-UJ for submit@debbugs.gnu.org; Fri, 11 Nov 2022 04:44:01 -0500 Received: from mail-wm1-f43.google.com ([209.85.128.43]:54088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otQZr-0001bi-GB for 58790@debbugs.gnu.org; Fri, 11 Nov 2022 04:44:00 -0500 Received: by mail-wm1-f43.google.com with SMTP id p16so2630928wmc.3 for <58790@debbugs.gnu.org>; Fri, 11 Nov 2022 01:43:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=emeyOO0+1hUBXVri5mdtqpbLw85AQCZkws1KIh149aQ=; b=ImjNRwIsHXG2L7IspJsOHmmGoIuLl7deQn6m16d2TuWvAQij2RyD3owZsUfFFSuL3n 8R1D731ilBZFKehwJVFDdZdS9Blnq9H57JayXHvu6BrtgiTadrqT9rDHiRmGybNzCxDF 5Z+0k9tWt9VnLYJ7bFbP506RfASOSUD3dMcpjqYn8g5ChbaHT82rKpWaKgJ9tNT34fNi vR7/Bm/neRV9cDMtcHaHbKfepLrtlH+i9yVEp2h3NHfjbPAxZ1dyG1Fm26YNyBoZdlIS QeWPk2jzqYmxV2j0qJax6eQfJfzU5BVe++bJKlfFpm89doGbpTSEUJKnhRPzjOdxT5PB A2dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=emeyOO0+1hUBXVri5mdtqpbLw85AQCZkws1KIh149aQ=; b=HHiUD6VE3B39BN7JJNozaylosqm0rRJtU0ZOWaix57wI6TyzfrPL7Qbm0cGGEPPUDn kW3Va1UNPH6E2sAsB8XxdiN+CuJDwOGy3SGvT7HyA4+JDjSERp2ey4IDIDxsNItnHpY3 JgUNHHy56jQXWi8ooq2xQM91SgwNqUNry61urj9kqzcqAcsQYnZgQuMZ3JQIVysY8ofP bp1crpMWO/wMzhyq7//RuqIo1ZfYuCpOOib40OwxwyM0pNI0QBNm7giXqwAz3mO8a+hh ZFW/lv2pCuScD7O5UCy8WJBqv9d74WCYk3ZfDIWSGyygx1EvAGyCY7uPiuKBha998gVy zScQ== X-Gm-Message-State: ANoB5plWPCGLSdBfBDokAxids19Fk+X+/GPGmN9LatAAjzSogUC+TJPk epWeV+dHcNzmHBMzROIHCF0= X-Google-Smtp-Source: AA0mqf5Gj91EZ7NAMlVuJn4lSIn2LvIgehe1NglLn8xwTK8J0hIvu+M60a1Ow78vRuIjQB1jq/iVWg== X-Received: by 2002:a05:600c:448a:b0:3cf:6182:a458 with SMTP id e10-20020a05600c448a00b003cf6182a458mr679640wmo.70.1668159832618; Fri, 11 Nov 2022 01:43:52 -0800 (PST) Received: from krug (87-196-81-1.net.novis.pt. [87.196.81.1]) by smtp.gmail.com with ESMTPSA id x6-20020a5d6506000000b002305cfb9f3dsm268873wru.89.2022.11.11.01.43.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 01:43:52 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Eli Zaretskii Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <83o7tdq4f2.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 11 Nov 2022 10:30:25 +0200") References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <83o7tdq4f2.fsf@gnu.org> Date: Fri, 11 Nov 2022 09:45:06 +0000 Message-ID: <87sfip7rkt.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, felician.nemeth@gmail.com, stefankangas@gmail.com, danny@dfreeman.email, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > It is quite possible that you personally don't need these additional > comments because you are very familiar with the code and with LSP > servers in general.=20=20 Oh you're mistaken. I do need this information at hand, I forget things on a weekly basis. Whether in comments or in commit messages, that's a different decision. >But future Emacs developers and maintainers might > not have such insight, and I'm trying to represent them. This is part > of my job and my responsibility. And since comments can never > adversely affect code, I see no reason for you to object. Comments are not a 0-cost thing, obviously They can hamper readability, they contribute e.g. to a small function no longer fitting in one screen. They present a maintenance burden too and a source of duplication. These are their drawbacks, but they have many many advantages too, of course. You'll see me using comments very often. I do this on a case-by-case basis. I thought you were suggesting that those big blocks of text about Clojure jar URI be moved to comments. IMO they are out-of-place in source code, especially in such a short function, but they are quite acceptable in commit messages. It would seem you weren't proposing that, so this was a misunderstanding. Anyway, the comments Danny inserted: "Only attempt to parse URIs with the file scheme.". and=20 =20=20 "Leave non-file type URIs untouched, `file-name-handler-alist' handlers can be used to dispatch them properly." Are quite fine. I've condensed them and tweaked them to include a reference to this bug#58790 Now if someone could fix=20 ;; bug-reference-bug-regexp: "\\(github#\\([0-9]+\\)\\)" ;; bug-reference-url-format: "https://github.com/joaotavora/eglot/issues/= %s" To work for both GitHub bugs and Emacs bug references in that file, it would be just peachy. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 07:02:01 2022 Received: (at 58790) by debbugs.gnu.org; 11 Nov 2022 12:02:01 +0000 Received: from localhost ([127.0.0.1]:45211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otSjQ-0001It-TQ for submit@debbugs.gnu.org; Fri, 11 Nov 2022 07:02:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otSjO-0001IL-5E for 58790@debbugs.gnu.org; Fri, 11 Nov 2022 07:01:59 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otSjI-0001mt-Bn; Fri, 11 Nov 2022 07:01:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=8nKYxdZSM9YjkKT6PhNtGJc+TMz7Zqlm/BLlUPzKoAo=; b=U4UouVqCbJS31Pxqqx6j gpdpmnWPVmJ4SMzQ4eQWDgxEePO9e8b4jX3zG2ZJmISReLwwZ0Y0v/WZ96Vxyt2+VbeqS+6vUnYLr yd22iC/JiXfb6Xxc9sjR9oz1Enuoapc2pMBXDBS7Kd9SvKVX7CRVo57oJ9pQTJ6zcV50V2J7UOBRU KptF2irGZCAHXAIXLyobxLNB/mHb2f0eDcbZKDGKbGx4nWg6wtVm50UU+gX5WiaVLyDmMieSUPKOe fCtWqKkAjbHtkhTkYHkvHICnQDA0ICYjQgYYRRUfIbFipYF8xtXqog5FXFzWzzwMo+QA83R7KC2/i hYcqvcya18YrMA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otSjH-0006Qy-Q4; Fri, 11 Nov 2022 07:01:52 -0500 Date: Fri, 11 Nov 2022 14:01:54 +0200 Message-Id: <83leohpuml.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: <87sfip7rkt.fsf@gmail.com> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Fri, 11 Nov 2022 09:45:06 +0000) Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <83o7tdq4f2.fsf@gnu.org> <87sfip7rkt.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, felician.nemeth@gmail.com, stefankangas@gmail.com, danny@dfreeman.email, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Távora > Cc: danny@dfreeman.email, 58790@debbugs.gnu.org, > felician.nemeth@gmail.com, stefankangas@gmail.com, dgutov@yandex.ru > Date: Fri, 11 Nov 2022 09:45:06 +0000 > > >But future Emacs developers and maintainers might > > not have such insight, and I'm trying to represent them. This is part > > of my job and my responsibility. And since comments can never > > adversely affect code, I see no reason for you to object. > > Comments are not a 0-cost thing, obviously They can hamper readability, > they contribute e.g. to a small function no longer fitting in one > screen. They present a maintenance burden too and a source of > duplication. IME, these costs, while real, are dwarfed by the costs of making bad changes due to misunderstanding of why the code does what it does. And if I'm asking a contributor to add comments explaining why the code does what it does, it's usually because I didn't understand that by just looking at the code. And if I don't immediately understand that, there arew good chances quite a few others won't. > These are their drawbacks, but they have many many > advantages too, of course. You'll see me using comments very often. So we are in agreement? From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 09:01:37 2022 Received: (at 58790) by debbugs.gnu.org; 11 Nov 2022 14:01:37 +0000 Received: from localhost ([127.0.0.1]:45417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otUbB-00087g-Bz for submit@debbugs.gnu.org; Fri, 11 Nov 2022 09:01:37 -0500 Received: from mail-wr1-f44.google.com ([209.85.221.44]:40573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otUb9-00087T-MZ for 58790@debbugs.gnu.org; Fri, 11 Nov 2022 09:01:36 -0500 Received: by mail-wr1-f44.google.com with SMTP id z14so6590627wrn.7 for <58790@debbugs.gnu.org>; Fri, 11 Nov 2022 06:01:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xGZHlQ3CPHeExzxdvUrRFbBz4+Fge3+EVDcT3GX/G+0=; b=GleHv5arWcfaNjIvi2JjkPjqWKU+Dubo5/YujBLq7T3Au0rsKVTfikgPkQ2RHSPggu 61oj6yL8IqkLmKpVjbOYgF/Prr0yFD3jWyXfwHk8WRKMAp54ylszRJ8CG+IHwiehYdSN rwPficolm+pzhG+rVq6I8DkzrIWtR/niJZw25dLU/WvvQ4wStjBn0784XW79roSlX4wP VcyIMTwm30JW5nrVz2iVuMQwCVGSUBf519Paq1rNw2AkYEWC6j6zny7QXeetMZjKHGa/ 3cJltAz3YW6N+jt4zZzvVISGvfnnK/uSTjQ6fjP8Xel8siVlnmipaeiz7H+r88WCcgZS WpFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=xGZHlQ3CPHeExzxdvUrRFbBz4+Fge3+EVDcT3GX/G+0=; b=Do4wxNzdirIcfx1fMlHkkbueFrZg6s4FqQIxYsV1KxZwg/ny6PmYTMeQykw3qzhrTX SMrma2J9y0qYb7BSrHYpYUUqRpb81gt6nZfO+fgonuCcUQZ+doV/EbRTg8M3hABJhP+F 5FafIEwRzAQbi6RIBNQ/FDi2zrPWjxdXMmtJKn9ABNp5LgxSS79HUh+Kuth+6RLK6ALC f7C6LvPOSWf5E2KirBzpfZyf6E1fWj4D63EcXvo/QJSu5fQYG6mL6S69fmNp1C6xxu8j VyV0zASTN3KPqmu/2od8mWbOZ5S7xPJfyAs43qOYNFnvvveVWif8xs2AZ+swH2+zcOAS RZHw== X-Gm-Message-State: ANoB5pmfmjAnURSbM+EGhNbzW7mGI7JlGn0xuZpMpjiXS8PknfuObeWA i1L6s212o8Bo+HvG4FXocBo= X-Google-Smtp-Source: AA0mqf4WUhgGXRgim0Cw4CQ8cSjaFgxij/zrnbiPcN66eKYXgZGq8WJcueK5Un/ewS6zk32C8mVmmg== X-Received: by 2002:a5d:6407:0:b0:238:238:cae3 with SMTP id z7-20020a5d6407000000b002380238cae3mr1326352wru.685.1668175280823; Fri, 11 Nov 2022 06:01:20 -0800 (PST) Received: from krug (87-196-81-1.net.novis.pt. [87.196.81.1]) by smtp.gmail.com with ESMTPSA id t5-20020adfe445000000b00236740c6e6fsm1923099wrm.100.2022.11.11.06.01.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 06:01:20 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Eli Zaretskii Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <83leohpuml.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 11 Nov 2022 14:01:54 +0200") References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <83o7tdq4f2.fsf@gnu.org> <87sfip7rkt.fsf@gmail.com> <83leohpuml.fsf@gnu.org> Date: Fri, 11 Nov 2022 14:02:34 +0000 Message-ID: <87k0417fnp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, felician.nemeth@gmail.com, stefankangas@gmail.com, danny@dfreeman.email, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> These are their drawbacks, but they have many many >> advantages too, of course. You'll see me using comments very often. > > So we are in agreement? You tell me. The repo right now contains the original "jar:" motivation story in the commit message and what I think are essential and useful comments in the source file. Is there anything you think is missing somewhere to aid comprehension of this change? Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 09:46:00 2022 Received: (at 58790) by debbugs.gnu.org; 11 Nov 2022 14:46:00 +0000 Received: from localhost ([127.0.0.1]:45476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otVI7-0000lI-NL for submit@debbugs.gnu.org; Fri, 11 Nov 2022 09:45:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otVI6-0000l5-57 for 58790@debbugs.gnu.org; Fri, 11 Nov 2022 09:45:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otVI0-0005g3-0E; Fri, 11 Nov 2022 09:45:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=CRItA/cZgXU8Y0v7Sa/Lnyf0g9/fqxf5yf7yAF/cVuo=; b=hmA4OoLGSLqxrWd+Vyrh IcJPCm9BFGIzQ0gQY5RA0/vVnq64lVmACfpccnukHVBCwwOjTl0Nl8KIoIiBs55863zPWWb2nE6Ab D4SYdvvKORL+Kal/LN2oZ/yJZ9sjrFFqshAMFlr8i+k13801opcNEH/cgygxY/xxUHZANkZHdZEf3 ZofJGqvobFZ7eee3E1/kzOssMR8tXnLpPuXRD2yyRs2LeN797egwA56/N3ijduXc2yaQqf/ocukvr vlN24MyNp0mK23LLWqi9+nU+LyngHPR+QibhFPHzXx2Ud9sXW6hKk8ZSdAKRWTQq1YVi8J3IQfq96 Nh/0xeBmO9T3kw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otVHy-0001CF-Tg; Fri, 11 Nov 2022 09:45:51 -0500 Date: Fri, 11 Nov 2022 16:45:52 +0200 Message-Id: <83edu9pn1b.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: <87k0417fnp.fsf@gmail.com> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Fri, 11 Nov 2022 14:02:34 +0000) Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <83o7tdq4f2.fsf@gnu.org> <87sfip7rkt.fsf@gmail.com> <83leohpuml.fsf@gnu.org> <87k0417fnp.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, felician.nemeth@gmail.com, stefankangas@gmail.com, danny@dfreeman.email, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Távora > Cc: danny@dfreeman.email, 58790@debbugs.gnu.org, > felician.nemeth@gmail.com, stefankangas@gmail.com, dgutov@yandex.ru > Date: Fri, 11 Nov 2022 14:02:34 +0000 > > Eli Zaretskii writes: > > >> These are their drawbacks, but they have many many > >> advantages too, of course. You'll see me using comments very often. > > > > So we are in agreement? > > You tell me. The repo right now contains the original "jar:" motivation > story in the commit message and what I think are essential and useful > comments in the source file. Is there anything you think is missing > somewhere to aid comprehension of this change? I already added what I thought was missing. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 12 04:02:58 2022 Received: (at 58790) by debbugs.gnu.org; 12 Nov 2022 09:02:59 +0000 Received: from localhost ([127.0.0.1]:47296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otmPi-0002vn-Jj for submit@debbugs.gnu.org; Sat, 12 Nov 2022 04:02:58 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:37524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otmPg-0002va-PJ for 58790@debbugs.gnu.org; Sat, 12 Nov 2022 04:02:57 -0500 Received: by mail-wr1-f49.google.com with SMTP id bs21so9260231wrb.4 for <58790@debbugs.gnu.org>; Sat, 12 Nov 2022 01:02:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Jpg4R343JiQr82yvCCw7aAmEQtzpCiB8raAR05MJQ4Y=; b=A59sVbXLZaqUHPToidyVNCkMY7LWtErko+j6tCnuAOI/du2IvdqvwhsNOkYP5thQ7L JofAvvfSrba5p93HG7km0VwYVLO1CcSpANUnW0k/esPXMKUB9zCofywNCdeXXXUZrnd9 rd4/yRCvaBVzFp/+UIH1miUxPy4RHlOz2Kl5Ubq8QJ6VagzNx+ymOwMDAwwO5RgNKT83 BK7o6+bErVKuZjVJOJoo2LOmr6unu9MkOcsAP5p5tI5PUGWOzkIl0vIeRybhDnRRJ648 YOnHBAaT24pT4zE2OB6iraQqNclBvapbIT3WByL741+9LkRglBuVRFD+O1IIQ2kodQOT 5ZJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Jpg4R343JiQr82yvCCw7aAmEQtzpCiB8raAR05MJQ4Y=; b=C+ZRbMsn13+nnWvEF6CN4QBXZBLjIPmgP5+mPJ64grM/UXIJPJyTU44HurRNDObkII QbqC9vpauxvgSrQkycjZiAZ/0M0nGFBnsfk8jTjUvXPlbze//T17SIR/j+Y30Og2z3Ct WVbiVaXwS6Sfvk9mH/5F23rLGcMaNFk4d4ZkA1b6uhyFSChwDklaldyEjlrWSkRLiZfH //e0KzXLOXoCW/oOEsjTijMitethSOvtdCbbNTvmZxWtfwFhBam4NbtMoUMaQJEuPNTZ RidCN69ROSwL4wRm9My5eKcxtfyjLWZV6fsQl1MEbm9OXdtWNxR9FAJi318f1E9HFfIE 6nMw== X-Gm-Message-State: ANoB5pk/8TUs8Q3NF64j5l+vRo+d+KggKY8qiprw6flbnc0P8KO9tUJM JYZw/fbpR0OdQuIrma5RUm4= X-Google-Smtp-Source: AA0mqf46duqB+j3D4eG+XNLPT3xBvBGdDN2Da3RTbZXdbFr6opCIToe+8fq23l5AjAgvoA3Foy4Otg== X-Received: by 2002:adf:e78c:0:b0:236:704f:29f4 with SMTP id n12-20020adfe78c000000b00236704f29f4mr3127319wrm.11.1668243769760; Sat, 12 Nov 2022 01:02:49 -0800 (PST) Received: from krug (87-196-81-1.net.novis.pt. [87.196.81.1]) by smtp.gmail.com with ESMTPSA id h11-20020a05600c314b00b003b4fe03c881sm12243276wmo.48.2022.11.12.01.02.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Nov 2022 01:02:49 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Eli Zaretskii Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <83edu9pn1b.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 11 Nov 2022 16:45:52 +0200") References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <83o7tdq4f2.fsf@gnu.org> <87sfip7rkt.fsf@gmail.com> <83leohpuml.fsf@gnu.org> <87k0417fnp.fsf@gmail.com> <83edu9pn1b.fsf@gnu.org> Date: Sat, 12 Nov 2022 09:04:02 +0000 Message-ID: <874jv47ddp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: 58790@debbugs.gnu.org, felician.nemeth@gmail.com, stefankangas@gmail.com, danny@dfreeman.email, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Jo=C3=A3o T=C3=A1vora >> Cc: danny@dfreeman.email, 58790@debbugs.gnu.org, >> felician.nemeth@gmail.com, stefankangas@gmail.com, dgutov@yandex.ru >> Date: Fri, 11 Nov 2022 14:02:34 +0000 >>=20 >> Eli Zaretskii writes: >>=20 >> >> These are their drawbacks, but they have many many >> >> advantages too, of course. You'll see me using comments very often. >> > >> > So we are in agreement? >>=20 >> You tell me. The repo right now contains the original "jar:" motivation >> story in the commit message and what I think are essential and useful >> comments in the source file. Is there anything you think is missing >> somewhere to aid comprehension of this change? > > I already added what I thought was missing. Thanks, it looks good. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 12 12:03:16 2022 Received: (at 58790) by debbugs.gnu.org; 12 Nov 2022 17:03:16 +0000 Received: from localhost ([127.0.0.1]:48894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ottuW-0007Xa-Dn for submit@debbugs.gnu.org; Sat, 12 Nov 2022 12:03:16 -0500 Received: from mout.gmx.net ([212.227.15.15]:37327) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ottuU-0007XL-Ho for 58790@debbugs.gnu.org; Sat, 12 Nov 2022 12:03:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1668272585; bh=Fz/Q9f+m5bPqNLzvLHa2PLjdkMVxJzDuKzBrFf4DLBw=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=q+BN3d14BI0oR2Z9fZUVir1DWZmmwNEL1ZgQ2gqd0iFZYSPo8KWTMNhihlUv8/mE6 vSlnnHuhboNg+zre0IFEfXFi0Qj/B2YiiEzxZ0277zw4t6qbr1SBbo8Awy0xp788Uj MLJdPYlLf+thB3iAcecTiZfL2DQpZ4+bUaaxfrWuAk51EktZyWYEdr4MRRYxoIYVeu H+0m0LY0pFQiqNQtITa2LBk64/PH5JEqmk3dlW2KwjqDK5X++Tx8NHf1kyUPQHRs8L gi8AwkAq8iz1f2qRWC+rZHe5dDd+b/ns68cM4mIV/Y5h3olArGVlVTdDEM48GUUkrt k5T+sXUU2PHzQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.18]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N17UW-1ozmx11L2Y-012UB1; Sat, 12 Nov 2022 18:03:05 +0100 From: Michael Albinus To: Eli Zaretskii Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <83wn82osoo.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 11 Nov 2022 09:29:11 +0200") References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> Date: Sat, 12 Nov 2022 18:03:04 +0100 Message-ID: <871qq8xfzr.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:aAPHvc2qrCyQ8NSf5GrYKWzDikt/vOITZqX33wUzQqknB68h02L jRUGGEc5FOvPaopvD87jh5VYQzYq9EpRpAdoozIVWR93UVV6rYfgFvCaGgZfasBhmGsklvb gBojoepBSxrH84PRI/aF18QFUEKQaD9YcC1ZwsZdii01Xjw37khGpPsDi724OITRuSbwEbg KqkLHHhmM4aQWDfnKizpA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:os2DvbjtEA0=;Ecso2n0nTMtFVgD9ycCWCbTihL2 mCcpl3FnFVL1jMrG0MkzuCmkE9tKrRbCqRNiOBF3k0FLC+70/X6QEY/KN1WGO9lUvNkfqulSH HXuK/e3A+BXDNTPLNe7f0PN9C5VC2ubEkGdhjWhbaRjLstamP7wQkp8P8rbbOyiEe/b11MJ5C B6NSj3nkKhbiWjvl9pQRYgUTHJpoftp0cinxKq2yNBHLvCNuKA93ty1El67d4Uw6LSR+K7WCe VlnL57YHEFvbR8peHNp1IGK59bQSZ7okXtLJl543WrMQrEBot8+XF24w3LbEmy0jrvr0fGXez U8sxj5Vq+bALukneUWWohNfzPg8ukTjcEpB7Iuz+7a1ed5SlWXtwsZ/tBPuAEgcdFOJzNXys1 Xs1IOg5R7wKmmrPS5pDIcML8SE51zwy7afrWraHs31GZ9zYtcz0LeaC8hu7DZxPnrP/cdDgo7 94B+PBdmgcAzroH65kUz3ksl//vWQ0mIFfh3EmQkWFe57IZqCQTgR58XfXHKPzgy+l9uWIm7o 5dsOj1Fh+bsmoqsDqeU3dFrF3F13v1FcBzxlyPmmBCtoYJqB2NjweqV4/yqYgDRutDsBreBCB d3v+R2vumGWSitN3F+pVa3hRefpuMU+G6hBFJ4RahIYP1ndOIhnD6E+1R/8bmpPVxUvFbgOOv QjgJpQAIPE4OQ82vH1JHRyv/BVoYueUSz08ZSi/ZujojKCgLlygjqPm8q/75iXR3Oz8SJAq8P peHyJMSQzC8s6dVKebkuQHBCvF0SegIpkNdvkHofiRVnzjtt08uSjaj+rFDPSyuZOZbrXx+Eh 1DWAPn+/Aay/Nv3a0daSWYz1qF+ClHOd502R0WOtt2ubOdvwJq08tCDCofwGpNFrGu6yvRfYV 6t5LnrQiROXUVC7ESKtG0RRKU+fRvNFDMUetdojXgDOnQckRWjanHCrekpgyT5qkVLmcE/pkJ TyGwAHq4M4THwMaZwf0oupkn3p0= Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: felician.nemeth@gmail.com, danny@dfreeman.email, 58790@debbugs.gnu.org, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , dgutov@yandex.ru, stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: Hi, >> > In reviewing the comments over and over I've made a modification to >> > the second patch involving the warning message. Instead of using an >> > arbitrary symbol I realized that the function `find-file-name-handler= ' >> > works when a nil value for the second argument (operation). >> >> I've now pushed the first patch, but I held off the second patch. >> >> I don't see this OPERATION=3Dnil option documented in the docstring of >> find-file-name-handler, so I'm not sure we should rely on it. >> >> I think we should provide OPERATION here, because what we want to check >> is if we, Emacs, can actually visit the file designated by the URI. So >> I think passing something like 'access-file' as the OPERATION argument >> makes more sense. But Eli probably has more knowledge here. Maybe >> passing nil is indeed correct. > > I think you are right, but Michael (CC'ed) will know for sure. Well, using nil as operation might work in this special case, but it disables an important feature of file name handlers: use of inhibit-file-name-operation. That's why it shouldn't be documented as such. Using just an arbitrary symbol as operation looks better to me. If you use an existing operation name, like access-file, it could conflict later with the inhibit-file-name-operation/inhibit-file-name-handlers machinery. This said, I don't understand why you need this check at all. But I haven't followed the eglot discussion closely. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 13 16:18:31 2022 Received: (at 58790) by debbugs.gnu.org; 13 Nov 2022 21:18:31 +0000 Received: from localhost ([127.0.0.1]:48488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ouKN4-0002TW-Op for submit@debbugs.gnu.org; Sun, 13 Nov 2022 16:18:31 -0500 Received: from out2.migadu.com ([188.165.223.204]:41749) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ouKN3-0002TN-0u for 58790@debbugs.gnu.org; Sun, 13 Nov 2022 16:18:30 -0500 References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668374307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GhZ2EH8HsU+S4h64RJKYOGPuwKC98vqsd38IT8tv+jM=; b=tV5G5WoI6Ndcd1/vUQF6Jhur3eaROs14daEbPHeui6QMz71CguXEGiKZZP1VJYLs1LPt4K 16Z1oF4kZ5mZWP1Gw4TrzyZnBvS0kyJIIU0ti+wDRWWTEDzBJTivyMWgYQxm+KuvUbAAke 1pq6+jRBtxFQ91ZRZbUtPoTjww60tCQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Michael Albinus Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Sun, 13 Nov 2022 16:04:02 -0500 In-reply-to: <871qq8xfzr.fsf@gmx.de> Message-ID: <87mt8uwo2q.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: felician.nemeth@gmail.com, danny@dfreeman.email, 58790@debbugs.gnu.org, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , dgutov@yandex.ru, Eli Zaretskii , stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Michael Albinus writes: > Well, using nil as operation might work in this special case, but it > disables an important feature of file name handlers: use of > inhibit-file-name-operation. That's why it shouldn't be documented as > such. > > Using just an arbitrary symbol as operation looks better to me. If you > use an existing operation name, like access-file, it could conflict later > with the inhibit-file-name-operation/inhibit-file-name-handlers machinery. > > This said, I don't understand why you need this check at all. But I > haven't followed the eglot discussion closely. > > Best regards, Michael. Thanks for your insights Michael! If you are curious, this code in eglot is about to round-aboutly call `find-file-noselect' on a URI, which Emacs will probably fail to open if there is no registered file name handler. So before doing that we write a message warning the user if no file name handler is registered. That's the idea. With this info I've written up another patch that checks find-file-name-handler with an arbitrary symbol (with a better name than my first attempt, IMO). I've tried to strike a balance between inline comments and the commit message. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Eglot-Warn-when-receiving-a-non-file-type-URI-bug-58.patch Content-Description: eglot file name handler warning patch >From 86a444be767a3e160f60e46086e38ef154134683 Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Thu, 10 Nov 2022 19:07:46 -0500 Subject: [PATCH] Eglot: Warn when receiving a non-file type URI (bug#58790) When this occurs, Emacs will probably not know how to open up the URI. The warning may help users when investigating a potential solution. * lisp/progmodes/eglot.el (eglot--uri-to-path): warn on unhandled URI --- lisp/progmodes/eglot.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 97c674f7aa..97febdacc2 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1534,7 +1534,11 @@ If optional MARKER, return a marker instead" (substring retval 1) retval))) (concat remote-prefix normalized)) - + ;; Use a fake operation, eglot--fake-file-name-op because we + ;; don't want this check to be suppressed by `inhibit-file-name-operation'. + ;; We just want to see if a handler exists. + (unless (find-file-name-handler uri 'eglot--fake-file-name-op) + (eglot--message "Received URI with unexpected scheme: %s" uri)) uri))) (defun eglot--snippet-expansion-fn () -- 2.38.1 --=-=-= Content-Type: text/plain -- Danny Freeman --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 15 14:04:20 2022 Received: (at 58790) by debbugs.gnu.org; 15 Nov 2022 19:04:20 +0000 Received: from localhost ([127.0.0.1]:55266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ov1EK-0007YM-4D for submit@debbugs.gnu.org; Tue, 15 Nov 2022 14:04:20 -0500 Received: from mout.gmx.net ([212.227.15.19]:36701) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ov1EH-0007Y7-2a for 58790@debbugs.gnu.org; Tue, 15 Nov 2022 14:04:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1668539049; bh=SCX5YPos/dnQhx+D93n+DEF2/sVFz3Y1WxW7D3lXvkE=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=pmY77zuCRthDX+fElvxIOTRKF3a8YSlXo5FuNV75VPHMfyUsUIOFezFDOlSlqITQu VO0L3GXUpOVu8omNDOzrfF79HjvSRiWZgr9pmcD5wh7OqRlF1yJ+3X8fUEPus2fc7z R4W3zKH7sntfr5OgmNq40CCEHMguOmPcGFj8sR5CML2aQp3LEnq3NEJ175ifo9WFVZ zo0MsWMa1bSstlmNaFMdiu3DHDJnAdKQJgJB397+2DRty+uUrz0J49ECxm1R9pQn0u vycOeGTp/zv4roAdwMZViZgSNf9RxKp+fj4O7P3y4mkYWfSbh0cyAWLstrpm2AqW7w yD0hJihZUY+fw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.14]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MirjS-1pQngD0ZbI-00ey8X; Tue, 15 Nov 2022 20:04:09 +0100 From: Michael Albinus To: Danny Freeman Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <87mt8uwo2q.fsf@dfreeman.email> (Danny Freeman's message of "Sun, 13 Nov 2022 16:04:02 -0500") References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> Date: Tue, 15 Nov 2022 20:04:08 +0100 Message-ID: <87zgcs6nvb.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:v5cCatOYjhvJ8SzgjhS6TcTcBWaodTqfcO/RPsJhfVItimI9DBQ p5reirPPzuCKz57/sBV7lt855i40IWinJupRdJ8Fv/PXXSer129mtGYCqBqdxnvenORNt1I hacfJIJt+jNG+LbD/IhH+Y+bo7X9LZV+xmJaGods29bGkyguoI/kXgxHo83xH1SBhcJZ5GI YnpWHuCRcO6SO86IdNr/g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:vtiz9mRc1pc=;yCP0leD4yXolMqkbc2aUoSwvXxT Nas8diAduTyCKQydzfZi9Jw4Chr8Kk5c0stO+TjjIane6mrLrHGurpxzv0eBqNKmMMtAc09OT T6C8iJgL5f2g1cSwMvXkEB5+alu4dtegi8dc0Q2jVlpRgZ2Z4phnUVi8wVxzLJaxnamMh/V0r TIQLOT6k1Q9GbPufm8pBwBp8wm6zRSuMZd2/4erUTkZHSledxxIBmlcPBSsak1r7p7b4lrmPh SFhoRNCQfXh53d4VEJUHV3pK8tyUxJIVGO0mnRfMYb5eVlZgu2WpKDWwv99AI3RqCZWzNflmh t7rL8d1a2DLSuMcUHhVCDJUMklBAzPUOPtpn7Nf+IR5wpUWd4Bpt3+5l0XDMi+AxLrTlpX09K 7yzJm2FVPheyEQc+2iuaqyUgaMFZATHdLvjBqYMV3IuU18lsHFkgao5l+iaD1Kab3/LciWu5e cj6V2TLOp6pw/ZnFHbsWWyxmv4fxYC817P93UYStWoZI58uObRzxIULGfcS97h2Pm9MF+YUf8 azD5BU38Hh/2AjUzooAkcuLpWh2MMAEOxPIU2MwGUUpC5smsP526Dz7F6c36QQBjnsKT1M/Po enGBqE0Ng3dd67dVnFC5lUjFgk7SwHMti99xA014GRypqfX959CUY4L6WsRGPERQW6tgoY4zo 2aWxahFrt5u+JIfTJrYWte5Pw+uPoGQVVdQn2JooCSXn9Lpkfzw4+jgF3qAdE4njJegh5RU1y GjFqFxstZd68rVciyDHkD9xZK3FtI/UoafVzBld6RYfwiGPwtU92uvTH2ulP75LaeK+8TeARE OFxVPRlPNzlPQwq2ZCNkQD7E5DqaWzpIiVycrVIyZXu5x9LeNUAPogmx+PzEZBZ2VCFUDfKpc J3UJ/u2FA2Mdw9EWH9QfuNMceDcsIH5VGsOZzYJLHE0+MJARRLt9k8lktvGRUo2k+6/zBEZ55 HW7J0OAdujrib4MxwXaGue9U9e0= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: felician.nemeth@gmail.com, 58790@debbugs.gnu.org, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , dgutov@yandex.ru, Eli Zaretskii , stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Danny Freeman writes: Hi Danny, > Thanks for your insights Michael! If you are curious, this code in eglot > is about to round-aboutly call `find-file-noselect' on a URI, which > Emacs will probably fail to open if there is no registered file name > handler. So before doing that we write a message warning the user if no > file name handler is registered. That's the idea. Another approach is to simply require url-handlers in eglot.el, when it comes to handle a URI. It shall do what you want. (Untested, I haven't used url-handlers for a while). > Danny Freeman Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 15 17:36:37 2022 Received: (at 58790) by debbugs.gnu.org; 15 Nov 2022 22:36:37 +0000 Received: from localhost ([127.0.0.1]:55461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ov4Xl-0004UV-FF for submit@debbugs.gnu.org; Tue, 15 Nov 2022 17:36:37 -0500 Received: from out0.migadu.com ([94.23.1.103]:38266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ov4Xg-0004UJ-TC for 58790@debbugs.gnu.org; Tue, 15 Nov 2022 17:36:36 -0500 References: <8cf8ba5d-c604-b2dc-274a-7597b19fb73f@dfreeman.email> <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668551791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=arxmMEdSy8F69gs8OCVubSvhoApYE6hz8eh+Bp575sY=; b=mw0m6CRUyLF6wZoQbjEAYOUP+DzLp6fI3SW51WimaIi1NGS/LW/3uCz4bbZ3olWFK8NE/U itc3KgSejDphyTMlwi+idqGuQIphSHbyZZoDd3wKMuajNYmJ9kzQX3hAMl5usK5/uw6zJq 9pLkpjuLOWb2OhCitUgvbk3xdEdqM2k= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Michael Albinus Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Tue, 15 Nov 2022 17:28:54 -0500 In-reply-to: <87zgcs6nvb.fsf@gmx.de> Message-ID: <87r0y3luad.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: felician.nemeth@gmail.com, 58790@debbugs.gnu.org, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , dgutov@yandex.ru, Eli Zaretskii , stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Michael Albinus writes: > Another approach is to simply require url-handlers in eglot.el, when it > comes to handle a URI. It shall do what you want. > > (Untested, I haven't used url-handlers for a while). 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). 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. -- Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 16 02:53:18 2022 Received: (at 58790) by debbugs.gnu.org; 16 Nov 2022 07:53:19 +0000 Received: from localhost ([127.0.0.1]:55912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovDEU-0003v6-IN for submit@debbugs.gnu.org; Wed, 16 Nov 2022 02:53:18 -0500 Received: from mout.gmx.net ([212.227.17.22]:51589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovDES-0003us-D2 for 58790@debbugs.gnu.org; Wed, 16 Nov 2022 02:53:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1668585184; bh=2t1q9CDBx7YENAen6IAc0nR2g/nAfj/N/lxKHPhyQyE=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=jHHvqF09c8rZZuTCkglqbkbh8n+l+2UMwrcQY74bKEriEoTG8SrjrkcmJbqhXQQKK goZYsjQNWD6Em5M09yiOKNWQQpsyMV9w4yKEGO7U5kq2k7l+hw8MIe4vJYJWnRlZYR ZhohSylcTZyWvBYt8Oi4DL1xPWpAGzq/iQl6vYIFTJ6/O9/V+FYKE4WKaxqDONIwbK UQ8hTqeVbvrDrDzsYbffkBGhHoBhWHwnSgxmjAERmoq6GN32yujMlizIyNHGnH/EDQ lylT2WRFwUtglgNCYnUi43w4sRVl7gs+m2DsfAvRmzYGd5YcDrMr+PkWDilgZPkDoU Z7+Rm5qJOJNRw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.14]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MI5QF-1ohkYx1dAt-00FCr4; Wed, 16 Nov 2022 08:53:04 +0100 From: Michael Albinus To: Danny Freeman Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <87r0y3luad.fsf@dfreeman.email> (Danny Freeman's message of "Tue, 15 Nov 2022 17:28:54 -0500") References: <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> Date: Wed, 16 Nov 2022 08:53:01 +0100 Message-ID: <87iljf72ua.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:WDBuUMHrqv8kL97w+Tot804p78xjF/70PZwuysNFzsNMhlIQLBh rCTIMzG8VadxyUntntvMyJ2O0E8dHeA5xxZd2uhtZ2TaN+DLvjEsKYk7iqNanJDNMbdPTdF t1VzaIuQIO105x6vyrkBXMLmq8Jwh6jLxgTQuhx5pfHsHgr0RdSyn/3dnJF6wkbdSy3WUd4 kHYpLLg0uG4iXYtRl9Vhg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:sCJIW1mEXrw=;XjbdfXtk4Q2EvQJAm0vM8H8ZMCg 49BI1S+4AI6CIoxRk6np8nMi/n2eZJJcho2er9KDk90Y2NMqhMRDYoDMB1gxby8L68aINmU4Q SlPQYYkyokp4TJk8BnOufb+PtwsxCqZnGknQoD0yBNtTtwlRUhYAODagS90ngFrokfMWvekp5 OEEuu8Gk80NwWVYdCpk3lJqvuSF6isWNrnecOFRQEjgU9ACY8y3clFYdNVX+rspI3RxbMcDHr 2i+POKDw4xGLVqDngY+L/C7sWr4btQoFaHIakYRCBE90ahTJThqB0YT67hjwI2m2mLuDgobgI f02fbdnZ6AECUPXa4aGoUHUfIN/e5UAdUMcXozuqQOurLXy2agkR9sFHxHqbpHPbXKu3q/GgM 4dbnr4C0F1EvNH9nzy/KLhDNI+YC7DzOoIMGMvdiCAa5Ohbe6pPLU+BBQ5/Lr0gZNg3UZAL9n s7/UsILVLjkAG28qzBCPoOz363dopWqh/iVMJCwsL7zhRMSl1kSTMA8EyNxIhOAOXm3rzMkXM t/5g/mXdYDBU/jTIcsjN33MZerefMkOomTwer8bQAYezKFH27IlPX74iQDn789jAgZBY8On2P 4JMsvRlES+umNfc9Ti8hKdd1A40httI0I+y3BR/EDtdTAmp1lJPxyYiqlU71kR4/CqvztXXB9 PPCqEXHG0GE17sjVLGXiUqf9U920DRDy5W9MkV4Sk1QudiA4Bi5R/nt9dc2GJ2/LByFBqWGod oETcvLBDGxhDBrXjFWjjd7oN2VGBW6GlUprtO9At2exaFflYHwvVm49Z83R5/21dtbAKUo5ie xJDYOIA7ThDcB/luscfWi72WVktaQgQQ9tQcPiFhK2OCMUUVN2hf6TULNFmKNzVbSH6z6bfHI Yia6ZLdUb5HG2Rsv2Q1ifV8QgE7qx97XlpXQHy/JleMgi+22ePEwtevPwwcd6d5mT+auKNVge 4JRSHgqvJsZFM8/HDG05JhAD4d4= Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: felician.nemeth@gmail.com, 58790@debbugs.gnu.org, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , dgutov@yandex.ru, Eli Zaretskii , stefankangas@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Danny Freeman 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 16 05:20:39 2022 Received: (at 58790) by debbugs.gnu.org; 16 Nov 2022 10:20:39 +0000 Received: from localhost ([127.0.0.1]:56190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovFX4-0001Xe-Kg for submit@debbugs.gnu.org; Wed, 16 Nov 2022 05:20:39 -0500 Received: from mail-oa1-f50.google.com ([209.85.160.50]:33414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovFX2-0001XP-3j for 58790@debbugs.gnu.org; Wed, 16 Nov 2022 05:20:37 -0500 Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-13bd2aea61bso19567232fac.0 for <58790@debbugs.gnu.org>; Wed, 16 Nov 2022 02:20:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RC2CzmCYDhDZBItRBCcTNOOqBiAMYMQaXxKroCp12iQ=; b=SeQxb7OYQBu1Bga5cirQN2ai4GnecM6ZirnPR6fIu43PD8At53p20KHtkVa/0vI2R8 bwTfzaLAQ8LzWEPktT1E9yu1I52Yaa3u6f64V07dSflSuJfIq9kDPh8GyObBrHfHoFIj kKWoYr8keeEyOVGpMHWo5kWW0DcXX4ff4ass/T220pIDM3PaNwDpyRrmpEYQgDep8zEi PN+i6bgwGTQqO7imVJ6uySjebuAoeu0tsPflyf+MeQiWYUoapU11l397iPfAgBlpjV91 qBsdxhc3F+TYMuLqEa7YOhwIvydUeZdNRqhwEUMbLyRhRfJ/FArXKjgtiLIRX0kAZqB6 AAyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RC2CzmCYDhDZBItRBCcTNOOqBiAMYMQaXxKroCp12iQ=; b=tZXiy7mu1YA/WOLO9gA81Ph3B48PSOM8fFXnneWu0FK39KWmd5oOAWbM1MEH+ZzQkf SWOGz4gtKxUYOclsNhmIv15L3vKfIPHJjVTfenjA4CzxqoaCcSW7xh1AzpD5pqgkEKuf DbnmDCwo3Vgsxa976yimUUBqqSvRVOZT6FghP3zLqVTePZWeDo489fdnOAtAFiQzXmQt jxivIKS/ivC3gpAPHCKldFrKh2UqWjIR2PtBE2rxOuE0xAPYtzmfcGR+aPrU+Gy5i7TA XV4mI9VZnbjucs7oJKpu5cUqQE1IMpxw9Sx/3K082YG3kBLeuFXW/nTDYDuQXg5Tmc61 O7cA== X-Gm-Message-State: ANoB5pmvjQo6UcBD3jqmSouCh7a9DgNn3Qmpbzdc86SzLBlVsv8/RkRv BfcKBE6vNdFIA3ARTjbTgYKJbdmZlB0fLtnUy2s= X-Google-Smtp-Source: AA0mqf6XDI8M06qy4hNcXR97c+2/NMTnOdikYcvg+3ElH+5LxOi8D6mwL7G5UZt9KH4dnJbvHoWMqTXMN+qQCmi7NJw= X-Received: by 2002:a05:6870:b1a:b0:132:a103:ae22 with SMTP id lh26-20020a0568700b1a00b00132a103ae22mr1296507oab.215.1668594030535; Wed, 16 Nov 2022 02:20:30 -0800 (PST) MIME-Version: 1.0 References: <87ilk5xq01.fsf@gmail.com> <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> In-Reply-To: <87iljf72ua.fsf@gmx.de> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 16 Nov 2022 10:21:34 +0000 Message-ID: Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server To: Michael Albinus Content-Type: multipart/alternative; boundary="00000000000076e85805ed93d210" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: felician.nemeth@gmail.com, Danny Freeman , 58790@debbugs.gnu.org, stefankangas@gmail.com, dgutov@yandex.ru, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000076e85805ed93d210 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I don't want to derail de discussion, which seems interesting. I just want to make a few points: * Eglot catches `file://` URI references coming from the LSP server and converts those -- and only those -- to file names. It uses url-generic-parse for this. The function eglot--uri-to-path handles a few more quirks but is not extraordinarily complex (about 15LOC). * Eglot converts file names to URIs when it needs to tell the LSP about the files it is managing. Here, too, conversion only happens if the PATH argument is not already an URI, in which case nothing happens= . * This logic is fairly simple. Do you see anything to simplify in it, Michael? Can `url-handlers` simplify the functions `eglot--uri-to-path` and `eglot--path-to-uri`? * I didn't mention that sometimes the "file names" are actually "trampish" file names, depending on whether the M-x eglot command was invoked in file being visited remotely by the TRAMP facility. * The only thing that's outstanding in the discussion, as I follow it, is that someone suggested that Eglot **warn the user** when the LSP server communicates to us (Eglot) a URI scheme that is not known by the current Emacs session, and as such `find-file` on it will fail. * This is (or was) what Danny is asking for: A simple, robust way, for Eglo= t code to ask the current Emacs session if this URI scheme is supported downstream, and warn the user preemptively. * If there's no excellent way to do the above, I think the code shouldn't be changed. The user will eventually be confronted with the failure, and once could argue that this moment is when she should be made aware of the URI scheme that doesn't have a handler. Jo=C3=A3o On Wed, Nov 16, 2022 at 7:53 AM Michael Albinus wrote: > Danny Freeman writes: > > Hi Danny, > > >> Another approach is to simply require url-handlers in eglot.el, when i= t > >> 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 tha= t > > 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. > --=20 Jo=C3=A3o T=C3=A1vora --00000000000076e85805ed93d210 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I don't want to derail de discussion, which seems= interesting.

I just want to make a few points:

* Eglot catches `file://` URI references coming from= the LSP server
=C2=A0 and converts those -- and only those -- to= file names.=C2=A0 It uses
=C2=A0 url-generic-parse for this= .=C2=A0 The function eglot--uri-to-path handles
=C2=A0 a few more= quirks but is not extraordinarily complex (about 15LOC).

* Eglot converts file names to URIs when it needs to tell the LSP
=C2=A0 about the files it is managing.=C2=A0 Here, too, conversion= only happens
=C2=A0 if the PATH argument is not already an URI, = in which case nothing happens.

* This logic is fai= rly simple.=C2=A0 Do you see anything to simplify in it, Michael?
=C2=A0 Can `url-handlers` simplify the functions `eglot--uri-to-path` and =
=C2=A0 `eglot--path-to-uri`?
=C2=A0
=
* I didn't mention that sometimes the "file names" are a= ctually "trampish"
=C2=A0 file names, depending on = whether the M-x eglot command was invoked
=C2=A0 in file bei= ng visited remotely by the TRAMP facility.

* The o= nly thing that's outstanding in the discussion, as I follow it,
=C2=A0 is that someone suggested that Eglot **warn the user** when = the LSP
=C2=A0 server communicates to us (Eglot) a URI scheme tha= t is not known
=C2=A0 by the current Emacs session, and as such `= find-file` on it will fail.

* This is (or was) wha= t Danny is asking for: A simple, robust way, for Eglot
=C2=A0 cod= e to ask the current Emacs session if this URI scheme is supported
=C2=A0 downstream, and warn the user preemptively.=C2=A0
<= br>
* If there's no excellent way to do the above, I think th= e code shouldn't
=C2=A0 be changed.=C2=A0 The user will event= ually be confronted with the failure,
=C2=A0 and once could argue= that this moment is when she should be made
=C2=A0 aware of the = URI scheme that doesn't have a handler.

Jo=C3= =A3o




On Wed, Nov 16, = 2022 at 7:53 AM Michael Albinus <michael.albinus@gmx.de> wrote:
Danny Freeman <danny@dfreeman.email> writes:=

Hi Danny,

>> Another approach is to simply require url-handlers in eglot.el, wh= en 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-han= dlers
> package. I think we would want the user to turn on that mode themselve= s
> 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 th= at
> are outside the scope of the url-handlers package. The ones in this > particular thread are `jar` and `zipfile` URIs. I've seen other ob= scure
> 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&q= uot; 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.


--
Jo=C3=A3o T=C3=A1vora
--00000000000076e85805ed93d210-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 16 10:45:19 2022 Received: (at 58790) by debbugs.gnu.org; 16 Nov 2022 15:45:19 +0000 Received: from localhost ([127.0.0.1]:57903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovKbG-0004tB-LM for submit@debbugs.gnu.org; Wed, 16 Nov 2022 10:45:19 -0500 Received: from mout.gmx.net ([212.227.15.18]:46505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovKbB-0004II-QS for 58790@debbugs.gnu.org; Wed, 16 Nov 2022 10:45:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1668613506; bh=9J5mHM2z2QNn4ZunBqxnoVgbWpTC5G6eRjYNFtJMLto=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=M8HrZAz9CEVfHyh2WdD213PI9xdFQyk3+RloESytMcjoSLNVKCUPM/GYLBsOSifiu OZs6TzGDf54kkPyFAaSiaGM71vu3HTfml4fjcMc4Hv1spSn6+pPS1dpCPf/451RgLM FVO018vXwhWMES7XoxzM5DxOChxuDIfT8o9z/wiNJTyefvz5EsfSnb7DvqsibKObms qP1AtQms1Wcs7rMJHeGnysP4/8HUYnNmgqLeBRK1/KxrtAipi7VqevN8aM7gmUUY3V GXdpEal9CYJOQR0elYLOqcgXtaR2q4k2BrgTXq5dL6c/EMjn7kQFjMP56tAGdfczTu iOe32KElaSnVw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.6]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MS3mz-1oXWMT09YB-00TQjs; Wed, 16 Nov 2022 16:45:06 +0100 From: Michael Albinus To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Wed, 16 Nov 2022 10:21:34 +0000") References: <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> Date: Wed, 16 Nov 2022 16:45:04 +0100 Message-ID: <87a64qykcf.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:z045vpnip63UL4qPFY/66n6+OyYb5Qi1V96PbLUekPtDrcJz4ZT 9hnLMvRBvf+hzHnrISZtx34nkksCFXIb27vojZ4GF68v7a+LsiT7ve0LDPC7BSwfmURQ8Ly 0r+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yPzocd0F31VrCArQpFHkXwoWvEdHyWLZtf1KD2YqQd6/zIoE InZ2qg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: felician.nemeth@gmail.com, Danny Freeman , 58790@debbugs.gnu.org, stefankangas@gmail.com, dgutov@yandex.ru, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Jo=C3=A3o T=C3=A1vora writes: Hi Jo=C3=A3o, I must admit that I don't use eglot (except some basic tests to understand how it works), so my comments might be not accurate. > * Eglot catches `file://` URI references coming from the LSP server > and converts those -- and only those -- to file names. It uses=20 > url-generic-parse for this. The function eglot--uri-to-path handles > a few more quirks but is not extraordinarily complex (about 15LOC). > > * Eglot converts file names to URIs when it needs to tell the LSP > about the files it is managing. Here, too, conversion only happens > if the PATH argument is not already an URI, in which case nothing > happens. > > * This logic is fairly simple. Do you see anything to simplify in it, > Michael? Both seem to be OK, although I'm not sure that it is the right approach in eglot--path-to-uri just to concat "file://" and the file-local-name part of a remote file name. > Can `url-handlers` simplify the functions `eglot--uri-to-path` and=20 > `eglot--path-to-uri`? url-handlers do not convert between the different syntaxes. It is just a package to implement a file name handler for URIs. > * I didn't mention that sometimes the "file names" are actually > "trampish" > file names, depending on whether the M-x eglot command was invoked=20 > in file being visited remotely by the TRAMP facility. > > * The only thing that's outstanding in the discussion, as I follow it, > is that someone suggested that Eglot **warn the user** when the LSP > server communicates to us (Eglot) a URI scheme that is not known > by the current Emacs session, and as such `find-file` on it will > fail. Yes, I understand it. But I don't understand why it is needed: if a URI scheme is not supported, there will be an error, visible to the user. No need to apply a check before, I believe. But I haven't read the whole bug report, so I don't know why this check is in place. > * This is (or was) what Danny is asking for: A simple, robust way, for > Eglot > code to ask the current Emacs session if this URI scheme is > supported > downstream, and warn the user preemptively.=20=20 > > * If there's no excellent way to do the above, I think the code > shouldn't > be changed. The user will eventually be confronted with the > failure, > and once could argue that this moment is when she should be made > aware of the URI scheme that doesn't have a handler. Hmm, yes. All what I have commented about is the fact, that other schemes but file:// could be handled by url-handlers. And if there is a scheme not supported yet, it could be added. It would be great if I could see a real use case of a URI not starting with the file:// scheme. In that case I could try to debug and understand what happens. Do you (or Danny) have a recipe I could follow? > Jo=C3=A3o Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 16 11:20:58 2022 Received: (at 58790) by debbugs.gnu.org; 16 Nov 2022 16:20:58 +0000 Received: from localhost ([127.0.0.1]:57924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovL9k-00075L-C4 for submit@debbugs.gnu.org; Wed, 16 Nov 2022 11:20:58 -0500 Received: from mail-oa1-f53.google.com ([209.85.160.53]:37782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovL9T-00074p-Eb for 58790@debbugs.gnu.org; Wed, 16 Nov 2022 11:20:54 -0500 Received: by mail-oa1-f53.google.com with SMTP id 586e51a60fabf-12c8312131fso20630094fac.4 for <58790@debbugs.gnu.org>; Wed, 16 Nov 2022 08:20:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=om8k5NhwdWuxTU7JfDB6LTpZowPvUIL3xJmJGyAdN2U=; b=e512GMxCX0B2gd4gNDEsU8ohOCb6xVeazD2/Wqaj7hDFXzt/ZZmcjSBEsbBr/lpkLM V35mj2g7p0emlHbLqSZrj5N5M+no5YrWfGEgiLw9ney74FuU6SWrBptYi5hE0TcBam2u Ti5/g/eWK9GDgrVO1VmhiZFKu1M/cKjFTd9yEPfSe9JdBWKLsfFqKzv4Iqutq62y/Qje wCc/MuVX5qwLLzWVtxDEJqhEGzLS19a3NAVZwH9XKmD2/oHbxxg59Qs6zVF4jE/SjsUI XzkcnctyW2lJng3V/cWrvtZ432FZl1txTYd0346L5Sy0T2XSsv6QZ/rZPWag6OV+sriC jpGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=om8k5NhwdWuxTU7JfDB6LTpZowPvUIL3xJmJGyAdN2U=; b=fPkHlqSg+TVHs0plw+1BDK2GipuEPXXUnX34mfSxqQ8WpC4bTPbY/ShQG9NzCitWA4 sbq23i7cFE7T8QsG09HsZ6cunF3uqS2feTNOUKxzxSFBxXFE81SbaX946JG5HbowLd0H gDSvtYAiWYuQwX/gIJb4Vhanaq/B2bKOfc696CgcP0jSXIYV+drABUjg9mlhaatHqWdw Q5TstFClyLrp3A6oXi/xW+bGHGSsaqQ6psr8DEsrIAgIqe008Lx/VJgt+DUm5DylW+89 GwrZS6dinc7DiRrgoKIADTYGFpapGDEB+QBta927OZC6xxN+Id7uncVTF2N2Qdgi2jKT iiiw== X-Gm-Message-State: ANoB5plcfd1neJvM5XCWBND8qOBQVIin5WV9tarVOG03rKeu1g46x4Ng YYpg5KU4+p0wHqJ28jZBnCV1nyxFiKwVJm3QRjQ= X-Google-Smtp-Source: AA0mqf7NRErRXNrFweuNdRxyRUR/LTLh5nbksf02nWIRT6dmKm00HaQ5eugC2LMn3KAd+6zXtP1BvY3eruTFJ/J2XaE= X-Received: by 2002:a05:6870:6688:b0:13b:5ffe:ff70 with SMTP id ge8-20020a056870668800b0013b5ffeff70mr2084343oab.171.1668615633646; Wed, 16 Nov 2022 08:20:33 -0800 (PST) MIME-Version: 1.0 References: <87r0yrwfn3.fsf@gmail.com> <37716e41-5955-99f6-5204-e760a716fbf6@yandex.ru> <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> In-Reply-To: <87a64qykcf.fsf@gmx.de> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 16 Nov 2022 16:20:20 +0000 Message-ID: Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server To: Michael Albinus Content-Type: multipart/alternative; boundary="0000000000001c3cc005ed98daa4" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: Felician Nemeth , Danny Freeman , 58790@debbugs.gnu.org, Stefan Kangas , Dmitry Gutov , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000001c3cc005ed98daa4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 16, 2022, 15:45 Michael Albinus wrote: > Jo=C3=A3o T=C3=A1vora writes: > > > Both seem to be OK, although I'm not sure that it is the right approach > in eglot--path-to-uri just to concat "file://" and the file-local-name > part of a remote file name. > Can you describe a case where this would be problematic? Remember that, from the point of view of the server, the file is always local. That's regardless of whether eglot invoked the server remotely or locally. Yes, I understand it. But I don't understand why it is needed: if a URI > scheme is not supported, there will be an error, visible to the user. No > need to apply a check before, I believe. > I think you're right. Let's not do this patch It's not Eglot's responsibility, or at least there's nothing Eglot can reasonably do about the problem that a later system can't, except maybe informing that it was the LSP server who is the source of the unknown URL scheme. I'm not sure it is worth the trouble, but let others speak their mind. But I haven't read the whole bug report, so I don't know why this check > is in place. > It's not in place, we were discussing it. Do you (or Danny) have a recipe I could follow? > Danny would, probably, but the recipe would involve a particular LSP server and clojure toolchain, i think. --0000000000001c3cc005ed98daa4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Nov 16, 2022, 15:45 Michael Albinus <michael.albinus@gmx.de> wrote:
=
Jo=C3=A3o T=C3=A1vora <joaotavora@gmail= .com> writes:


Both seem to be OK, although I'm not sure that it is the right approach=
in eglot--path-to-uri just to concat "file://" and the file-local= -name
part of a remote file name.
<= br>
Can you describe a case where this would be prob= lematic? Remember that, from the point of view of the server, the file is a= lways local. That's regardless of whether eglot invoked the server remo= tely or locally.

Yes, I understand it. Bu= t I don't understand why it is needed: if a URI
scheme is not supported, there will be an error, visible to the user. No need to apply a check before, I believe.

I think you're right. Let's= not do this patch
=C2=A0It's not Eglot's re= sponsibility, or at least there's nothing Eglot can reasonably do about= the problem that a later system can't, except maybe informing that it = was the LSP server who is the source of the unknown URL scheme. I'm not= sure it is worth the trouble, but let others speak their mind.

But I haven't read the whole bug report, so I do= n't know why this check
is in place.

It's not in place, we were discussing it.

Do you (or Danny) have a recipe I could follow?

Danny would= , probably, but the recipe would involve a particular LSP server and clojur= e toolchain, i think.
--0000000000001c3cc005ed98daa4-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 16 18:09:48 2022 Received: (at 58790) by debbugs.gnu.org; 16 Nov 2022 23:09:48 +0000 Received: from localhost ([127.0.0.1]:58448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovRXP-00051C-Sv for submit@debbugs.gnu.org; Wed, 16 Nov 2022 18:09:48 -0500 Received: from out0.migadu.com ([94.23.1.103]:36692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovRXM-00050z-1H for 58790@debbugs.gnu.org; Wed, 16 Nov 2022 18:09:46 -0500 References: <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668640182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UjB944UWSoriAEldP2RoiSsM4GRFsW0uX44EweJyLwk=; b=SUJ3EHMqahnt+b4OcW1zYMjHtd2HsXBJ4jcwi51Ypays9NWXp9logmgEUJyO53F85JAS2f +TZy3rG4UrzDpznRgoxDqCQ3a3E0trtuNeIrMQxIGjfhKQkxnqoSryeyIaa+ZYZ6t8cjU6 JANbH1otewTy1cfu2a3kqLn9Mh5H1QE= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Wed, 16 Nov 2022 17:59:08 -0500 In-reply-to: Message-ID: <87v8nejy32.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: Felician Nemeth , 58790@debbugs.gnu.org, Michael Albinus , Stefan Kangas , Dmitry Gutov , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Jo=C3=A3o T=C3=A1vora writes: Michael writes: > 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. I think this could be a nice thing to include in emacs itself. I have already implemented this funcitonality in a package on elpa: https://elpa.gnu.org/packages/jarchive.html if you want to look.=20 Jo=C3=A3o writes: > I think you're right. Let's not do this patch > It's not Eglot's responsibility, or at least there's nothing Eglot can re= asonably do about the problem that a later system > can't, except maybe informing that it was the LSP server who is the sourc= e of the unknown URL scheme. I'm not sure it > is worth the trouble, but let others speak their mind. This seems reasonable to me. > > Do you (or Danny) have a recipe I could follow? > Danny would, probably, but the recipe would involve a particular LSP serv= er and clojure toolchain, i think. Indeed I do :) >From emacs master branch. The only extra package that needs to be installed is clojure-mode. I have a repository here that should be cloned https://git.sr.ht/~dannyfreeman/eglot-xref-to-jar-repo It contains a nixos shell to install everything automatically if you use that kind of thing. If not, you need to have a recent version of openjdk installed, anything over version 11 will do.=20=20 The clojure command line tool needs to be installed: https://clojure.org/guides/install_clojure (it's also in most linux distro package managers) Clojure-lsp needs to be installed: https://clojure-lsp.io/installation/ Even if you use the nixos shell, this following step is required: Running the `clojure -Stree` command in that git repo to install clojure dependencies. >From there, opening the repository in emacs to this line: https://git.sr.ht/~dannyfreeman/eglot-xref-to-jar-repo/tree/main/item/src/u= ser.clj#L4 Running `M-x eglot` Then `M-x xref-find-definitions` over the symbol `inc` should reproduce the error. I have not found any other lsp servers that do this kind of thing, besides a java one that has even more problems than clojure-lsp. So apologies for the complicated recipe. --=20 Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 09:30:37 2022 Received: (at 58790) by debbugs.gnu.org; 22 Nov 2022 14:30:37 +0000 Received: from localhost ([127.0.0.1]:50305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxUIG-0002G9-LW for submit@debbugs.gnu.org; Tue, 22 Nov 2022 09:30:36 -0500 Received: from mout.gmx.net ([212.227.17.20]:58957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxUID-0002Fu-C8 for 58790@debbugs.gnu.org; Tue, 22 Nov 2022 09:30:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1669127426; bh=sV7ICxuIHS+mMyBx9wE43mbcVYZ1ET1rYoZBZAB8K5Y=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=Z9OQsMMiHi2douvzpW2rltVzdPVG1WWG+vMj/8cqWOWVtYIapeywRiqDnRtHD4osc RIhZEkvqiOwas5r5smduuLt2Iz1EI1npwxKDbZo1nVOCQWgp3LQCvOowPUAfnGg3ej cSYTmmqwYjULoJyoTziMIX9ZiBy5BineBGAxNFiAcFZwPii83WxkyigozK2f5QWL5h yWaslfQgZPK8YsDMGz3ApIQYVxacivvIhPdFY76WKI4ZNV4dCzvBNJztHPJZYkehC7 dGu8ctLfEnizLGS0tC4Z10xzF1OHhuF0cqjBD0WhWiL4QPJpY2ayiZ+UuEXBGBaJkU Q1OsW+okRXopw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.6]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N17UQ-1p4SZE0EuY-012YwC; Tue, 22 Nov 2022 15:30:26 +0100 From: Michael Albinus To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Wed, 16 Nov 2022 16:20:20 +0000") References: <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> Date: Tue, 22 Nov 2022 15:30:24 +0100 Message-ID: <8735ab12pr.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:l4Gz0HFyLYM4sYjkSW8UTsMabyw9HM8EItaj4FDpQoGG2MiRlye ccjKwJqy14nELzbEA9bhh+Z+g+IpsTpONs4YqFo7vI904cp1I9nu/DCO+k1zAtHP5zRF74j 4+EYUFjuBaHRbAS1lDfhgNjlzMI4aM6PeMTfTPam1IszRWZ8sp3ci31PizkpJHBi0uVvO+W GWGPkzADYjpfhMpdMv4QQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:4MxvWJnmDGg=;JITDWY6pR92o3w2TXflonLqu2l6 L6qyguIqd1VlSc6RywerDUN5i7hAOb+34oaaIDD4PNp1by2gcalDu0WYOnIiU52ZJHmg8YIR1 N+Mc1YoUH0ghI3k8S0opendi9czAkJl7drzshA67uP+hOTRudDP/rRk/O64dL4C0s5zbAdSWX PgG5MR4r7i1H0H1JX0re13tDHzFDycPGIRYtMEBFIVR4m50o0sfKlSCkRWOMqxop6sSAcpzoz Ixpocd9WfsAtIQGHz/C7yg9Hg71q280e2ZWaTGgXg3NGzZP9YBROXR3SkLNrkrFqhcr+NFEjN /QGnd1zNjJaKNyyIOLhW3RNjE7iPcEssvrcACOu6unIdrFxfpJeH30p/Z2GMZLaUTj6bPc0TV xGnrwm+AXj2t+UkS3Ya7MKqUw1WAfiQXL/OzshGO27nUV5neKJJAi3hsFXPKClklW32PFFIeW ceBAQ2Xr0sEdGml8G/9Uu0tircmC+6ep4nYy4im5UhUAWfp7NgpwIZBPaIkdPly+RtnBuyx9+ zCi6WsxUBB17wJMUvBb1XFsfpGpreKB5jzGHX9qq/87cySsiQTpLCGDujG1hCdispqs9CSvzr pykAEfdUHUjV6cQILxWltlapW9YG1Ex8pYfw7tQcFjj73yoxshwNlKdb3o0pBn7ihRnMaDGj5 yDYl8PQ47tnvDRw8oN3h9jmtN4RS3GG7OiTWJAHxJ7mFGD930VCKWWApW1Vy9YPmHES9jldrW 4/ng3U+A8aiTvOT+6raQP7iUEyBdm0N54o0RBiPeYp2bEKTJYsS0isnegI39BKlNWWlwv2fKz 504xtXukCWZx3ozqYbXTbg9xsaoCth6Sol63PlIuY3KnYkVWDB4wfW0CLcxjtgj0Yi0fkkNGR VlS1QSaYuSTTSod6T9Apj8sk0bOtgIzgRQF3FtYOmzDY6nM0ca/+rmIuWf8rzr81IzV34JO6S cEPGXg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: Felician Nemeth , Danny Freeman , 58790@debbugs.gnu.org, Stefan Kangas , Dmitry Gutov , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Jo=C3=A3o T=C3=A1vora writes: Hi Jo=C3=A3o, > Both seem to be OK, although I'm not sure that it is the right > approach in eglot--path-to-uri just to concat "file://" and the > file-local-name part of a remote file name. > > Can you describe a case where this would be problematic? Remember > that, from the point of view of the server, the file is always local. > That's regardless of whether eglot invoked the server remotely or > locally. Got it. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 06:55:14 2022 Received: (at 58790) by debbugs.gnu.org; 23 Nov 2022 11:55:14 +0000 Received: from localhost ([127.0.0.1]:54018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxoLR-0000kU-NT for submit@debbugs.gnu.org; Wed, 23 Nov 2022 06:55:14 -0500 Received: from mail-wm1-f42.google.com ([209.85.128.42]:53814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxoLN-0000kA-S7 for 58790@debbugs.gnu.org; Wed, 23 Nov 2022 06:55:13 -0500 Received: by mail-wm1-f42.google.com with SMTP id p16so12883540wmc.3 for <58790@debbugs.gnu.org>; Wed, 23 Nov 2022 03:55:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=mv7dv6RZYohUWenb5v5WTAe2YQAh7DlGRdz66yIqD+s=; b=PpJNr9eiwv5f7+J6HZaeIvT2FVj6BX38mu+A9AYuembRVEUiP3T26LpNoBMOAnCyBh 5TR58iifE5JQBKzgQKotqehOiAwD0e1vmPY9XCEqblBNN/H3VXRAs91ir/Cza9522a5Y E1UVOb3l6lT0OzdtZoh0dp4wIZ8jNY5vVRoPYjHd5KFlfrqpmq5/3tzdE8kz4xqC8H9U rB5gLsJ68cKFWIhBqV43OmsXhHCd4EX50uQiXLJB9RFZFSMrsnU+NOViBEaGTqoMf7zR AIpzOIT69RSRvxPmQrWy02QoNiIApRa6qStiXHRT9hi65ALcujAp/QSG5GCi8BRkb3FJ 4VGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=mv7dv6RZYohUWenb5v5WTAe2YQAh7DlGRdz66yIqD+s=; b=MIbP2Dv8Ybe6QC/6yKri2+2GnqrtYuNDn1QplkgEJT+VycBGmdacfI1QLaxjGvtK8j OBVvXxOdi82GkodEDO3UWJY7pKtVwER5P3BmVVVvmNGJhb8+DEaqHoeW59nF3aKal7B0 sJQxuot3BIHKYgXDrxSzICCzPPR15mRzLslu1FZoSOfNWnt2oh2us3wZYPQ/41H9jk+v E/JmTLwBZ+KJiNlhF1BuL0FapED6nsQqmtJ/QhblEgUIWeAdpWhoqtopteEvgRIhKNLH teWZiLeY7yGep4n/rSmi8qUzMrrK0OXy7UoiY/+ULBs/t7Scv0fCzP1offPAeUXuTnsF 1qkg== X-Gm-Message-State: ANoB5pmzeUewxFT7ECTB1FXEpg4KzyAkYMk/1Hfyp/RqsQ68USr73Dhw p3xXgjuqA2R3YVcXFDAmTcQ= X-Google-Smtp-Source: AA0mqf4IZcunU0D+EGhnCCzT5BDdrDBewnBhx7gw5MYmY7GA0O5Qfx0cYsIcaMfxF/iInDZSVppfEQ== X-Received: by 2002:a1c:2743:0:b0:3c6:e471:7400 with SMTP id n64-20020a1c2743000000b003c6e4717400mr6213845wmn.98.1669204503747; Wed, 23 Nov 2022 03:55:03 -0800 (PST) Received: from [192.168.1.101] (dsl-multi-static-81-140-129-201.in-addr.broadbandscope.com. [81.140.129.201]) by smtp.gmail.com with ESMTPSA id b13-20020a5d45cd000000b002258235bda3sm16389326wrs.61.2022.11.23.03.55.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Nov 2022 03:55:03 -0800 (PST) Message-ID: <720bcf72-e944-4978-982f-4b6fa8b31e5c@gmail.com> Date: Wed, 23 Nov 2022 11:55:00 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server To: Danny Freeman References: <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <8735ab12pr.fsf@gmx.de> From: Richard Copley In-Reply-To: <8735ab12pr.fsf@gmx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: Felician Nemeth , 58790@debbugs.gnu.org, Michael Albinus , Stefan Kangas , Dmitry Gutov , Eli Zaretskii , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 22/11/2022 14:30, Michael Albinus wrote: > João Távora writes: > > Hi João, > >> Both seem to be OK, although I'm not sure that it is the right >> approach in eglot--path-to-uri just to concat "file://" and the >> file-local-name part of a remote file name. >> >> Can you describe a case where this would be problematic? Remember >> that, from the point of view of the server, the file is always local. >> That's regardless of whether eglot invoked the server remotely or >> locally. > > Got it. > > Best regards, Michael. Hi All, For file names with a Windows drive letter and forward slashes (as emitted by CMAKE_EXPORT_COMPILE_COMMANDS), the drive letter is misinterpreted as a URL type, leading to repeated errors, "clangd only supports 'file' URI scheme for workspace files". (let ((path "c:/projects/awesome-project/source/main.cpp")) (message "type %s, url %s" (url-type (url-generic-parse-url path)) (eglot--path-to-uri path))) ;; => "type c, url c:/projects/awesome-project/source/main.cpp" From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 07:35:40 2022 Received: (at 58790) by debbugs.gnu.org; 23 Nov 2022 12:35:40 +0000 Received: from localhost ([127.0.0.1]:54066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxoya-0003zk-7i for submit@debbugs.gnu.org; Wed, 23 Nov 2022 07:35:40 -0500 Received: from mail-oa1-f53.google.com ([209.85.160.53]:38458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxoyX-0003zW-KS for 58790@debbugs.gnu.org; Wed, 23 Nov 2022 07:35:38 -0500 Received: by mail-oa1-f53.google.com with SMTP id 586e51a60fabf-1322d768ba7so20641903fac.5 for <58790@debbugs.gnu.org>; Wed, 23 Nov 2022 04:35:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zm6MkHn4jX0Kcq4LA3F/phom6Rm8+lWjn9VcsEjFOxY=; b=f0R2/kRCBBBsldNvKrPYncirvp1GSYCGH+05zo1IFYcdE234pWBtgfWuD+CFgtMggc efcvCEUN3bfhBkq9ACXrZZ54KkczcYoPqF1FgjoLVP6tmmeOGraaAVxuMgD/HJwsmkAH AidVTkyIj8ZW2ruJs4uYVRrnQ0WTlAskBokD0be8Vwif9Iw7yLPJ8blA0PMGDIdOqdJJ 6GiKpl4YBY8TeffZyPY4PA0Cqfq7ImS3tYecrUAQcTz8eqMq+K10Fqc4EsYdyZPeq64q B2Sm1uiz6VVhW8b0XroLyJcRZCPFHAMdprah/Z2fKxzC2f276SxOdXKLCiwJwKL77IbV QzPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zm6MkHn4jX0Kcq4LA3F/phom6Rm8+lWjn9VcsEjFOxY=; b=PqI+uMT6BQE7uGEkwTPE/QwcXABkfy7RLq7D8xO/oPv4ta1xqfzGQRAY+i8R8T/sna zBlnCKZq9FbKg/OKe84W7hceo++xSjujfEQzMAu84TTgiIRC/uZaVxxctbg6KAD6LKUG QaejATsGf1Qtao1dJPONXchQ5rfJ6IjfI587PPQArNQ1Zfae+3U9TaUYEGpa97RVnIhb YyqSG3sREjDcHplmg1gt+MShatt1yjBseA9F57CJSthTOcDS42SMVb6Wao8VNfNZVbvI CGx/RPnW4F8DTnVgs5LXGOXz2PduagsFJLzcCj0Vdde2PIrstn2cek+KUWPX6hl57aZ6 RTpw== X-Gm-Message-State: ANoB5pnAAzYVNDsWwJOZMWw6YRErB+OwyqqQIJF1v46kDOqqmNVMgMuH tAYWpKDZp6D42G1DZOtdSrZupToP30Gt70gfnU4= X-Google-Smtp-Source: AA0mqf6VkL2HWOKC063ykacCe8NDOU2fZ3/edildJKszxJulQ9fkmBFt3rAaBt80/N1KknAfLVM4IfFzGn7lYx50lSU= X-Received: by 2002:a05:6871:4590:b0:132:a103:ae22 with SMTP id nl16-20020a056871459000b00132a103ae22mr15758602oab.215.1669206931791; Wed, 23 Nov 2022 04:35:31 -0800 (PST) MIME-Version: 1.0 References: <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <8735ab12pr.fsf@gmx.de> <720bcf72-e944-4978-982f-4b6fa8b31e5c@gmail.com> In-Reply-To: <720bcf72-e944-4978-982f-4b6fa8b31e5c@gmail.com> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 23 Nov 2022 12:36:37 +0000 Message-ID: Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server To: Richard Copley Content-Type: multipart/alternative; boundary="00000000000039e59105ee228682" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: Felician Nemeth , Danny Freeman , 58790@debbugs.gnu.org, Michael Albinus , Stefan Kangas , Dmitry Gutov , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000039e59105ee228682 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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? Jo=C3=A3o On Wed, Nov 23, 2022 at 11:55 AM Richard Copley wrote: > On 22/11/2022 14:30, Michael Albinus wrote: > > Jo=C3=A3o T=C3=A1vora writes: > > > > Hi Jo=C3=A3o, > > > >> Both seem to be OK, although I'm not sure that it is the right > >> approach in eglot--path-to-uri just to concat "file://" and the > >> file-local-name part of a remote file name. > >> > >> Can you describe a case where this would be problematic? Remember > >> that, from the point of view of the server, the file is always local. > >> That's regardless of whether eglot invoked the server remotely or > >> locally. > > > > Got it. > > > > Best regards, Michael. > > Hi All, > > For file names with a Windows drive letter and forward slashes (as > emitted by CMAKE_EXPORT_COMPILE_COMMANDS), the drive letter is > misinterpreted as a URL type, leading to repeated errors, > "clangd only supports 'file' URI scheme for workspace files". > > > (let ((path "c:/projects/awesome-project/source/main.cpp")) > (message "type %s, url %s" > (url-type (url-generic-parse-url path)) > (eglot--path-to-uri path))) > > ;; =3D> "type c, url c:/projects/awesome-project/source/main.cpp" > > --=20 Jo=C3=A3o T=C3=A1vora --00000000000039e59105ee228682 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Yes,I think I follow.=C2=A0 To be clea= r I think the problem is somewhere in

(defun = eglot--path-to-uri (path)
=C2=A0 "URIfy PATH."
=C2=A0 (let = ((truepath (file-truename path)))
=C2=A0 =C2=A0 (if (url-type (url-gener= ic-parse-url truepath))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; Path is already a= URI, so forward it to the LSP server
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; unt= ouched.=C2=A0 The server should be able to handle it, since
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 ;; it provided this URI to clients in the first place.=C2=A0 =C2=A0 =C2=A0 =C2=A0 truepath
=C2=A0 =C2=A0 =C2=A0 ...)

So either url-generic-parse-url and url-type is fixed in u= rl-parse.el, or
we must add some Windows-specific guards in = eglot.el.=C2=A0 Or likely
both, since url-parse.el is not a :core= ELPA package.

Richard/Danny, can you perhaps come= up with some patch?

Jo=C3=A3o

=
On Wed, No= v 23, 2022 at 11:55 AM Richard Copley <rcopley@gmail.com> wrote:
On 22/11/2022 14:30, Michael Albinus= wrote:
> Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com> writes:
>
> Hi Jo=C3=A3o,
>
>>=C2=A0 =C2=A0 =C2=A0 Both seem to be OK, although I'm not sure = that it is the right
>>=C2=A0 =C2=A0 =C2=A0 approach in eglot--path-to-uri just to concat = "file://" and the
>>=C2=A0 =C2=A0 =C2=A0 file-local-name part of a remote file name. >>
>> Can you describe a case where this would be problematic? Remember<= br> >> that, from the point of view of the server, the file is always loc= al.
>> That's regardless of whether eglot invoked the server remotely= or
>> locally.
>
> Got it.
>
> Best regards, Michael.

Hi All,

For file names with a Windows drive letter and forward slashes (as
emitted by CMAKE_EXPORT_COMPILE_COMMANDS), the drive letter is
misinterpreted as a URL type, leading to repeated errors,
=C2=A0 =C2=A0"clangd only supports 'file' URI scheme for works= pace files".


(let ((path "c:/projects/awesome-project/source/main.cpp"))
=C2=A0 =C2=A0(message "type %s, url %s"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (url-type (url-generic-parse-url = path))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (eglot--path-to-uri path)))

;; =3D> "type c, url c:/projects/awesome-project/source/main.cpp&qu= ot;



--
Jo=C3=A3o = T=C3=A1vora
--00000000000039e59105ee228682-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 07:43:34 2022 Received: (at 58790) by debbugs.gnu.org; 23 Nov 2022 12:43:34 +0000 Received: from localhost ([127.0.0.1]:54076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxp6E-0004Bg-Go for submit@debbugs.gnu.org; Wed, 23 Nov 2022 07:43:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxp6A-0004BQ-M6 for 58790@debbugs.gnu.org; Wed, 23 Nov 2022 07:43:33 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxp64-0008Bk-BR; Wed, 23 Nov 2022 07:43:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=EiCT0u3OEsaYOFLOofn6eISvd+T3PqALNHs2GzTJz8E=; b=bCE18K6UnbNeidVgq9B5 4UlYkIlAfQJ3NC7beE2JgxypMYjplvrcQL4zOCCsB3fkDGLlP8dvIeRZmtZhVNGghj8ycrp9u4k+x 7vAjLD1tKGZr00TVtG/wkanzFv2yv3wpEcGBfHb6o2B2ItS9H+jkTlkRoQWCLU+Pqiu21jDrA9WZm 5t0ugdbm5Y8rUAr99robAhKlGo95E/8Qxjg0v0CG820Yh481l/9ScDktDO5ALHVB/TzjIKfze8asT SbGexTzfuqaEmYEnPfmFaeqo4JpsNgHBEuJ74bjVKS6ee+uKp0LtrvyUtiEkh1RTHNS3Cmie0K6Bd twAxl0V1CJaUYg==; Received: from p5b326552.dip0.t-ipconnect.de ([91.50.101.82] helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxp63-0000Gz-Ru; Wed, 23 Nov 2022 07:43:24 -0500 From: Arash Esbati To: =?iso-8859-1?Q?Jo=E3o_T=E1vora?= Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: (=?iso-8859-1?Q?=22Jo=E3o_T=E1vora=22's?= message of "Wed, 23 Nov 2022 12:36:37 +0000") References: <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <8735ab12pr.fsf@gmx.de> <720bcf72-e944-4978-982f-4b6fa8b31e5c@gmail.com> Date: Wed, 23 Nov 2022 13:42:56 +0100 Message-ID: <86o7sxg7u7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58790 Cc: Felician Nemeth , Danny Freeman , 58790@debbugs.gnu.org, Richard Copley , Michael Albinus , Stefan Kangas , Dmitry Gutov , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Jo=E3o T=E1vora writes: > Yes,I think I follow. To be clear I think the problem is somewhere in=20 > > (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= =20 > 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? Have a look at bug#59338: Danny came up with a patch for eglot.el. https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-11/msg01510.html Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 07:49:53 2022 Received: (at 58790) by debbugs.gnu.org; 23 Nov 2022 12:49:53 +0000 Received: from localhost ([127.0.0.1]:54088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxpCL-0004OG-1r for submit@debbugs.gnu.org; Wed, 23 Nov 2022 07:49:53 -0500 Received: from mail-lj1-f175.google.com ([209.85.208.175]:36783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxpCI-0004O0-Rm for 58790@debbugs.gnu.org; Wed, 23 Nov 2022 07:49:51 -0500 Received: by mail-lj1-f175.google.com with SMTP id u2so21274649ljl.3 for <58790@debbugs.gnu.org>; Wed, 23 Nov 2022 04:49:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=evWI5iz4XvYfdxdGXWQogFnWFc0QNFU6YodOO/mDZoo=; b=nq0FtdcRZfX+k2wvI/ox3fTLXg8gmzMnNjtLCDJNkYktdPBA/S0Tf8tTXNiGX4N46u SmmQeRDoet6GQYGleYzdZG07fnv4qFh8I5EB7CryyqvUjiNe+HEEIZYkEHhmypqG50Tq lkdjPFrB2j/V5Gr/uTkVFXK4gvKB9vIK5YaWZIvMKuRKIYgvt/Uzw22oJAdnEbaZA0Sp izdStGQv/bdB/3mH7LlLNOI57xhxyEmBIWyQAh4rhgvVT5sEqUf+8WwhAv7wX3wJgv8b W4p3WNd2J0KcQ3CwowoBDthWAZTw5BseVXl9L1xA0pJ4sEMRCXR9i94NoT3zbLh87EiW i5iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=evWI5iz4XvYfdxdGXWQogFnWFc0QNFU6YodOO/mDZoo=; b=54rioLMW/wR1DDdpUuuzLjTGqHCncD20Lj3RuiMjBuweMcVsSVxEHfoxww5H95wrO5 GgPPO94Yf791I9W7s+cOUvRaftyDmKYFqYWfysnPV7aS6tdOx0ioWd0L2q0baOn650Vb R0PMiNOpqCmD9YpZE4ugbSooKNKIRP1M/hdOskudyDYUslwUUGbcUK/xT5GPli/R88gM OnwfWDh84JvZ83iatKXPjrvdT/Wx9kqfS/uQIFZASz3sTbuLFGEGwWLUkMjDl7PCtW1E V+YFlxeE/i25m8P6qpL1wQVB5/Zj1j+USiZsn8CLrLQz9hHcqbbL2NOL6MpbwhqdHohz gcEQ== X-Gm-Message-State: ANoB5pkP5T8SSA79joz00y0TXNbiSdogAb8FFLcX/BOBMn28GNEVAXFg UgFD9x7Uxnzm+dTL/3zkuiMTyn7QvV4LJBf+4jA= X-Google-Smtp-Source: AA0mqf4WrMPXHepmHKFzDEV1NuF8Nw+TEaXHn+LqEpG2rWGN+Y/LNYPPWkSWnWr5zqDvEFLrLJCTRJ6tv3WvLkIHHLc= X-Received: by 2002:a2e:2a41:0:b0:277:77a:b53b with SMTP id q62-20020a2e2a41000000b00277077ab53bmr8937192ljq.59.1669207784732; Wed, 23 Nov 2022 04:49:44 -0800 (PST) MIME-Version: 1.0 References: <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <8735ab12pr.fsf@gmx.de> <720bcf72-e944-4978-982f-4b6fa8b31e5c@gmail.com> <86o7sxg7u7.fsf@gnu.org> In-Reply-To: <86o7sxg7u7.fsf@gnu.org> From: Richard Copley Date: Wed, 23 Nov 2022 12:49:17 +0000 Message-ID: Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server To: Arash Esbati Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: Felician Nemeth , Danny Freeman , 58790@debbugs.gnu.org, Michael Albinus , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Dmitry Gutov , Eli Zaretskii , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, 23 Nov 2022 at 12:43, Arash Esbati wrote: > > Jo=C3=A3o T=C3=A1vora writes: > > > 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 > > ...) Thanks, yes. > > 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. I don't think "url-generic-parse-url" needs any fix. It is for parsing a UR= L, not deciding if something is a URL. > Have a look at bug#59338: Danny came up with a patch for eglot.el. > > https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-11/msg01510.html > > Best, Arash Excellent. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 07:53:13 2022 Received: (at 58790) by debbugs.gnu.org; 23 Nov 2022 12:53:13 +0000 Received: from localhost ([127.0.0.1]:54111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxpFY-0004Uv-Pw for submit@debbugs.gnu.org; Wed, 23 Nov 2022 07:53:13 -0500 Received: from mail-ot1-f41.google.com ([209.85.210.41]:42666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxpFW-0004UU-BI for 58790@debbugs.gnu.org; Wed, 23 Nov 2022 07:53:12 -0500 Received: by mail-ot1-f41.google.com with SMTP id a13-20020a9d6e8d000000b00668d65fc44fso11132662otr.9 for <58790@debbugs.gnu.org>; Wed, 23 Nov 2022 04:53:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=o1Lk7MA+D6b045u6SiQ26BrYMW3aKrKa1MlcOzOpDNU=; b=g1U4z11wrMChui5kY1u3HeAA93Xsk0Tgmx/o3fyTOEzd5YQ+/GKu9qavHhuqI8tHFS 8TSmo2p3/NvfJZqq+ykmPcA+SJar2303kwhuk/Ri1/RxNFL7f2WalvDBOMmT37oos1hJ p1i2SmjD9QTVT9kmjm6CIpx/FOpm1LpV4jv0/NjsWv7Dn9oPA3mo3Hug7HSMPx7/jMvA g1peovx/MVpeZUEIOtgYPMROxvpKTrF1HBeVIUyaAFP7ijkJU7BdZteOQ/Yi+QJ+xkYE F+A7b6Hag5EvZW8h0w+a1P4K/oNAG4mZ3XZDJviHAV9zOCRCuGQfhiq/MXS0yodYZxN6 B2fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=o1Lk7MA+D6b045u6SiQ26BrYMW3aKrKa1MlcOzOpDNU=; b=NsdAXYMCLiuunORSL+RJHQi/G77CAGZBpRWYDezTApeSto597u3U4qJ3sfHbXn0Qen cc0mgc7QCmSWiWxAyZk7bgeuMwBZQlrBEI5qF7gAFxBoX3FAp3fjc8f4LUEw9FR+Wm5b k9Es8+fCwftYfZi1erOh8Ueac3PwIXoff640KdVXQcuSmdkj4oJ5OlFEya1dJImNrXPO dzmpnLpkhA3PzFVZVQaBYuXONnQuFd5f7v2MXinqrV50KcnA079dSlk/Mzrksv5muIKL f1qLDaxyRYROovoQW1cNEb60jcayJNSX/UKBCbkpIOQmMxu/tbY/jrGG614zb18h0/kY zgpg== X-Gm-Message-State: ANoB5pmh7vqms0yIJc0t74R7ZleLWuStsCYrEHbzNd23BYEbHtioXhGw 9YXaj7GRndL1wWTMBCaWjsNV+ZWSUS7GiECP01U= X-Google-Smtp-Source: AA0mqf7iflDXZ2SQDgnuT4hrOtI/YBUV4MybKtqW3RtQn7bsICaqw7k2BH1ci3E4R7K7Y97yIdI98QF1FX/fq04qo44= X-Received: by 2002:a9d:4f07:0:b0:66c:64d6:1bb4 with SMTP id d7-20020a9d4f07000000b0066c64d61bb4mr14268122otl.201.1669207984847; Wed, 23 Nov 2022 04:53:04 -0800 (PST) MIME-Version: 1.0 References: <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <8735ab12pr.fsf@gmx.de> <720bcf72-e944-4978-982f-4b6fa8b31e5c@gmail.com> <86o7sxg7u7.fsf@gnu.org> In-Reply-To: From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 23 Nov 2022 12:54:09 +0000 Message-ID: Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server To: Richard Copley Content-Type: multipart/alternative; boundary="000000000000fe41af05ee22c487" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: Felician Nemeth , Danny Freeman , 58790@debbugs.gnu.org, Arash Esbati , Michael Albinus , Stefan Kangas , Dmitry Gutov , Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000fe41af05ee22c487 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 23, 2022 at 12:49 PM Richard Copley wrote: > > Thanks, yes. > > > > 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. > > I don't think "url-generic-parse-url" needs any fix. It is for parsing a > URL, > not deciding if something is a URL. > That's... arguable. But OK, if we go with that, then we need a function to decide if something is an URL, because it's exactly what we're aiming for to do here. But let's continue in the other bug report: I've CC'ed you in my last message. Jo=C3=A3o --000000000000fe41af05ee22c487 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Nov 23, 2022 at 12:49 PM Richard = Copley <rcopley@gmail.com> w= rote:

Thanks, yes.

> > So either url-generic-parse-url and url-type is fixed in url-pars= e.el, or
> > we must add some Windows-specific guards in eglot.el.=C2=A0 Or li= kely
> > both, since url-parse.el is not a :core ELPA package.

I don't think "url-generic-parse-url" needs any fix. It is fo= r parsing a URL,
not deciding if something is a URL.

Tha= t's... arguable. But OK, if we go with that, then we need a function to=
decide if something is an URL, because it's exactly what we&= #39;re
aiming for to do here.

B= ut let's continue in the other bug report: I've CC'ed you in my= last
message.

Jo=C3=A3o
<= /div>
--000000000000fe41af05ee22c487-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 08:34:11 2022 Received: (at 58790) by debbugs.gnu.org; 23 Nov 2022 13:34:12 +0000 Received: from localhost ([127.0.0.1]:54172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxptD-0005Y7-Hq for submit@debbugs.gnu.org; Wed, 23 Nov 2022 08:34:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxptA-0005Xr-Op for 58790@debbugs.gnu.org; Wed, 23 Nov 2022 08:34:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxpsl-00004u-Rz; Wed, 23 Nov 2022 08:34:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=VzCz4P9dkkZFAwGxwQj9xuaUJqJVfbLesux+JyEhsiY=; b=DyZsSBER3UGww5Q9ADIb bFs6wHhQP4pbHAK+7VjDYWVMhwJ32bZu9EiC0Qxj+pySW77P2XzjT6IdFHMuzMXj8+1wlPlHon8bJ HbiOEs1LQZZPH+q8A5HXqO3TsY1Q24CsIkx0Ik6UCl8H7Acl2EXgMTmkqH9zhWvW2hJj6nDWPJHCj 8Arqkp1A5i/oTG68Pu9o9ezVvzdJo0e1Oe33K64fcHI8tfswwfJE/Joe45nGHCoG5sunou7BqmmLO mWcuxcMyYeIPM8DM2D6s5clt77y5heWncmPwQCVlAXiVmYB0t62IlpPhhU3iBJ1Vf/CWxTSPOzoOk xD39ffscJpMR7A==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxpsk-0006uY-E9; Wed, 23 Nov 2022 08:33:43 -0500 Date: Wed, 23 Nov 2022 15:33:58 +0200 Message-Id: <83edttztfd.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Wed, 23 Nov 2022 12:36:37 +0000) Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server References: <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <8735ab12pr.fsf@gmx.de> <720bcf72-e944-4978-982f-4b6fa8b31e5c@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58790 Cc: felician.nemeth@gmail.com, danny@dfreeman.email, 58790@debbugs.gnu.org, rcopley@gmail.com, michael.albinus@gmx.de, stefankangas@gmail.com, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João Távora > Date: Wed, 23 Nov 2022 12:36:37 +0000 > Cc: Danny Freeman , Felician Nemeth , > 58790@debbugs.gnu.org, Stefan Kangas , > Dmitry Gutov , Eli Zaretskii , > Michael Albinus > > 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. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 08:43:50 2022 Received: (at 58790) by debbugs.gnu.org; 23 Nov 2022 13:43:50 +0000 Received: from localhost ([127.0.0.1]:54182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxq2Y-0005mO-87 for submit@debbugs.gnu.org; Wed, 23 Nov 2022 08:43:50 -0500 Received: from mail-oi1-f169.google.com ([209.85.167.169]:33699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxq2V-0005m3-Tg for 58790@debbugs.gnu.org; Wed, 23 Nov 2022 08:43:48 -0500 Received: by mail-oi1-f169.google.com with SMTP id c129so19086222oia.0 for <58790@debbugs.gnu.org>; Wed, 23 Nov 2022 05:43:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=liR1xi4DRahJ1nDSLSMvtBFylajn2d10g9eaFoJf1fk=; b=ieSlmzgyEvEcXZ8gfq+o1g6R2NnQWHeZAQj34HrXTNBtZ+EkQCcMCuOgnD85Kx10Ye /NHZio7P5k+wlWK7NayxioxgLyT+dcwvhBSCbGPZgi2hgW6z2BM1+M7RHNi5M838wrkO H6lJTR5Fq6jdhzOYVv6d8r2ydQocZ4h9QECrQc9E3/DQamLlCP1LtdFGmIDJ6XtrSARo FGGdxVDPL66rmcyEDvacvKie8o5pL3mSIvdPTwk8ur6rG7T3u9SESHRQLiIkrIBj63cz kqCmXaAJdnm/cUTb2fUfAPWBGb9feErfaTVctcu/vzZuMWy7PypgKRwxkvisd8Rpc0Gy 1eSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=liR1xi4DRahJ1nDSLSMvtBFylajn2d10g9eaFoJf1fk=; b=dZcTnzNXYNp/mIrk+fwZYbV3cBLuv1MPaCc2tkswUDpz2wyRKdLbK6NbmyaLly55Vi pdmYGVMUCBSDV3tavTObrX6GPLJWP/R2zgVW1pyuBmowJxmYmmwpVw40JXklP/4mquEK Hw7fcZemzInEqG/tbKB7POUCTrX1BDzOkbUCqVRG7omKODorksbJr+ZySMVD2iMYDzfg 6doLrhgRB1ESUAL0h4nJM+hfZuR/6rh94wxauOZyRBEMoXk4M3P6n/CEcktOG9cDACRs Lc2yat4XNtqRUH/Mm+CLGcZEiRToliI0/3c3hPb0YfijW6ocJLg74NXZf5/7o6NE1qkz nG3A== X-Gm-Message-State: ANoB5plWovF5QteItkIxU6D4m4zxvD2WepAnVA3AZ2jKtCS+6JR7lsUP g/C3wg2fLuCZQou2jGtnYFGntrNzAcomgmgkFKk= X-Google-Smtp-Source: AA0mqf64ZCUcO45jI/B6ruzMUnzTNRZ/uppholjHA6vriLQVsjvZkmc4+xQC8oDMnGNLEmBxCCagAs3bVPg+E/0bljU= X-Received: by 2002:aca:170d:0:b0:35a:7e8d:8ad6 with SMTP id j13-20020aca170d000000b0035a7e8d8ad6mr4455075oii.171.1669211022108; Wed, 23 Nov 2022 05:43:42 -0800 (PST) MIME-Version: 1.0 References: <9bb290c8-f000-31d8-265d-b5441c33eb38@dfreeman.email> <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <8735ab12pr.fsf@gmx.de> <720bcf72-e944-4978-982f-4b6fa8b31e5c@gmail.com> <83edttztfd.fsf@gnu.org> In-Reply-To: <83edttztfd.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 23 Nov 2022 13:44:48 +0000 Message-ID: Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000072d3d05ee237af2" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: felician.nemeth@gmail.com, danny@dfreeman.email, 58790@debbugs.gnu.org, rcopley@gmail.com, michael.albinus@gmx.de, stefankangas@gmail.com, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000072d3d05ee237af2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 23, 2022 at 1:34 PM Eli Zaretskii wrote: > > From: Jo=C3=A3o T=C3=A1vora > > Date: Wed, 23 Nov 2022 12:36:37 +0000 > > Cc: Danny Freeman , Felician Nemeth < > felician.nemeth@gmail.com>, > > 58790@debbugs.gnu.org, Stefan Kangas , > > Dmitry Gutov , Eli Zaretskii , > > Michael Albinus > > > > 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=3D59338#53 Right. When I wrote that, I was unaware of this second bug report. > 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? > Maybe I misunderstood, but it seemed like you were proposing that we change url-parse.el so that it isn't fooled into thinking windows path names are URLs with the drive letter as the 'url-type'. If that were the correct solution (I tend to think it is), then it would _not_ suffice to fix Eglot on Emacsen older than 29, because url-parse.el is not distributed separately as a :core ELPA package. So unless we made url-parse.el such a package, we would need a Danny's "kludgy" patch to eglot.el anyway. In any case, I suggest that a solution be based on the patch shown in that > bug#59338 discussion. > Having now read Danny's patch, I think it's good to commit. Jo=C3=A3o --000000000000072d3d05ee237af2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Nov 23, 2022 at 1:34 PM Eli Zaretskii <eliz@gnu.org> wrote:
<= div class=3D"gmail_quote">
> From: Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com>
> Date: Wed, 23 Nov 2022 12:36:37 +0000
> Cc: Danny Freeman <danny@dfreeman.email>, Felician Nemeth <felician.nemet= h@gmail.com>,
>=C2=A0 =C2=A0 =C2=A0 =C2=A058790@debbugs.gnu.org, Stefan Kangas <stefankangas@gmail.com>= ,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0Dmitry Gutov <dgutov@yandex.ru>, Eli Zaretskii <eliz@gnu.org>,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0Michael Albinus <michael.albinus@gmx.de>
>
> Yes,I think I follow.=C2=A0 To be clear I think the problem is somewhe= re in
>
> (defun eglot--path-to-uri (path)
>=C2=A0 =C2=A0"URIfy PATH."
>=C2=A0 =C2=A0(let ((truepath (file-truename path)))
>=C2=A0 =C2=A0 =C2=A0(if (url-type (url-generic-parse-url truepath))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Path is already a URI, so forward = it to the LSP server
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; untouched.=C2=A0 The server should= be able to handle it, since
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; it provided this URI to clients in= the first place.
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0truepath
>=C2=A0 =C2=A0 =C2=A0 =C2=A0...)
>
> 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.=C2=A0 Or likely<= br> > 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:

=C2=A0 https://debbugs.gnu.org/cgi/bugreport= .cgi?bug=3D59338#53

Right. When I wrote= that, I was unaware of this second bug report.
=C2=A0
You said you wanted to augment it with something that didn't depend on<= br> 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.=C2=A0 So what am I missing?
=

Maybe I misunderstood, but it seemed like you were prop= osing that
we change url-parse.el so that=C2=A0 it isn't fool= ed into thinking windows path
names are URLs with the drive = letter as the 'url-type'.

If that were= the correct solution (I tend to think it is), then it would
_not= _ suffice to fix Eglot on Emacsen older than 29, because url-parse.el
<= /div>
is not distributed separately as a :core ELPA package.
=
So unless we made url-parse.el such a package, we would need= a Danny's
"kludgy" patch to eglot.el anyway.<= br>

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

Having now read Danny's patch, I = think it's good to commit.

Jo=C3=A3o
=
=C2=A0
--000000000000072d3d05ee237af2-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 09:09:11 2022 Received: (at 58790) by debbugs.gnu.org; 23 Nov 2022 14:09:11 +0000 Received: from localhost ([127.0.0.1]:54217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxqR4-0000K2-Uf for submit@debbugs.gnu.org; Wed, 23 Nov 2022 09:09:11 -0500 Received: from out2.migadu.com ([188.165.223.204]:32934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxqQz-0000Jq-2h for 58790@debbugs.gnu.org; Wed, 23 Nov 2022 09:09:09 -0500 References: <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <8735ab12pr.fsf@gmx.de> <720bcf72-e944-4978-982f-4b6fa8b31e5c@gmail.com> <83edttztfd.fsf@gnu.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1669212543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f5msdWo9yvmZcGoroerhWPTTb73Fj8lpjFhGHb+AT1E=; b=HWi9L/nl2hesDB5+UGB1fdXXOCZFiscmv2koQnWfY09oNIiyWGeaM/DCY2HmD1W6CNjlex 87d/v+mrqoC2z8I3tJ/gYjb7Kb8MBgwGtrxrSCYsCpdhVg+6teLIMj9VB7HM7qgUT7ZIRg TJiZ8SiUD2P5nonE33aHdaiJhC0OK8I= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Wed, 23 Nov 2022 09:03:19 -0500 In-reply-to: Message-ID: <87mt8hhif8.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: felician.nemeth@gmail.com, 58790@debbugs.gnu.org, rcopley@gmail.com, michael.albinus@gmx.de, stefankangas@gmail.com, dgutov@yandex.ru, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora writes: > Maybe I misunderstood, but it seemed like you were proposing that > we change url-parse.el so that it isn't fooled into thinking windows path > names are URLs with the drive letter as the 'url-type'. > > If that were the correct solution (I tend to think it is), then it would > _not_ suffice to fix Eglot on Emacsen older than 29, because url-parse.el > is not distributed separately as a :core ELPA package. > > So unless we made url-parse.el such a package, we would need a Danny's > "kludgy" patch to eglot.el anyway. > > In any case, I suggest that a solution be based on the patch shown in that >> bug#59338 discussion. >> > > Having now read Danny's patch, I think it's good to commit. > > Jo=C3=A3o Aside from the windows path bug, which is addressed in the other tick, is this ticket safe to close? Eglot now tries to avoid parsing non-file type URLs, and we decided against the warning message. Is there anything else to do? --=20 Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 14:52:23 2022 Received: (at 58790-done) by debbugs.gnu.org; 23 Nov 2022 19:52:23 +0000 Received: from localhost ([127.0.0.1]:56306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxvnD-0006A3-BE for submit@debbugs.gnu.org; Wed, 23 Nov 2022 14:52:23 -0500 Received: from mail-ot1-f51.google.com ([209.85.210.51]:34790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxvn7-00069m-FE for 58790-done@debbugs.gnu.org; Wed, 23 Nov 2022 14:52:22 -0500 Received: by mail-ot1-f51.google.com with SMTP id db10-20020a0568306b0a00b0066d43e80118so11902535otb.1 for <58790-done@debbugs.gnu.org>; Wed, 23 Nov 2022 11:52:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xEhRJ7g1pvvD6K2PFIzKgO4KzuP9491nF0+PynrzfyA=; b=E/4wPYWMIpVU7AhmLbywafrM+XZvU2tgNLvNBXmZoTb5/3QS4rN83524njhhR07jg5 bryK9LO4JdAf0/BpuP3RCw+UlQfsP8xiFT6FtrkUJhoNE7cStYoWdegWTHv3LQ92E/zf /MmMfTbbRIPxNbfaHQU5NVEIze5EN0Zelkw50H0Yggx4AlkdZpdR37+UOSiOAS1jh3y6 pRumgLUrKIajKRvhWHnAVkxC3gjcNQojQtBGvFGU1VQHdPEaaHhxrKA9Zo8+LEW0I1/B ezRsIs+OrKUvwJL0ZLqnyAoaHF5yIeGYkpHNyVMDRgmEm4FmHQ2h6DlYyq9UmWC0Rk6f z1jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xEhRJ7g1pvvD6K2PFIzKgO4KzuP9491nF0+PynrzfyA=; b=l1yMtZt8aFInE5o1MGOW2GwkgH2wsqt7LSyvzCFTbIYvQamLKl7VsYF7bek+KzA1P4 Yr8FKtVgNW/AZ08wtaY1osxX+QChkCe3NDiNglb5WAvaLMM4Jlb6CX2M1nMu7Y/rm4/5 TDp1DX2/Njg1a8GRLT9aGPfz8zmXLxd5x5JF3EkdAFfhiK6eIJ7mjGLX8UgAFpsdHCYG vX12jm/OJ2jCb+wwrON84KPQ6DUhAtZmWR4vBITkngXJYCZ3M8Z3gAzeDDvZivgdu6Fz 5O5mi4urEotI1ecROm5eUleQp/2uM2EIg8fScTGy7XG6V1/S60WiUSCS3O1Ajgt9ga/u 1IpA== X-Gm-Message-State: ANoB5pkIgtxS4oYkcfeDivuQNluAiGyTfWpNbwX/V7lrlHKaiHFjfOhl O8gxRfdLU9kGwx4RKcjHQYw+p5qme6WJNDcPfcg= X-Google-Smtp-Source: AA0mqf4cTHUTdRLdNPJ7wvkH08WSiPxiPyZ0OrkZnpw27HzBMe7RcN3uUCXGl/eJTbkQAqV9PB4eeEH5HzhQh4EsEt4= X-Received: by 2002:a9d:4f07:0:b0:66c:64d6:1bb4 with SMTP id d7-20020a9d4f07000000b0066c64d61bb4mr15246124otl.201.1669233131697; Wed, 23 Nov 2022 11:52:11 -0800 (PST) MIME-Version: 1.0 References: <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <8735ab12pr.fsf@gmx.de> <720bcf72-e944-4978-982f-4b6fa8b31e5c@gmail.com> <83edttztfd.fsf@gnu.org> <87mt8hhif8.fsf@dfreeman.email> In-Reply-To: <87mt8hhif8.fsf@dfreeman.email> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 23 Nov 2022 19:53:17 +0000 Message-ID: Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server To: Danny Freeman , 58790-done@debbugs.gnu.org Content-Type: multipart/alternative; boundary="000000000000dcbb0505ee289f0a" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58790-done Cc: Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000dcbb0505ee289f0a Content-Type: text/plain; charset="UTF-8" > type URLs, and we decided against the warning message. Is there anything > else to do? Not really. I think this bug is closed (in fact I think it was already, but I'm not sure anymore). Closing it again. --000000000000dcbb0505ee289f0a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> type URLs, and we decided against the warning message= . Is there anything
> else to do?

Not really. I think this bug= is closed (in fact I think it was already, but I'm
not sure anymore= ). Closing it again.

--000000000000dcbb0505ee289f0a-- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 02 11:14:13 2022 Received: (at 58790) by debbugs.gnu.org; 2 Dec 2022 16:14:13 +0000 Received: from localhost ([127.0.0.1]:47533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p18g0-00071l-Pv for submit@debbugs.gnu.org; Fri, 02 Dec 2022 11:14:13 -0500 Received: from mout.gmx.net ([212.227.17.22]:32821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p18fx-00071e-Qt for 58790@debbugs.gnu.org; Fri, 02 Dec 2022 11:14:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1669997642; bh=DTY1xD1bLc7wV2l3nDgGebT89U8yCDbFP4KljDZWn1o=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=LYdqeKQidHvcRMoNLSbmc9qT1n9s0HXDi9ANvNlg5d8HF4ANMLsG4xPFSG/iPia4O d+tIeg22Q+iMmfY+9s/a3NlO4oEa9RRk4mYFKI3JyiBrLwfsVTf1MtsEkjaXPVYBU1 3D4qy3sWXAE1NWBb66E41xO21J4g7c/sJSe9p3f/z/OG9hBUwnPX95Okg93/ouMrn5 icd7zb0w0X6elghkSLEita22va9RhAHm01TMxgyTa2xdLZaxmPQCqkGEwNPGpqyEzp 4GLzMABlh/GhvFih4G1M8g+jx6zCJtMErCPmEkNgYbwbDYwPEy62Tk5mVKIReImnjI xZfqUBbQaTGYg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.11]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N3bSt-1osEwM37el-010ah3; Fri, 02 Dec 2022 17:14:01 +0100 From: Michael Albinus To: Danny Freeman Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <87v8nejy32.fsf@dfreeman.email> (Danny Freeman's message of "Wed, 16 Nov 2022 17:59:08 -0500") References: <4d50b820-7053-75eb-5b11-d3d36a02b013@dfreeman.email> <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <87v8nejy32.fsf@dfreeman.email> Date: Fri, 02 Dec 2022 17:14:01 +0100 Message-ID: <87o7sl6awm.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:oFXLP32Z/fzwiJ4wc6gLpkmilx6429FxsdcouIfSz5Hmx8/QhXT UDTigtO9zzR9KsjdeLL1X1Eb0Cew6+6E/bMkH/AkkSjqM+IaXJIGyOk0VIb18Xmm029DEFg xOTU+IZrW/tw8d/+YNR3bK+6ScjlxZzmeVlNHgQgeW92Wrz72byevYEfPxHBLBZ9EcEngHk vPVGw9LphOuIGmiEvfL7A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:49zttV7lR44=;L9RbSd2LIx/yr/q8Yeerye1/wTd /fM8r+7/ElEJLv4YPQuIq1OGLU31f6sI5Lg04AAqWo+km1PWT6bWrUy/9BmEp6oxOPXojjvjn pN3RbfdHiZKcxp4ceZYh1b8I3KQaMsNnPAEhn0UhZ0HhNdco7ysellsBY/szwWOviGegdZzJ6 bOzdD74SBH8h3cGHQuuw/U/ee6tRtI8r3qDqLtVAN0ChkFJM6z5s4La+TSqHZayHU1jKWbv2c VNklupcRQjvqWS/g/FCl8g47/q+wDdJ9oSe3zptpli7RCibRTALNaIhlckvRlYrdFx/lOwNo/ b6Z8kVa+8gvvs/Hqgo+s9FQsBRMJOqMjBGv66nTrLwxzAaUoBer5jDbPLNYpp5fQD0cl6mAE/ bsUR9/kJ3TTdC5Ppt8q/whDEQJl47LaE7xkKhn5D8GRxCteoV5ZpYS0RTsPFxuU3tLXt5SMlV ul3q5pj4unIEHdTrvgQD8s3yIU/Pgbf4mcfsqXjq27oVTQIRoamBd1w/EFDTLP//45eeU9oxJ ojCYsWM6cSIaapfajfTRpKnxlyIwZG+r2gsLxsq4CwIqeVb5fqJXdP+RLfj7STRvrwVYvEGC7 8v1e03M6XR/QODKxqgziTT3R9nLVz2Lfz5lE1zaIG68sDl8r0lxtqKdnfL3YmaJjn5eqGKIPp QtYMAIJ8xYIFHK4qagYQZV7FvS6Sevjyu3jYE23UylhUwvyt1qzz54UP+SRGv+r5YgHs/lVef tQwC+ijkAp+p2S9/eVbZRkw/TnJvlZPNBQPHWPh+m5ODgFrxdE2tWigvI/EhpirV1wO984yuv sLzm4jWHbFPCljwznLenbaP5WjF7Dwo29d6jyQBfiKtQD/kUefk+RrEUXTrWIqnWoRUdEkB9n 2QTTYnPg9UJp9Oo9k+L1qxhn3MqwZfNoGwN9gPqTJn4jdRTpOzak3uCJ2j7BHBZNyryXUHtMx 7juiUlb3/ABv98QRepYVLSazb5o= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: Felician Nemeth , 58790@debbugs.gnu.org, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Dmitry Gutov , Eli Zaretskii , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Danny Freeman writes: Hi Danny, Sorry for being late, it took me a while to find a free time slot. >> 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. > > I think this could be a nice thing to include in emacs itself. > I have already implemented this funcitonality in a package on elpa: > https://elpa.gnu.org/packages/jarchive.html if you want to look. Well, the jar: and zipfile: semantics is a little bit different from what url-handlers supports. So let's continue with your package ATM; we could replace it by an implementation in url-handlers later on if we like. I gave your package a short review, it looks nice. Testing it together with eglot and the recipe below works nicely. Just one recommendation: I would add in jarchive--file-name-handler --8<---------------cut here---------------start------------->8--- ((eq op 'abbreviate-file-name) uri) ((eq op 'make-auto-save-file-name) nil) ((eq op 'vc-registered) nil) --8<---------------cut here---------------end--------------->8--- Eval prior your tests --8<---------------cut here---------------start------------->8--- (trace-function 'jarchive--file-name-handler) --8<---------------cut here---------------end--------------->8--- and you'll see what I mean in buffer *trace-output*. >> Danny would, probably, but the recipe would involve a particular LSP server and clojure toolchain, i think. > > Indeed I do :) I've prepared the test as indicated. > Running `M-x eglot` > Then `M-x xref-find-definitions` over the symbol `inc` should reproduce > the error. Well, running the test together with your package looks fine. What I don't understand is the following sequence: --8<---------------cut here---------------start------------->8--- [client-request] (id:6) Fri Dec 2 17:04:01 2022: (:jsonrpc "2.0" :id 6 :method "textDocument/definition" :params (:textDocument (:uri "file:///usr/local/src/eglot-xref-to-jar-repo/src/user.clj") :position (:line 3 :character 3))) [server-reply] (id:6) Fri Dec 2 17:04:01 2022: (:jsonrpc "2.0" :id 6 :result (:uri "jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj" :range (:start (:line 923 :character 6) :end (:line 923 :character 9)))) --8<---------------cut here---------------end--------------->8--- That means, that the client (my local Emacs) has asked for "textDocument/definition" on the file user.clj, as indicated by your recipe. The remote server has returned as answer, that this definition is in "jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj". This file must be located on the server, because the server cannot know anything about my local configuration, right? But your jarchive package opens this file locally. It works, because on my local machine I have the same file, but it looks confusing to me. What if the file doesn't exist locally? Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 07 14:18:00 2022 Received: (at 58790) by debbugs.gnu.org; 7 Dec 2022 19:18:00 +0000 Received: from localhost ([127.0.0.1]:51769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2zvb-00009f-Nb for submit@debbugs.gnu.org; Wed, 07 Dec 2022 14:18:00 -0500 Received: from out2.migadu.com ([188.165.223.204]:53640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2zvW-00009Y-Pk for 58790@debbugs.gnu.org; Wed, 07 Dec 2022 14:17:58 -0500 References: <87v8nxsrq6.fsf@gmail.com> <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <87v8nejy32.fsf@dfreeman.email> <87o7sl6awm.fsf@gmx.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1670440673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VvFJNgJqmCXpVQu5ocdhAzhQVuyuFNdE9CRmT2+vaE0=; b=wWnewob+epIHYRDR+lm+2+kCnsUdZJAuKxF1lL9E7BWp2Dq3FUCXu+9taeFInod6whoyXK NYcq1+6MenZVSQAZb0g45IKUVO+zH0aaWxGJunOStnvn+XAzeTfURxwEa/AKIkQ58MJ6Zo yjTz3gJFFFcFYsEzYGsghH1fEV2ogG0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Michael Albinus Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Wed, 07 Dec 2022 13:56:37 -0500 In-reply-to: <87o7sl6awm.fsf@gmx.de> Message-ID: <87h6y7uioy.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: Felician Nemeth , 58790@debbugs.gnu.org, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Dmitry Gutov , Eli Zaretskii , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Danny Freeman writes: > > Hi Danny, > > Sorry for being late, it took me a while to find a free time slot. > No worries, we are all busy! I understand. > Well, the jar: and zipfile: semantics is a little bit different from > what url-handlers supports. So let's continue with your package ATM; we > could replace it by an implementation in url-handlers later on if we > like. > > I gave your package a short review, it looks nice. Testing it together > with eglot and the recipe below works nicely. Just one recommendation: I > would add in jarchive--file-name-handler > > ((eq op 'abbreviate-file-name) uri) > ((eq op 'make-auto-save-file-name) nil) > ((eq op 'vc-registered) nil) > > > Eval prior your tests > > (trace-function 'jarchive--file-name-handler) > > > and you'll see what I mean in buffer *trace-output*. I do see that, I'll be publishing a change that includes this later today. I'll have to remember to use trace-function more often. What a nifty tool! > > Well, running the test together with your package looks fine. What I > don't understand is the following sequence: > > [client-request] (id:6) Fri Dec 2 17:04:01 2022: > (:jsonrpc "2.0" :id 6 :method "textDocument/definition" :params > (:textDocument > (:uri "file:///usr/local/src/eglot-xref-to-jar-repo/src/user.clj") > :position > (:line 3 :character 3))) > [server-reply] (id:6) Fri Dec 2 17:04:01 2022: > (:jsonrpc "2.0" :id 6 :result > (:uri "jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj" :range > (:start > (:line 923 :character 6) > :end > (:line 923 :character 9)))) > > That means, that the client (my local Emacs) has asked for > "textDocument/definition" on the file user.clj, as indicated by your > recipe. The remote server has returned as answer, that this definition is in > "jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj". This > file must be located on the server, because the server cannot know > anything about my local configuration, right? The server should be running on your machine locally, and have access to everything Emacs does. It knows the location of that jar because it uses the clojure build tool to create a classpath for the project, which contains the full location of the clojure-1.10.3.jar file. >From what the clojure-lsp maintainers tell me, it will not run on a remote machine and be able to work with a project on your local machine. I'm not sure what it would return for a definition if it was able to run on a remote machine. > But your jarchive package opens this file locally. It works, because on > my local machine I have the same file, but it looks confusing to > me. What if the file doesn't exist locally? > Best regards, Michael. I did some testing with this and it depends. Clojure-lsp needs the jar dependencies to do it's analysis, so it will use whatever clojure build tool the project uses to download them on startup if they do not exist (given that it is listed as a dependency in the project file, deps.edn in the case of my recipe). If it doesn't exist locally after clojure-lsp has started then it will return the same jar path, but opening the jar file will of course fail. If this happens it's because the user or some other process deleted the jar. There isn't much to be done about that. -- Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 08 08:47:08 2022 Received: (at 58790) by debbugs.gnu.org; 8 Dec 2022 13:47:08 +0000 Received: from localhost ([127.0.0.1]:56881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3HEy-0003AQ-5y for submit@debbugs.gnu.org; Thu, 08 Dec 2022 08:47:08 -0500 Received: from mout.gmx.net ([212.227.15.15]:45501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3HEx-0003A7-0J for 58790@debbugs.gnu.org; Thu, 08 Dec 2022 08:47:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1670507220; bh=iBODjCyFVIe0ksdVysloTvOLyiuknW5kJy2h3+eBMDE=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=SymsaNLlVIkhyfnewWVVzvU0Q367kZmylHbPlwyHVzTqXok1aFwkClY2I5KFpIEYD TCHay+exj6bfylGH+RgZp6rPmJ5z1/DRAAv1BETO9JJd2kVwdmBjyR2djhXB0SL2hL zwYvSbw2uDDIebRgd2AhWMgngmdmGXR6xSby4F/BsbxPu0ukiYszdA5n76I0V1O6za hvGLhx/Ov8b2B4XEUxxvWadsVFCHudarpfmg1KgOGjpy9pcg2+DitiUhMhy3aAemxz tkBP5gL9PXPYENiLqed26DVY0R7gDtSSlYEhYWdbIvynuUTMbdFvV/dQbZTEG3ReNI ULo5fkl9quGsw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.11]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M7Jza-1p2BqB48fk-007mAZ; Thu, 08 Dec 2022 14:47:00 +0100 From: Michael Albinus To: Danny Freeman Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <87h6y7uioy.fsf@dfreeman.email> (Danny Freeman's message of "Wed, 07 Dec 2022 13:56:37 -0500") References: <87cza40xgs.fsf@dfreeman.email> <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <87v8nejy32.fsf@dfreeman.email> <87o7sl6awm.fsf@gmx.de> <87h6y7uioy.fsf@dfreeman.email> Date: Thu, 08 Dec 2022 14:46:58 +0100 Message-ID: <87wn72ovn1.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:xI66W/6j9gkW6Yu0DE35Hkx8c8efcgkX5+cHjC4Y5qBia57bJOk 2wOHj+XqpJ4qIeZPBO33FnmKn5nSCbThca8MPvasjbGSrShLg1txMQx12dcSat49TxGS4+2 jUxfiPU46Zb1kk3LUds4qQcCLUumlPVmqAQ35H82ZAjFFmPGy/kavZ9xNl5qjQKo33Ln0Ge u6/T0G6oMuJU4EXs/X6vg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:TmWEszRb1x8=;puv5xG/0EoupcAz/lUHltnhePHM oyFwDeHgAO+ojLbi/GIs9gfDQcaiE90Q0541JNXnNg+7dxb8Yvf6HHJXN9ugVG3NOJMr1k+bE Hal2u37hs0Afj0GiU4Qe9e2dQqi/LSvlLtGXH7dDgxawsITes1oYk/j6qd3f+7wThOozViXKo MF+Hf7BxGeViQGRLJn+W3ggnDy+DKbgpMm2NHqClmF3t5FMs4wNgbSNPpUYmKzIvEAWZESS91 +G91ultba1Ce6rEJCUap2A+BZ6AbM1X97ZP5WuuMal4trw8s8dWK/3Z9cyNFUvBdfPXSQkkLV lYJahhbKIiFtQ+OJgXqFsSbliVLc3Ws8RbUItWGMcZvUCC7pUm+96EZXSWrFj7Y41dSan1Xt9 yElb9/gy37hKYgrYR1X2NaIayketnHXhDAAOhY7bk5528gwTvhTMTGA9dcJZrIuu8K/6VqU/z 0VSG3Fy2Ip/yp2NILHjl8cnlqJ/tEsg/UwIWj453Jv5r+C1GSy4L+7WRnyXSCpAgJhnduls6q vYtX8EGjUIAf7lQBPruL2+SEznZlj0v0CZCOcInl/6+L++es9cMfDHfuxwsEVDNWdqgqrh5+s +cVOLSbehhVs9qXXV3umN64YaA0i+73+hP5E7EZUfLBRsYwlNV39eVwMqAki2Ihq9PmdIIWVF ldt0epLJ/suFDE6fcLHl81m5T+j8oPx1rhiQ/vXsEAPebQACFxwk/uYqc9nMDVzdlN6lta1Sa VHBwiZPGSfsfNsbi6xFT59SK3vX5+ZccCs04Ddh8I5ZtWnZ22h1299rBSZEluzmSb5IBGHm6j 0ej5bOxMGWD//0HnuZnUXB2Lipxu9JM1e4i1B3Qcdtfq5mWz6EpTrjnri5PQ53iTO31dIGyU+ oT0OtjE4haZXF5oj6gMuwBVb3XKROMAn7MPiHc1jIPelp0+Cb1xcQ6ei4FmaZKm5cGAuC8ypT H5yA/7aWtCjxMp7CImVAMGDojFA= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: Felician Nemeth , 58790@debbugs.gnu.org, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Dmitry Gutov , Eli Zaretskii , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Danny Freeman writes: Hi Danny, >> Well, running the test together with your package looks fine. What I >> don't understand is the following sequence: >> >> [client-request] (id:6) Fri Dec 2 17:04:01 2022: >> (:jsonrpc "2.0" :id 6 :method "textDocument/definition" :params >> (:textDocument >> (:uri "file:///usr/local/src/eglot-xref-to-jar-repo/src/user.clj") >> :position >> (:line 3 :character 3))) >> [server-reply] (id:6) Fri Dec 2 17:04:01 2022: >> (:jsonrpc "2.0" :id 6 :result >> (:uri "jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj" :range >> (:start >> (:line 923 :character 6) >> :end >> (:line 923 :character 9)))) >> >> That means, that the client (my local Emacs) has asked for >> "textDocument/definition" on the file user.clj, as indicated by your >> recipe. The remote server has returned as answer, that this definition is in >> "jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj". This >> file must be located on the server, because the server cannot know >> anything about my local configuration, right? > > The server should be running on your machine locally, and have access to > everything Emacs does. It knows the location of that jar because it uses > the clojure build tool to create a classpath for the project, which > contains the full location of the clojure-1.10.3.jar file. ??? I'm speaking about a clojure file which is located on a remote machine, accessed via Tramp. I thought that Eglot uses an LSP server on that remote machine then. > From what the clojure-lsp maintainers tell me, it will not run on a > remote machine and be able to work with a project on your local machine. > I'm not sure what it would return for a definition if it was able to run > on a remote machine. The LSP server shouldn't care. It returns a local file name, like "jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj". This is because the file is local from the server's pov. It is the client, Eglot, which must be able to access this file on the remote machine. A task for your jarchive file name handler, I believe. Or do I misunderstand the architecture? Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 08 14:15:40 2022 Received: (at 58790) by debbugs.gnu.org; 8 Dec 2022 19:15:40 +0000 Received: from localhost ([127.0.0.1]:58533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3MMt-0002YJ-W8 for submit@debbugs.gnu.org; Thu, 08 Dec 2022 14:15:40 -0500 Received: from out-246.mta0.migadu.com ([91.218.175.246]:19948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3MMr-0002Y7-9k for 58790@debbugs.gnu.org; Thu, 08 Dec 2022 14:15:38 -0500 References: <83edubrvf0.fsf@gnu.org> <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <87v8nejy32.fsf@dfreeman.email> <87o7sl6awm.fsf@gmx.de> <87h6y7uioy.fsf@dfreeman.email> <87wn72ovn1.fsf@gmx.de> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Michael Albinus Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Thu, 08 Dec 2022 14:07:59 -0500 In-reply-to: <87wn72ovn1.fsf@gmx.de> Message-ID: <87cz8tvh9q.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: Felician Nemeth , 58790@debbugs.gnu.org, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Dmitry Gutov , Eli Zaretskii , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > > ??? > > I'm speaking about a clojure file which is located on a remote machine, > accessed via Tramp. I thought that Eglot uses an LSP server on that > remote machine then. I wasn't aware you were using tramp, I thought you were attempting to run clojure-lsp on a remote server to work with a project on a local machine, which shouldn't work. clojure-lsp needs access to the files, including jar files, to work properly. >> From what the clojure-lsp maintainers tell me, it will not run on a >> remote machine and be able to work with a project on your local machine. >> I'm not sure what it would return for a definition if it was able to run >> on a remote machine. > > The LSP server shouldn't care. It returns a local file name, like > "jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj". This > is because the file is local from the server's pov. > It is the client, Eglot, which must be able to access this file on the > remote machine. A task for your jarchive file name handler, I believe. > > Or do I misunderstand the architecture? I think I am just confused at this point. Can you explain more about what your current setup is for this question? In trying to understand, it sounds like you are using Emacs to connect to a remote machine somewhere via tramp. On the remote machine is a clojure project and a running clojure-lsp server. When you try to navigate to a definition in a jar, it is returning a jar URI pointing to something on your local machine, not the remote machine like it should? Does that sound right? Fwiw, I have never used tramp before, so I'm not sure how Eglot or clojure-lsp will behave in that kind of environment. -- Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 09 11:04:37 2022 Received: (at 58790) by debbugs.gnu.org; 9 Dec 2022 16:04:37 +0000 Received: from localhost ([127.0.0.1]:36996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3frY-0006I5-UY for submit@debbugs.gnu.org; Fri, 09 Dec 2022 11:04:37 -0500 Received: from mout.gmx.net ([212.227.15.18]:56229) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3frX-0006Hy-6x for 58790@debbugs.gnu.org; Fri, 09 Dec 2022 11:04:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1670601866; bh=prpD4pIFHqb5oF5UCX8pFNHAE8K9t/UgQylRg9qhhow=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=Y5iXUv/Hg9xUzsA1v60ioqbpWHBZs3JFmrJSd8vz+NsPFurxDvIf8/BIIMl0DHrHA IIND+4YXzLX4ZLG6HZ/tL4Q7/waClDRcN5p+2d8Q92JGxI+Ur/3z6MgUpKrFTlyaY3 K36oGdmhrZlqyqIq5eQ2ceyVlpfRsfV07Vd0/nBuUPUrGGYKXXA/cP6MCA61kLOlN/ STjEw9EVaLoem93deKsOgA4EYF3oaSju2Q+3ViFD8fW1hf/wqCFrNpzQMda/2BS0vU FPPiUe+j4n3y2nubMVzl8SeK8VajrHka/2SQsqoKNTqOGsrXo2zgbmD95+zVj6RLkU krcKsILgvWsfw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.11]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MNKhs-1pIQnA2gFW-00Ol9s; Fri, 09 Dec 2022 17:04:26 +0100 From: Michael Albinus To: Danny Freeman Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <87cz8tvh9q.fsf@dfreeman.email> (Danny Freeman's message of "Thu, 08 Dec 2022 14:07:59 -0500") References: <87cz9v9irh.fsf@gmail.com> <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <87v8nejy32.fsf@dfreeman.email> <87o7sl6awm.fsf@gmx.de> <87h6y7uioy.fsf@dfreeman.email> <87wn72ovn1.fsf@gmx.de> <87cz8tvh9q.fsf@dfreeman.email> Date: Fri, 09 Dec 2022 17:04:25 +0100 Message-ID: <87h6y4pnqu.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:k12L8QqDqqLBsFtAEQn6jKHjT6/CIUJ1Wp/JX/gQBeqtp8aO+dW gWBUX34dUMm1vNGMpHYe4SLIEk6Qtwc4/Z3mFxO/hKSdWl5PXw7voHlXpwSgxfnN7Ahd2TV j5wrgqyoIOmdImiTBkF/g8XASSWcclbOG7HDV6Lr36wvspAkFtzg+ji3DmOnHJ1Z6DCJ1AF oIgb0b6BgTJTQj4kuIELA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:9Q5VKKtEDnc=;ZFWLLKQSZET3M/5P3by6XHE+P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li Zaretskii , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Danny Freeman writes: Hi Danny, >> The LSP server shouldn't care. It returns a local file name, like >> "jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj". This >> is because the file is local from the server's pov. > >> It is the client, Eglot, which must be able to access this file on the >> remote machine. A task for your jarchive file name handler, I believe. >> >> Or do I misunderstand the architecture? > > I think I am just confused at this point. Can you explain more about > what your current setup is for this question? In trying to understand, > it sounds like you are using Emacs to connect to a remote machine > somewhere via tramp. On the remote machine is a clojure project and a > running clojure-lsp server. When you try to navigate to a definition in > a jar, it is returning a jar URI pointing to something on your local > machine, not the remote machine like it should? Does that sound right? Yes, this is what it looks like. I don't believe it is an error in the LSP server. The eglot architecture, AFAIU, runs always the the LSP server on the same machine as the file under investigation is located on. For local files it is obvious: in eglot--connect, make-process is called, which connects to the LSP server on the local machine. If you have a remote file, say /ssh:user@host:/usr/local/src/emacs/src/dbusbind.c (in order to use a more simple LSP server like clangd), they same happens: make-process is called. *But* make-process realizes that default-directory is a remote one (/ssh:user@host:/usr/local/src/emacs/src//), and so it calls clangd on that remote host. That LSP server doesn't care where the client is called from. It still does --8<---------------cut here---------------start------------->8--- [client-request] (id:20) Fri Dec 9 16:47:05 2022: (:jsonrpc "2.0" :id 20 :method "textDocument/definition" :params (:textDocument (:uri "file:///usr/local/src/emacs/src/dbusbind.c") :position (:line 171 :character 0))) [server-reply] (id:20) Fri Dec 9 16:47:05 2022: (:id 20 :jsonrpc "2.0" :result [(:range (:end (:character 22 :line 172) :start (:character 0 :line 172)) :uri "file:///usr/local/src/emacs/src/dbusbind.c")]) --8<---------------cut here---------------end--------------->8--- So the client requests to get a definition in (the server local) file "file:///usr/local/src/emacs/src/dbusbind.c" at a given position, and the server replies with a pointer to the (server local) file "file:///usr/local/src/emacs/src/dbusbind.c". It is up to the client (eglot), to translate this information into remote file name syntax "/ssh:user@host:/usr/local/src/emacs/src/dbusbind.c". > Fwiw, I have never used tramp before, so I'm not sure how Eglot or > clojure-lsp will behave in that kind of environment. I suppose for clojure the same spplies. If the LSP server on that remote host returns something like a (server local) file "jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj", it is up to the (eglot) client to recognize this as a pointer to the remote file at the given location. This problem is not tackled yet by your jarchive package. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 10 12:23:18 2022 Received: (at 58790) by debbugs.gnu.org; 10 Dec 2022 17:23:18 +0000 Received: from localhost ([127.0.0.1]:44045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p43ZG-0001EA-5u for submit@debbugs.gnu.org; Sat, 10 Dec 2022 12:23:18 -0500 Received: from out2.migadu.com ([188.165.223.204]:64854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p43ZC-0001Dp-TL for 58790@debbugs.gnu.org; Sat, 10 Dec 2022 12:23:16 -0500 References: <83o7terf9a.fsf@gnu.org> <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <87v8nejy32.fsf@dfreeman.email> <87o7sl6awm.fsf@gmx.de> <87h6y7uioy.fsf@dfreeman.email> <87wn72ovn1.fsf@gmx.de> <87cz8tvh9q.fsf@dfreeman.email> <87h6y4pnqu.fsf@gmx.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1670692993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FZtf18pkZyzy57Net8OSPNxqZJronmCK0fjALnDjrfU=; b=lLzE0yszt/zB4d5yzUwWkdNWDkceVUf2y+HYQ8ryNGD31mUDzpqu9vHmVnnfK8ynjVaFxe j5v+RvUa3nHlmpsZQT3zFN4ubQZnadrHikC+k7VgDSYkdidB5GqhIbDob9UbGvtEkOQU6K aMIOwo140IXdtwP2dBTZT3h0ArI2Opw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Michael Albinus Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Sat, 10 Dec 2022 12:21:18 -0500 In-reply-to: <87h6y4pnqu.fsf@gmx.de> Message-ID: <87fsdntbpd.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58790 Cc: Felician Nemeth , 58790@debbugs.gnu.org, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Dmitry Gutov , Eli Zaretskii , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Yes, this is what it looks like. I don't believe it is an error in the > LSP server. > > The eglot architecture, AFAIU, runs always the the LSP server on the > same machine as the file under investigation is located on. For local > files it is obvious: in eglot--connect, make-process is called, which > connects to the LSP server on the local machine. > > If you have a remote file, say > /ssh:user@host:/usr/local/src/emacs/src/dbusbind.c (in order to use a > more simple LSP server like clangd), they same happens: make-process is > called. *But* make-process realizes that default-directory is a remote > one (/ssh:user@host:/usr/local/src/emacs/src//), and so it calls clangd > on that remote host. > > That LSP server doesn't care where the client is called from. It still > does > > [client-request] (id:20) Fri Dec 9 16:47:05 2022: > (:jsonrpc "2.0" :id 20 :method "textDocument/definition" :params > (:textDocument > (:uri "file:///usr/local/src/emacs/src/dbusbind.c") > :position > (:line 171 :character 0))) > [server-reply] (id:20) Fri Dec 9 16:47:05 2022: > (:id 20 :jsonrpc "2.0" :result > [(:range > (:end > (:character 22 :line 172) > :start > (:character 0 :line 172)) > :uri "file:///usr/local/src/emacs/src/dbusbind.c")]) > > So the client requests to get a definition in (the server local) file > "file:///usr/local/src/emacs/src/dbusbind.c" at a given position, and > the server replies with a pointer to the (server local) file > "file:///usr/local/src/emacs/src/dbusbind.c". It is up to the client > (eglot), to translate this information into remote file name syntax > "/ssh:user@host:/usr/local/src/emacs/src/dbusbind.c". > > > I suppose for clojure the same spplies. If the LSP server on that remote > host returns something like a (server local) file > "jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj", > it is up to the (eglot) client to recognize this as a pointer to the > remote file at the given location. This problem is not tackled yet by > your jarchive package. > > Best regards, Michael. Thanks for taking the time to explain more. I understand now, and have enough information to re-create this scenario myself. Once I do that I'll see how I can account for this scenario in jarchive. When I do I will post an update. -- Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 10 12:45:32 2022 Received: (at 58790) by debbugs.gnu.org; 10 Dec 2022 17:45:32 +0000 Received: from localhost ([127.0.0.1]:44149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p43um-0001Sl-4S for submit@debbugs.gnu.org; Sat, 10 Dec 2022 12:45:32 -0500 Received: from mout.gmx.net ([212.227.17.20]:35417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p43ui-0001ST-QC for 58790@debbugs.gnu.org; Sat, 10 Dec 2022 12:45:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1670694321; bh=SBFv0AQS448EW/tvKMBVCVhCnmrvCDdx5bKfW9vIjds=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=GsHBdPcmlw9bahwlmN0iPN3vrps0jIm2Gzu0X3ygIMoxMGbn03is0XBtttzjdNFBu Ok3uXvlj2BGDYZ4Jct9Skg/vPh3OZS/bxLZlecYA6iVrJ757NAbUq64EUyq4cjd4Cq gY5+3GJrSCWd93ZhssQ6Eaar+nLgA0yn+U7sUGfpo9wytWDaun2oSCmqzfje0fSbdc YslN6dbaPMkyDj/092fjR+lKzEkAoxpC/AU1hYW7Z8wMv2L4B5x20e1tN2xDDL+f2k pH/bfMcIFBdoqzgtE2uma4o72/ekLju6Mm5D3U7oJQcIQV0foHyAs+PbZZc+EyRl6F 4t3CrEVaz8O8w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.11]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MysW2-1oiQUN1fLW-00vyAr; Sat, 10 Dec 2022 18:45:21 +0100 From: Michael Albinus To: Danny Freeman Subject: Re: bug#58790: Eglot URI parsing bug when using clojure-lsp server In-Reply-To: <87fsdntbpd.fsf@dfreeman.email> (Danny Freeman's message of "Sat, 10 Dec 2022 12:21:18 -0500") References: <87k042tqze.fsf@dfreeman.email> <87fseqtpiu.fsf@dfreeman.email> <875yfm8lzf.fsf@gmail.com> <83wn82osoo.fsf@gnu.org> <871qq8xfzr.fsf@gmx.de> <87mt8uwo2q.fsf@dfreeman.email> <87zgcs6nvb.fsf@gmx.de> <87r0y3luad.fsf@dfreeman.email> <87iljf72ua.fsf@gmx.de> <87a64qykcf.fsf@gmx.de> <87v8nejy32.fsf@dfreeman.email> <87o7sl6awm.fsf@gmx.de> <87h6y7uioy.fsf@dfreeman.email> <87wn72ovn1.fsf@gmx.de> <87cz8tvh9q.fsf@dfreeman.email> <87h6y4pnqu.fsf@gmx.de> <87fsdntbpd.fsf@dfreeman.email> Date: Sat, 10 Dec 2022 18:45:20 +0100 Message-ID: <878rjf6tlb.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:pOUZ2FoKBeK4Dn04JctaRmazJ3mK/SurGS6j0qwB80K1MkZtyo2 2IRRNd8JmPfrQttSTAI4xWyjM80ZFKrDp9DG3aDdCVRUPftkWD3dkdhtBUXjtwwjw/esrPI Xe3IJuBF2Wsww4C3FJbjxQZS8r2YmH4k0tXfQ1G6VxVU9CJ9A+v89fuOBUA876euvdlyCH+ j/4kW0uM8EYI/b0y44qaA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:yg8ijQTIfBc=;Pbjvj/Qy/vHRX+W9STl53xvpEaU Kq9iz8K6kCEpe9nuiHJLme6/0vOpFBStSlB7kcXFzjZFuEInYq1ns7CRYw3QWIAHHawQzfhtC dNKLAw/FqyUb0FQDAEJ3dAQL6eNhfqMGQP8tLs2t7XyA6/ngDxkgnhLFY5k8XQdvm2qIks7ZE mKqjNrLv/T6rtoVHh15H2LFtR8kpHOuDvo1LtidCwDbfdoHmYEF0suguGhR/xQCEi6pZH9dRW djFz2+NgqDILKCHyYgvsc6Dbb6F7Lt8W8YtEfzHdUphqy4NhFxxUiVftv6Pm2KxiC5MdVbHv/ I8N7jhYTA4+KesfWLHLwx8zjNnrX5NmIf/X94Maxw6ArEQJTJ0R9oamktb/Jbn+LnWw0OTMan Hh58qyA6oGFxHZqT08sn3g9axxxmOec1Ciho/7dkIQsM/I2P5Ora9MTTHIA3OqNzx6AzNPtPr Vg8hFqORZrgcVblP6wrqQKMPb04iu4z2/bgwRfNxef0gdXfirf+KdgEzfEB8gWdHNK9OvLeTu r6lXW5I0wVRXzGIGb20gQxDoZOtUyza4X0F79xqPY4VfVi7aDLbHG/9FqtgqTWOrDQ2AyQyFV AhPVLZpsAt1LRQJpxFRdFd4va2Z1FZtu4NrOTfg8u2MsFX9j09z1GqEXdqa5CqVAOHefDJXaT ADooOo9LrpukYL4MQn9g0RkYrWzmDvQy2PrlqNRjRFEZfFAFYF3ch5b5/UE2u3VDoHy0Pi4Yw h3XtxM177QcB+y0cN5+PdXdYED2kKn72mG+nXQEGlH+YhvvOnNETuFnLYYQiIdUU7KQ0ecMsl fEQ55qMxBQIJxOQ+9bXt1gFdTvBqsXgtkE/rSzJQyvJULpewsasxlN46FLAvBHvBMiOeyscNa Y+X+W6BavSPSDE1XXmzpdth1QVTwWJYjr3/8XyIxDhrbXBcroFxiqeOezvHKzjJbJpxGz8oNY tzjEqA== Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 58790 Cc: Felician Nemeth , 58790@debbugs.gnu.org, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Dmitry Gutov , Eli Zaretskii , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Danny Freeman writes: Hi Danny, > Thanks for taking the time to explain more. I understand now, and have > enough information to re-create this scenario myself. Once I do that > I'll see how I can account for this scenario in jarchive. When I do I > will post an update. Just some random thoughts. In jarchive, I believe you have two options: - Use tramp-archive. This is restricted to local GNU/Linux systems(*), but it shall work out of the box. If you have a local jar archive, just map the file name to something like jar:file:///home/albinus/.m2/repository/org/clojure/clojure/1.10.3/cloju= re-1.10.3.jar!/clojure/core.clj =3D> /home/albinus/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.1= 0.3.jar/clojure/core.clj Try it out, it will work out of the box :-) If the jar archive is located on a remote host, say /ssh:user@host:, just prepend that remote file name location: /ssh:user@host:/home/albinus/.m2/repository/org/clojure/clojure/1.10.3/c= lojure-1.10.3.jar/clojure/core.clj Try it out, it will work out of the box :-) - Use jarchive as it is, but on a local cop< if it is located on a remote host. If the jarchive is located on, /ssh:user@host:, copy it locally: (copy-file "/ssh:user@host:/home/albinus/.m2/repository/org/clojure/cloj= ure/1.10.3/clojure-1.10.3.jar" "/tmp/home_albinus_.m2_repository_org_clojure_clojure_1.10.3_c= lojure-1.10.3.jar" Let your jarchive file name handler run on this temp file /tmp/home_albi= nus_.m2_repository_org_clojure_clojure_1.10.3_clojure-1.10.3.jar!/clojure/= core.clj (*): There are plans to integrate libarchive(3) natively into Emacs. Then this would work on all systems. Best regards, Michael. From unknown Sun Jun 22 17:11:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 08 Jan 2023 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator