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#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows Date: Wed, 23 Nov 2022 12:51:37 +0000 Message-ID: References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> <87o7t5wlby.fsf@gmail.com> <87bkp5xl6f.fsf@dfreeman.email> <83edu0d9dg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d75e6305ee22bbd4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4430"; mail-complaints-to="usenet@ciao.gmane.io" Cc: arash@gnu.org, arstoffel@gmail.com, Danny Freeman , 59338@debbugs.gnu.org To: Eli Zaretskii , Richard Copley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 23 13:51:11 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 1oxpDa-0000sk-Fh for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Nov 2022 13:51:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxpDU-0008Qu-JO; Wed, 23 Nov 2022 07:51:04 -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 1oxpDT-0008Qe-A8 for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 07:51: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 1oxpDT-0002s0-1P for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 07:51:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oxpDS-0004R5-T5 for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 07:51: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, 23 Nov 2022 12:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59338 X-GNU-PR-Package: emacs Original-Received: via spool by 59338-submit@debbugs.gnu.org id=B59338.166920784016981 (code B ref 59338); Wed, 23 Nov 2022 12:51:02 +0000 Original-Received: (at 59338) by debbugs.gnu.org; 23 Nov 2022 12:50:40 +0000 Original-Received: from localhost ([127.0.0.1]:54092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxpD5-0004Po-DQ for submit@debbugs.gnu.org; Wed, 23 Nov 2022 07:50:39 -0500 Original-Received: from mail-oa1-f51.google.com ([209.85.160.51]:34442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxpD2-0004Pa-V5 for 59338@debbugs.gnu.org; Wed, 23 Nov 2022 07:50:38 -0500 Original-Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-14263779059so19843094fac.1 for <59338@debbugs.gnu.org>; Wed, 23 Nov 2022 04:50: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=rPPfvHN7jPi51Gdr5+yUnljyYdIcz5MZUJ243RrFYbc=; b=cxwhPEK3L5Vwwpa66C69oKuU/GdHO7ibMfzgWujHtRBFJPNhxjcvyaT70QSudAmd8N sHednsiq7pEVK6xDxqCiJFeNiW6ofZBjeE9Lm1KgFPxnnEbabrdp2qWl1nMronpeaQ7Y 1tA3aIf1ynbghHecjIZaC3f86/4t6tmnmKE3/b42P+ZnIoGYcRiKM9G15dJZHzlcetEj VYWGtHcof3M09HkjVD6ayS91JuWOQ+NqBpamnx8NimAhZgK5Tmw7WWfqcKBynITkeCP/ bjuimykQCuiBwmLxD/tluhjR1j07lV1YBoCyT9hn8/myhVeZX4Qjk5MwZfZkDQuPa6te vJxw== 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=rPPfvHN7jPi51Gdr5+yUnljyYdIcz5MZUJ243RrFYbc=; b=1NdH78vNqvxwOB4RLWTYGQHHkLoxa2dW/TZ08rSdG7QKNhJ04uOho8Ybj5DdK0cux0 ErVBjZne3Xap26obFTX7k+nKh8fwgMle51UgFh8GnorDmhTNQM6i+EAWwVZ0sS7JgUee JxJ/OKOWJcvZZHR70YeB/ts9lrZV6i0EcVSpwHw4NK9GLt3JkvqE/m6QAitVDKmhjiXZ 5GOSj82eaC6hHiJXBPJNjqOSif/laeNrRWd3pAlxXG4ZrB6oKXmoURNFryPOUn/+vSIt X7ZhpkgJ+JA4/k031rzIcKEV/eK0aB9L/J+3VbLmu3ct6W1DPW9fy4daxozfMKpbizLh 2oNw== X-Gm-Message-State: ANoB5pmDfRm4/DJG+4pQzXrnfTuNTLwpo1tbtMx9fuU2Nwp4XYK7z9jk 57dZ0umIXKfEjzQQJHUtFsb5UWhlWo9aLwRuX9Y= X-Google-Smtp-Source: AA0mqf4CqG1AttAO2hmvCa+rMswGqbVPnT4AcJ84D3NjAPOk3dekHLmXjZcadWc8PhEG0+fcx9Utzb1G4M97TnO/vBE= X-Received: by 2002:a05:6870:6688:b0:13b:5ffe:ff70 with SMTP id ge8-20020a056870668800b0013b5ffeff70mr17690315oab.171.1669207831304; Wed, 23 Nov 2022 04:50:31 -0800 (PST) In-Reply-To: <83edu0d9dg.fsf@gnu.org> 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:248736 Archived-At: --000000000000d75e6305ee22bbd4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I just found out this bug was ongoing. Eli, if you're proposing to fix url-parse.el to not be fooled by windows file names, then I support that idea, and I think it's the correct thing to do. But.... we still need the eglot.el kludge installed because url-parse.el is not distributed as an ELPA package and Eglot is. So users of Emacs < 29 would not receive the fix and would have their WIndows Eglot broken. Jo=C3=A3o On Fri, Nov 18, 2022 at 7:13 AM Eli Zaretskii wrote: > > From: Danny Freeman > > Cc: Eli Zaretskii , Arash Esbati , > > 59338@debbugs.gnu.org, bug-gnu-emacs@gnu.org > > Date: Thu, 17 Nov 2022 17:27:40 -0500 > > > > Is there something we can do to detect a windows path > > You mean, a Windows-style file name? You can detect that, but it is > easier to test system-type instead: these file names cannot happen on > any system except Windows, and if they do happen, they don't have the > same semantics (i.e., "d:/foo/bar" is NOT an absolute file name on > Posix systems). > > Or maybe I don't understand the purpose of the test you have in mind? > > > and continue treating it as a path like we were before this change? > > I'd advise against such kludges. If a function wants a file:// URL, > it should receive a valid file:// URL on all systems, and it should be > capable of handling file:// URLs on MS-Windows as well as on Posix > systems. Likewise with functions which produce file:// URLs. Letting > local file names into this is a clear path to future bugs, because > many people will not realize this subtlety, and will think they deal > with file:// URLs on all platforms. > > > If there is no function available already, it may be enough to check if > > the return value of `url-type` is not 1 character. Looking at this list > > of what I believe are official URI schemes, all of them have at least > > two characters: > > https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml > > But hosts can have 1-character names (although that is unlikely). > > Anyway, I'm against such kludges, especially since we don't need them > here. We just need to make our functions that handle file:// URLs to > be capable of supporting file:// on MS-Windows. It is not hard to do, > so let's do that. > > > > --=20 Jo=C3=A3o T=C3=A1vora --000000000000d75e6305ee22bbd4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I just found out this bug was ongoing.=C2=A0

