From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows Date: Fri, 18 Nov 2022 09:12:11 +0200 Message-ID: <83edu0d9dg.fsf@gnu.org> References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> <87o7t5wlby.fsf@gmail.com> <87bkp5xl6f.fsf@dfreeman.email> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6974"; mail-complaints-to="usenet@ciao.gmane.io" Cc: arash@gnu.org, arstoffel@gmail.com, 59338@debbugs.gnu.org To: Danny Freeman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 18 08:13:13 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 1ovvYn-0001dP-3j for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Nov 2022 08:13:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovvYi-0002Mk-8x; Fri, 18 Nov 2022 02:13:08 -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 1ovvYe-0002GP-Le for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 02:13:04 -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 1ovvYd-0003Ip-7o for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 02:13:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ovvYc-0003Rg-U9 for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 02:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 07:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59338 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: arash@gnu.org, arstoffel@gmail.com, bug-gnu-emacs@gnu.org, 59338@debbugs.gnu.org Original-Received: via spool by 59338-submit@debbugs.gnu.org id=B59338.166875553913188 (code B ref 59338); Fri, 18 Nov 2022 07:13:02 +0000 Original-Received: (at 59338) by debbugs.gnu.org; 18 Nov 2022 07:12:19 +0000 Original-Received: from localhost ([127.0.0.1]:35078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovvXu-0003Qd-OX for submit@debbugs.gnu.org; Fri, 18 Nov 2022 02:12:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovvXs-0003QD-Cx for 59338@debbugs.gnu.org; Fri, 18 Nov 2022 02:12:16 -0500 Original-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 1ovvXl-0003Eu-Vn; Fri, 18 Nov 2022 02:12:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=bHTB+fCnBHs+CuHsK8cPxav0LdgPxIBlAnwju1eAPPs=; b=ZAsYfZkFx/B6 VsEk1nuKosH258YNCVCcSnFHk5or6015j9ueWYMTZJNBL7jH1+45YS8gYp3Y0iTOs+zojRWJsbN0U k6gpZv5T5IMCsPM241z5VlH76HejO4noj5ReWBzAmsoZDK51kEjUX5TaVCVREw4/RUHLMqQ0g+u36 FKr9HtD7SWWORmbcQjW7KoIiDODpXDJXtPhKYomGzCT/Y9l+xMQuyjp6qgdq4mwjyf+t+bjzCkkAb PsYG5ToVpJ70ZyXgtt3WC4vzNMH+Yfvagy2JqvoTRs1972jX34CqnwxmGhJFoskVTjS1Kk8c2snoF YK6lXFdG9e2UKFeWrV9GnA==; Original-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 1ovvXl-0002JG-29; Fri, 18 Nov 2022 02:12:09 -0500 In-Reply-To: <87bkp5xl6f.fsf@dfreeman.email> (message from Danny Freeman on Thu, 17 Nov 2022 17:27:40 -0500) 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:248169 Archived-At: > 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.