From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#58790: Eglot URI parsing bug when using clojure-lsp server Date: Wed, 16 Nov 2022 16:20:20 +0000 Message-ID: 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> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000001c3cc005ed98daa4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40327"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Felician Nemeth , Danny Freeman , 58790@debbugs.gnu.org, Stefan Kangas , Dmitry Gutov , Eli Zaretskii To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 16 17:21:23 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ovLAA-000AMh-OO for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Nov 2022 17:21:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovL9r-0003ux-Ti; Wed, 16 Nov 2022 11:21:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovL9r-0003t4-2i for bug-gnu-emacs@gnu.org; Wed, 16 Nov 2022 11:21:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovL9q-0003Iu-Oi for bug-gnu-emacs@gnu.org; Wed, 16 Nov 2022 11:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ovL9q-000761-7E for bug-gnu-emacs@gnu.org; Wed, 16 Nov 2022 11:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Nov 2022 16:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58790 X-GNU-PR-Package: emacs Original-Received: via spool by 58790-submit@debbugs.gnu.org id=B58790.166861565827245 (code B ref 58790); Wed, 16 Nov 2022 16:21:02 +0000 Original-Received: (at 58790) by debbugs.gnu.org; 16 Nov 2022 16:20:58 +0000 Original-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 Original-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 Original-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) In-Reply-To: <87a64qykcf.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248025 Archived-At: --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--