Eli, if you're proposing to fix url-parse.el to n= ot be fooled by windows
file names, then I support that idea, and= I think it's the correct
thing to do.
But.... we still need the eglot.el kludge installed because url= -parse.el
is not distributed as an ELPA package and Eglot is= . So users of
Emacs < 29 would not receive the fix and wo= uld have their
WIndows Eglot broken.

Jo= =C3=A3o

On Fri, Nov 18, 2022 at 7:13 AM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Danny Freeman <danny@dfr= eeman.email>
> Cc: Eli Zaretskii <eliz@gnu.org>, Arash Esbati <arash@gnu.org>,
>=C2=A0 59338= @debbugs.gnu.org, bug-gnu-emacs@gnu.org
> Date: Thu, 17 Nov 2022 17:27:40 -0500
>
> Is there something we can do to detect a windows path

You mean, a Windows-style file name?=C2=A0 You can detect that, but it is easier to test system-type instead: these file names cannot happen on
any system except Windows, and if they do happen, they don't have the same semantics (i.e., "d:/foo/bar" is NOT an absolute file name o= n
Posix systems).

Or maybe I don't understand the purpose of the test you have in mind?
> and continue treating it as a path like we were before this change?
I'd advise against such kludges.=C2=A0 If a function wants a file:// UR= L,
it should receive a valid file:// URL on all systems, and it should be
capable of handling file:// URLs on MS-Windows as well as on Posix
systems.=C2=A0 Likewise with functions which produce file:// URLs.=C2=A0 Le= tting
local file names into this is a clear path to future bugs, because
many people will not realize this subtlety, and will think they deal
with file:// URLs on all platforms.

> If there is no function available already, it may be enough to check i= f
> the return value of `url-type` is not 1 character. Looking at this lis= t
> of what I believe are official URI schemes, all of them have at least<= br> > two characters:
> https://www.iana.org/assignments/= uri-schemes/uri-schemes.xhtml

But hosts can have 1-character names (although that is unlikely).

Anyway, I'm against such kludges, especially since we don't need th= em
here.=C2=A0 We just need to make our functions that handle file:// URLs to<= br> be capable of supporting file:// on MS-Windows.=C2=A0 It is not hard to do,=
so let's do that.





--
Jo=C3=A3o T=C3=A1vora
--000000000000d75e6305ee22bbd4--