From unknown Sun Aug 10 07:31:29 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#59338 <59338@debbugs.gnu.org> To: bug#59338 <59338@debbugs.gnu.org> Subject: Status: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows Reply-To: bug#59338 <59338@debbugs.gnu.org> Date: Sun, 10 Aug 2025 14:31:29 +0000 retitle 59338 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows reassign 59338 emacs submitter 59338 Arash Esbati severity 59338 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 17 11:51:33 2022 Received: (at submit) by debbugs.gnu.org; 17 Nov 2022 16:51:34 +0000 Received: from localhost ([127.0.0.1]:34149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovi6v-0004D6-II for submit@debbugs.gnu.org; Thu, 17 Nov 2022 11:51:33 -0500 Received: from lists.gnu.org ([209.51.188.17]:43830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovi6s-0004Cx-PV for submit@debbugs.gnu.org; Thu, 17 Nov 2022 11:51:32 -0500 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 1ovi6s-0000KS-9Q for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 11:51:30 -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 1ovi6q-0006qK-Qa for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 11:51:30 -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:Subject:To:From:in-reply-to: references; bh=/S/7Pop3JL5xGi2RbtKR6ALQAtLc3MfjmsrP7I11nHE=; b=VHTvhuajZRQ1IC 1JZ7fK+WYzuXM8weizhcQm/GY/FobPrL3NIhpA6PJT/jcxWhixjvoPLDPr3IpXYwngH+6TOGQe4fQ W3mG6sPB1hzXJrRcZarjkPhlLfAC/uEHNsY2EGl7jKV9Tmzb1mfI/7x2FWrcNn4/n8YZS63xAsel7 0MmVtn7/H3/CE9q8ASCFvpV0SmCfdIDWqkOTs5igoHZIF/Eq/OPc9c6mkrUr7Km9nddiWtaiJkSsp oXX5GA8AfRVzmO8xiNo4+9WTLoAIImQGXO6Xrd+Cnrk+lqzbIvelVWpNWO1aU3/7pn0BxgXMma5kA MhPPVuGcZtLGXKb0tLRA==; 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 1ovi6b-0007Hw-E7 for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 11:51:27 -0500 From: Arash Esbati To: emacs-bugs Subject: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows Date: Thu, 17 Nov 2022 17:51:01 +0100 Message-ID: <86bkp5y16y.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit 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 (---) Hi all, the commit 1a2d603bb3 was supposed to fix bug#58790, but it introduces (or possibly surfaces) another one. With Emacs (checkout c3b64985aa), eval'ing the next 2 forms returned an URI: (require 'eglot) (insert "\n" (format "%s" (eglot--path-to-uri "d:/digestif-test/tikz-test.tex"))) => file:///d%3A/digestif-test/tikz-test.tex With Emacs 623db40d, it looks like this: (require 'eglot) (insert "\n" (format "%s" (eglot--path-to-uri "d:/digestif-test/tikz-test.tex"))) => d:/digestif-test/tikz-test.tex I think the underlying problem is with the return value of `url-generic-parse-url', but I'm not familiar enough with it to make a judgement. As the result, digestif-LSP doesn't work with the current Eglot on Windows -- checkout c3b64985aa does. This is with: In GNU Emacs 29.0.50 (build 1, x86_64-w64-mingw32) of 2022-11-17 Repository revision: 623db40dd1cd21623c5cecdc0abbf3ce885f92b1 Repository branch: master System Description: Microsoft Windows 10 Pro Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 17 12:06:45 2022 Received: (at 59338) by debbugs.gnu.org; 17 Nov 2022 17:06:45 +0000 Received: from localhost ([127.0.0.1]:34193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oviLc-0004bd-SM for submit@debbugs.gnu.org; Thu, 17 Nov 2022 12:06:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oviLY-0004bL-AF for 59338@debbugs.gnu.org; Thu, 17 Nov 2022 12:06:43 -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 1oviLT-0001fd-3R for 59338@debbugs.gnu.org; Thu, 17 Nov 2022 12:06:35 -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=V70cAphdH70+RDIplTc1LKMx7cXXBz8SdS6uVjwEbC0=; b=HLr8N9UNfXUO J+yN/GPHghRwfJQyDPeKF/ojVvItTKXmMQXPysUMlxu+d2wZBV0uB3fF3NTzAla1IXD15NJZy7VcO HAM7ryPa2wcwDEr5BzhgdZNnUeYV01cvZL59UySlJr5i9N6yT30HdT+i2E/z9b9f5lB1Vf+mMBfM9 mlgBaBrQtDrulD95RJdD1zZ76T1wNJ93BCOqCAKiB4OYwnYIRH1VAbSsN0mrWqFjOH6iiixAGkcY0 gvEYH7/McZD9u0cluTcc6gtu5cwKgrDmd3Oec/BG+sVowggQmb2fcWYENIae49KPKRDudI4PWcuzu JUNpxZNGcdfkrc2nK/Y+rg==; 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 1oviLS-0006Ob-CV; Thu, 17 Nov 2022 12:06:34 -0500 Date: Thu, 17 Nov 2022 19:06:36 +0200 Message-Id: <83r0y1cxyb.fsf@gnu.org> From: Eli Zaretskii To: Arash Esbati In-Reply-To: <86bkp5y16y.fsf@gnu.org> (message from Arash Esbati on Thu, 17 Nov 2022 17:51:01 +0100) Subject: Re: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows References: <86bkp5y16y.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59338 Cc: 59338@debbugs.gnu.org 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: Arash Esbati > Date: Thu, 17 Nov 2022 17:51:01 +0100 > > the commit 1a2d603bb3 was supposed to fix bug#58790, but it introduces > (or possibly surfaces) another one. With Emacs (checkout c3b64985aa), > eval'ing the next 2 forms returned an URI: > > (require 'eglot) > (insert "\n" (format "%s" (eglot--path-to-uri > "d:/digestif-test/tikz-test.tex"))) > => file:///d%3A/digestif-test/tikz-test.tex > > With Emacs 623db40d, it looks like this: > > (require 'eglot) > (insert "\n" (format "%s" (eglot--path-to-uri > "d:/digestif-test/tikz-test.tex"))) > => d:/digestif-test/tikz-test.tex Both are wrong, right? The correct URL should AFAIU be file:///d:/digestif-test/tikz-test.tex IOW, the problem is that the URL is being run through url-encode-url, which doesn't support file:// URLs on Windows properly. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 17 12:19:10 2022 Received: (at 59338) by debbugs.gnu.org; 17 Nov 2022 17:19:10 +0000 Received: from localhost ([127.0.0.1]:34213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oviXe-0004ub-AG for submit@debbugs.gnu.org; Thu, 17 Nov 2022 12:19:10 -0500 Received: from mail-qk1-f174.google.com ([209.85.222.174]:38757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oviXZ-0004u1-1L for 59338@debbugs.gnu.org; Thu, 17 Nov 2022 12:19:09 -0500 Received: by mail-qk1-f174.google.com with SMTP id s20so1655705qkg.5 for <59338@debbugs.gnu.org>; Thu, 17 Nov 2022 09:19:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=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=i3Dlvno3m5h+d4I1OZhmbpFUBMFcp/FCC2OdmT2z4HU=; b=LipZ/O1LgfSVm23PbUzZ9kn/95WFDsVRGhGfpAWJAanqjUR1jFWhnSUbOh4sJHN7eW Jclwvizqb+J6pXiRehGH/SpkK4ZG+hknON/E27blYIDdtSktkux9IFWS1AIqnXRG1szt RJHtzryCfGcgm7K6UsO6Xm24hh4dqLJvudWQ/Pc9zi/dNWy0r2DQQntDT+0w7ejkLX2B iS+VubyOhekznmqP9DEBi7sZopcZ+yU+eVZnM62K4dCw3IrgEJchAgHPF8ZJX+7ICGa3 p7egzb6BufAv0owE7x7tdYqcjrHFHFrdcV2pCXluBmsUERtM8a6iIWDdDE40o4kEaZB+ yzBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=i3Dlvno3m5h+d4I1OZhmbpFUBMFcp/FCC2OdmT2z4HU=; b=HcXxICToWMiUsQ3jVakQwj1huN+PWYbH6EnnriWPniBDbH+gxfyd/b09IhgnZtedJJ 8pO4OLXGkcBlZRAcKFMRfCDbCYq+aOc9gbnJh+jCqpR9SNXMMOmkvSkmKM6J3/3n6er7 3GMzZP6YwSnbtP+QXLE4/+pvSkxzNmrFO5uXi2kvtzCika5a1cwOUL4YFkT/97pPW7UP ObsKuDXV1ITgdcFsMbJnJBxIYl84jRqVKIicfJmjdpbpjrX73frCfAQqE+fYuvjF4g7N MJ3jADz51G8st28k3/zIn96LH7zcXHjz98G/JMJATB+xHlt+drYJUHXXkbSyfyC61WM/ xqrw== X-Gm-Message-State: ANoB5pmsltPQnwUcLihgFOn9+c7AZzv47Pa1bHTIr42BtZFIbz1K2g0Z pgoV3P94U/V2LWotoW3G4/rpGIyo2L8= X-Google-Smtp-Source: AA0mqf7I7+EpNNjCWZeWgVEdlUuhO4ZIJm5IuL/bpgbO+VEKhNQWTHI6ARJgrxwkaZAEg0pRvjW64w== X-Received: by 2002:a05:620a:22d6:b0:6fa:2cb5:8b4b with SMTP id o22-20020a05620a22d600b006fa2cb58b4bmr2504761qki.348.1668705539016; Thu, 17 Nov 2022 09:18:59 -0800 (PST) Received: from ars3 (natp-128-119-202-106.wireless.umass.edu. [128.119.202.106]) by smtp.gmail.com with ESMTPSA id m14-20020ac85b0e000000b003a591194221sm709955qtw.7.2022.11.17.09.18.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 09:18:58 -0800 (PST) From: Augusto Stoffel To: Eli Zaretskii Subject: Re: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows In-Reply-To: <83r0y1cxyb.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 17 Nov 2022 19:06:36 +0200") References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> Date: Thu, 17 Nov 2022 12:18:57 -0500 Message-ID: <87o7t5wlby.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59338 Cc: Arash Esbati , 59338@debbugs.gnu.org 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 Thu, 17 Nov 2022 at 19:06, Eli Zaretskii wrote: > Both are wrong, right? The correct URL should AFAIU be > > file:///d:/digestif-test/tikz-test.tex > > IOW, the problem is that the URL is being run through url-encode-url, > which doesn't support file:// URLs on Windows properly. While we are at it, note that (url-filename (url-generic-parse-url "file:///d:/digestif-test/tikz-test.tex")) => "/d:/digestif-test/tikz-test.tex" is not the right file name under Windows. Eglot treats this special case correctly, but every package that deals with file URLs has to repeat the work. So there should be a helper function in Emacs for this. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 17 17:33:52 2022 Received: (at 59338) by debbugs.gnu.org; 17 Nov 2022 22:33:52 +0000 Received: from localhost ([127.0.0.1]:34573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovnSB-0006dD-Pt for submit@debbugs.gnu.org; Thu, 17 Nov 2022 17:33:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovnS6-0006cv-B7 for 59338@debbugs.gnu.org; Thu, 17 Nov 2022 17:33:50 -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 1ovnS0-00047x-Vl for 59338@debbugs.gnu.org; Thu, 17 Nov 2022 17:33: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:Date:References:In-Reply-To:Subject:To: From; bh=uu6EMUQJjOxQ5hwKDZ2nSQPds0e3cSUVkTeS58s45Kk=; b=L6AJ0aQCKPYP7hUG0W4S fQq9Wer/KHdDJBiNCg3eKTImdahPaPDXtG6vGZVd+AQUFyIAMjFf6OHaJ3pP6rNha912aQRsLll0e HgbBc2kIpE8YmBcDLOkZ1cBTXZiIoU/g3b7XoTQJOBr884jsnxGU71ig4yQJrk5wKTtn9GXl8DgRT s1c4mVBCzL2sxt6XiQGQC1XdO/5qBm6lATmIMCq44E+r3iVTO3bx91mBby94mU/HSWaRNmKG2neB4 PLK/91BUX192OuZPAoS+p3/3VJ2IEcvJkwAR4htJarYSmOmwGjTxUmZ3BOT9h8AweHKh5w2YkfXGn kEo2edP1TO+jsw==; 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 1ovnS0-0006D8-Ev; Thu, 17 Nov 2022 17:33:40 -0500 From: Arash Esbati To: Eli Zaretskii Subject: Re: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows In-Reply-To: <83r0y1cxyb.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 17 Nov 2022 19:06:36 +0200") References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> Date: Thu, 17 Nov 2022 23:33:24 +0100 Message-ID: <8635ah8b4b.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59338 Cc: 59338@debbugs.gnu.org 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 (---) Eli Zaretskii writes: > Both are wrong, right? The correct URL should AFAIU be > > file:///d:/digestif-test/tikz-test.tex Yes, this is also my understanding, after having a closer look. > IOW, the problem is that the URL is being run through url-encode-url, > which doesn't support file:// URLs on Windows properly. As a note, texlab LSP-server still works with this version: => d:/digestif-test/tikz-test.tex and digestif LSP-server accepts this version: => file:///d%3A/digestif-test/tikz-test.tex Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 17 17:37:10 2022 Received: (at submit) by debbugs.gnu.org; 17 Nov 2022 22:37:10 +0000 Received: from localhost ([127.0.0.1]:34580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovnVN-0006ib-QP for submit@debbugs.gnu.org; Thu, 17 Nov 2022 17:37:10 -0500 Received: from lists.gnu.org ([209.51.188.17]:40006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovnVL-0006iT-Mh for submit@debbugs.gnu.org; Thu, 17 Nov 2022 17:37:08 -0500 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 1ovnVK-0005kt-Vd for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 17:37:06 -0500 Received: from out0.migadu.com ([2001:41d0:2:267::]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovnVI-0004ie-C9; Thu, 17 Nov 2022 17:37:06 -0500 References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> <87o7t5wlby.fsf@gmail.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668724621; 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=BEuog3jDnOyJDRqoqFrjQLqtlJ/CQCS9drG3hAP3uFA=; b=rOXb/RRxwx0qLu1Mj8Vg8K9copMd3rSA1Hicl02VL5nwQ8KDcLcsyHCX5eT4Y/lmFJPTlp X+hY+pXFmpIHAFHgSOwHVRMGpuiQpMe6K1sL5I070eWclaLUj3IGUbQSgFBuVLQeIaBfRS x2ytKxYC4uYacJ9wlTZ7F8AyJPeJtQY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Danny Freeman To: Augusto Stoffel Subject: Re: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows Date: Thu, 17 Nov 2022 17:27:40 -0500 In-reply-to: <87o7t5wlby.fsf@gmail.com> Message-ID: <87bkp5xl6f.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:2:267::; 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 Cc: Eli Zaretskii , bug-gnu-emacs@gnu.org, Arash Esbati , 59338@debbugs.gnu.org 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 (--) Augusto Stoffel writes: > On Thu, 17 Nov 2022 at 19:06, Eli Zaretskii wrote: > >> Both are wrong, right? The correct URL should AFAIU be >> >> file:///d:/digestif-test/tikz-test.tex >> >> IOW, the problem is that the URL is being run through url-encode-url, >> which doesn't support file:// URLs on Windows properly. > > While we are at it, note that > > (url-filename > (url-generic-parse-url "file:///d:/digestif-test/tikz-test.tex")) > => "/d:/digestif-test/tikz-test.tex" > > is not the right file name under Windows. Eglot treats this special > case correctly, but every package that deals with file URLs has to > repeat the work. So there should be a helper function in Emacs for > this. With the original problem: we're now getting a false positive in eglot when checking for URLs being passed to `eglot--path-to-uri` when the path is a windows path. Is there something we can do to detect a windows path and continue treating it as a path like we were before this change? ``` (defun eglot--path-to-uri (path) "URIfy PATH." (let ((truepath (file-truename path))) (if (and (url-type (url-generic-parse-url truepath)) (NOT_WINDOWS_PATH truepath) ;; what would this be? ) ;; ... blah blah blah ``` 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 -- Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 17 18:12:15 2022 Received: (at submit) by debbugs.gnu.org; 17 Nov 2022 23:12:15 +0000 Received: from localhost ([127.0.0.1]:34612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovo3L-0007hH-GW for submit@debbugs.gnu.org; Thu, 17 Nov 2022 18:12:15 -0500 Received: from lists.gnu.org ([209.51.188.17]:56194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovo3I-0007gs-D0 for submit@debbugs.gnu.org; Thu, 17 Nov 2022 18:12:14 -0500 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 1ovo3I-0000Fn-8i for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 18:12:12 -0500 Received: from mail-qk1-x730.google.com ([2607:f8b0:4864:20::730]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovo3F-00059v-B7; Thu, 17 Nov 2022 18:12:12 -0500 Received: by mail-qk1-x730.google.com with SMTP id k2so2350340qkk.7; Thu, 17 Nov 2022 15:12:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=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=2/vp0+gz9gMKrI5oJ2m9vU39fLhxWMtlTDnav4FBM9o=; b=Sv0gLA1608N7ed0XXMlRKx16cNef0jc19CQMvaRcmS/5esZyt+7gtHVomVn8oB3oRf qmwKTdL7Y+uSYLsKcjNyKbfRnH8fLjikE0VyaHGQgolpGVQPsJCPQ9yTifJBc1nLsy/W UTlTHUATSjB0broXq76IHIRTqcQcv2jHw60m1I/F0L4zG1YccioU6vy7DsjVxK5g0ysD CskOBfnkf9MOc5lPIxjO6uvTyOHZbuocVyJwfCaJsBjWspj+9WW8XKw4D9JM1Nxj1R7V heoCGLj9AJIpg7tCXfr14I2uoYZdyZePfsVPNY04keNpujephpeFaGaNv+/+hi5w0Obb YAjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=2/vp0+gz9gMKrI5oJ2m9vU39fLhxWMtlTDnav4FBM9o=; b=EX72W6ctByODkvwkNkwZLCXkfdlUI4zh3JP8aFFqxZnqFVx8gxxYpP/7Nu+7+1Zo2T 0a73Kea+6dwKk1iYVfwL8t0kWqIeKfNmySxw6hdP2ouxzDade4DRDKDoQgBFHoKcSAm6 /QXt+JkoUc8mz3UeGKt+JRTSdc3FubrivC4oA3HcsDKiwjDvRvw1FZ6NVtnnplduTxe5 p8f+GE6cTt2plFZt5S/JHq/zhoCOSi74DvHkI8O5E/lUYQIBLFsgLrqZvVlcr9me8goO oZdwXzFCt7csl9eMk2e/5aCztogqD34JrFZ+pS//o5FD6UV8gdtuicb8ZO7hBX6wZEpI 7dLA== X-Gm-Message-State: ANoB5pnS7i/ufENohPF0Z2IFSi+SmVca5OkkAKSzPLzuv/iAc+OXWi/h 9GzHZZ9ONlRLYrXMYRWQOCRhpofKiROhew== X-Google-Smtp-Source: AA0mqf5xk+ZzhtdlqlUnALnxJyrDTx7g8ytgLJBRXK7AdESIrjUp+2cgVGrfzGV4kp6UBpxIKaZ+6Q== X-Received: by 2002:a37:58a:0:b0:6fa:d64:c018 with SMTP id 132-20020a37058a000000b006fa0d64c018mr3832998qkf.145.1668726727138; Thu, 17 Nov 2022 15:12:07 -0800 (PST) Received: from ars3 (natp-128-119-202-126.wireless.umass.edu. [128.119.202.126]) by smtp.gmail.com with ESMTPSA id bq23-20020a05622a1c1700b0039467aadeb8sm1077094qtb.13.2022.11.17.15.12.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 15:12:06 -0800 (PST) From: Augusto Stoffel To: Danny Freeman Subject: Re: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows In-Reply-To: <87bkp5xl6f.fsf@dfreeman.email> (Danny Freeman's message of "Thu, 17 Nov 2022 17:27:40 -0500") References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> <87o7t5wlby.fsf@gmail.com> <87bkp5xl6f.fsf@dfreeman.email> Date: Thu, 17 Nov 2022 18:12:05 -0500 Message-ID: <87fsehw4ze.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::730; envelope-from=arstoffel@gmail.com; helo=mail-qk1-x730.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Eli Zaretskii , bug-gnu-emacs@gnu.org, Arash Esbati , 59338@debbugs.gnu.org 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 Thu, 17 Nov 2022 at 17:27, Danny Freeman wrote: > ``` > (defun eglot--path-to-uri (path) > "URIfy PATH." > (let ((truepath (file-truename path))) > (if (and (url-type (url-generic-parse-url truepath)) > (NOT_WINDOWS_PATH truepath) ;; what would this be? > ) > ;; ... blah blah blah > ``` > > 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 I think that makes sense. I find the above logic a bit funny, though. What do you expect `truepath' to look like if `path' is actually an URI? Shouldn't `path' be returned unchanged? I also think that calling `url-generic-parse-url' might be overkill here. Based on https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax I would just test if `path' matches "\\`[A-Za-z][+.0-9A-Za-z-]+:". From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 18 02:12:15 2022 Received: (at submit) by debbugs.gnu.org; 18 Nov 2022 07:12:15 +0000 Received: from localhost ([127.0.0.1]:35074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovvXr-0003QN-BH for submit@debbugs.gnu.org; Fri, 18 Nov 2022 02:12:15 -0500 Received: from lists.gnu.org ([209.51.188.17]:39002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovvXn-0003QE-Km for submit@debbugs.gnu.org; Fri, 18 Nov 2022 02:12:14 -0500 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 1ovvXn-0000RR-DJ for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 02:12:11 -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 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==; 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 Date: Fri, 18 Nov 2022 09:12:11 +0200 Message-Id: <83edu0d9dg.fsf@gnu.org> From: Eli Zaretskii To: Danny Freeman In-Reply-To: <87bkp5xl6f.fsf@dfreeman.email> (message from Danny Freeman on Thu, 17 Nov 2022 17:27:40 -0500) Subject: Re: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> <87o7t5wlby.fsf@gmail.com> <87bkp5xl6f.fsf@dfreeman.email> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: arash@gnu.org, arstoffel@gmail.com, bug-gnu-emacs@gnu.org, 59338@debbugs.gnu.org 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: 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. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 18 02:14:19 2022 Received: (at submit) by debbugs.gnu.org; 18 Nov 2022 07:14:19 +0000 Received: from localhost ([127.0.0.1]:35084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovvZr-0003Tk-GL for submit@debbugs.gnu.org; Fri, 18 Nov 2022 02:14:19 -0500 Received: from lists.gnu.org ([209.51.188.17]:48184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovvZp-0003Tc-Nb for submit@debbugs.gnu.org; Fri, 18 Nov 2022 02:14:18 -0500 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 1ovvZn-0003eP-Gw for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 02:14:16 -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 1ovvZn-0003UK-79; Fri, 18 Nov 2022 02:14:15 -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=oL5LII4gO/c5QlFGo+Cjf1EFgSXE22q8xXJzONAu3MY=; b=GgHInhxDmh7G ziAuKhZt+GhflSuwL+tNRJhUkSCTWVQVgptKm1YTQV3mzjG8xf5DXnX1tExYJH1jUFZUdiBt5EvPN IaOy0sETQj7Mm6EHC4cp7imgohsObpmdZM7l714CsvtYAHZopUbzP16rhHkptg4Iq+V8E67wmWV9b LA/GAg7v3SGNIO8VigXyBiv8q0bzflg3N1aCb88XZq56JqWGZZWZ+9ghv3einzE6ExfEUlG8iNRfc Blt6e5mfDf9Ug0Au2mFE6Q20h/KpnfDymN/fjH+lsOiIG9aBr/LtIZzewjLoZvxCeVPAObbsBbWX9 wUNQdd5YkrMfKjvmwmC4oQ==; 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 1ovvZm-0002c4-IL; Fri, 18 Nov 2022 02:14:14 -0500 Date: Fri, 18 Nov 2022 09:14:18 +0200 Message-Id: <83cz9kd99x.fsf@gnu.org> From: Eli Zaretskii To: Augusto Stoffel In-Reply-To: <87fsehw4ze.fsf@gmail.com> (message from Augusto Stoffel on Thu, 17 Nov 2022 18:12:05 -0500) Subject: Re: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> <87o7t5wlby.fsf@gmail.com> <87bkp5xl6f.fsf@dfreeman.email> <87fsehw4ze.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: arash@gnu.org, bug-gnu-emacs@gnu.org, danny@dfreeman.email, 59338@debbugs.gnu.org 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: Augusto Stoffel > Cc: Eli Zaretskii , Arash Esbati , > 59338@debbugs.gnu.org, bug-gnu-emacs@gnu.org > Date: Thu, 17 Nov 2022 18:12:05 -0500 > > On Thu, 17 Nov 2022 at 17:27, Danny Freeman wrote: > > I also think that calling `url-generic-parse-url' might be overkill > here. Based on > https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax I would > just test if `path' matches "\\`[A-Za-z][+.0-9A-Za-z-]+:". Not sure I understand why this matters in the context of this discussion. We need to make eglot--path-to-uri produce valid file:// URL on MS-Windows and on Posix systems, right? Then why does it matter how URI schema are defined? What am I missing? From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 18 08:45:32 2022 Received: (at submit) by debbugs.gnu.org; 18 Nov 2022 13:45:32 +0000 Received: from localhost ([127.0.0.1]:35807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow1gS-000662-9n for submit@debbugs.gnu.org; Fri, 18 Nov 2022 08:45:32 -0500 Received: from lists.gnu.org ([209.51.188.17]:38240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow1gR-00065u-1g for submit@debbugs.gnu.org; Fri, 18 Nov 2022 08:45:31 -0500 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 1ow1gQ-0000yU-PZ for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 08:45:30 -0500 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 1ow1gO-0003VS-8T; Fri, 18 Nov 2022 08:45:30 -0500 References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> <87o7t5wlby.fsf@gmail.com> <87bkp5xl6f.fsf@dfreeman.email> <87fsehw4ze.fsf@gmail.com> <83cz9kd99x.fsf@gnu.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668779124; 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=Pls7XHyQ2wQYBxNRvg/qnOBiBftTwq8gIErLegp6ogk=; b=BJarRwS1cHa+M6WCV7vcCH9xIsogkuaavc/J3tiQ3EwkwwOCEUD69yjiK6D4L8Az9TXb3p 3iqLhzIOTWQZ6DxFGepvBp0VN09+mhE7YkV3+YZmuS5e67pmUturqGm8bGzGgw8Ej00u3H yJfxG7V3dgkLGPaeOH/kareaMvctXEQ= 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#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows Date: Fri, 18 Nov 2022 08:39:13 -0500 In-reply-to: <83cz9kd99x.fsf@gnu.org> Message-ID: <87wn7swf4e.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: text/plain 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 Cc: arash@gnu.org, Augusto Stoffel , bug-gnu-emacs@gnu.org, 59338@debbugs.gnu.org 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 (--) Eli Zaretskii writes: > > Not sure I understand why this matters in the context of this > discussion. We need to make eglot--path-to-uri produce valid file:// > URL on MS-Windows and on Posix systems, right? Then why does it > matter how URI schema are defined? What am I missing? The current eglot--path-to-uri implementation should produce a valid file:// url unless what it receives is already a URL. So it could receive something like: /home/user/project/whatever.c d:/what/home/is/on/windows/whatever.c Both of which should be transformed into file:// URLs OR what it receives may already be a URL like zipfile:home/user/project.zip::/path/in/zip.c If it receives a URL, we want to pass it along, and not transform it into a file:// URL. If it is a full windows path, we DO want to turn that into a file url. So how do we detect that is is a windows path, and not a URL already? That's what I was trying to get at in the other message you replied to. Just checking the user's current OS is not enough, because this function could also receive a URL on Windows. -- Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 18 09:35:08 2022 Received: (at submit) by debbugs.gnu.org; 18 Nov 2022 14:35:08 +0000 Received: from localhost ([127.0.0.1]:35959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow2SS-0001Ei-1F for submit@debbugs.gnu.org; Fri, 18 Nov 2022 09:35:08 -0500 Received: from lists.gnu.org ([209.51.188.17]:43654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow2SO-0001EZ-Gk for submit@debbugs.gnu.org; Fri, 18 Nov 2022 09:35:07 -0500 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 1ow2SO-0004gJ-Bl for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 09:35:04 -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 1ow2SO-0003aI-09; Fri, 18 Nov 2022 09:35:04 -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=loIIogpumYKDilbtWfHJE0TmXpuXYgVawVusbkh1rdg=; b=ehLjR8BF33IF WKo2vVlC8Z5zk0f0NhkMp12v5bvktRjLul37e0KJfR0KwXP3pvdluJDsgR5GpZ+BfQpUhwKyRPgpK uH83yMaBrsGudODr2FRpq/F8u5GYCL1qdzbRdWyy/8aDiDE9HMU3+PMbWOxLlSscnzL40h4ztLzhF G7x716cWv32yPJW85hyNwWbDgIuhtDirG4ndgyNyFQ/Bi7CGlVWpH7HMueQq5AVTzTtz0GU2QMzA3 LTfQ7cRQsXgMw5VF4mFubKrju+i8odj5OWEaDNbQAV3KewOTYnqADkwvTOw/50RouI8azyiVKtF07 hZqlpqsifJAOAOu7/Pcf3Q==; 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 1ow2SM-0003vP-R7; Fri, 18 Nov 2022 09:35:03 -0500 Date: Fri, 18 Nov 2022 16:35:05 +0200 Message-Id: <83zgco9vqe.fsf@gnu.org> From: Eli Zaretskii To: Danny Freeman In-Reply-To: <87wn7swf4e.fsf@dfreeman.email> (message from Danny Freeman on Fri, 18 Nov 2022 08:39:13 -0500) Subject: Re: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> <87o7t5wlby.fsf@gmail.com> <87bkp5xl6f.fsf@dfreeman.email> <87fsehw4ze.fsf@gmail.com> <83cz9kd99x.fsf@gnu.org> <87wn7swf4e.fsf@dfreeman.email> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: arash@gnu.org, arstoffel@gmail.com, bug-gnu-emacs@gnu.org, 59338@debbugs.gnu.org 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: Augusto Stoffel , arash@gnu.org, > 59338@debbugs.gnu.org, bug-gnu-emacs@gnu.org > Date: Fri, 18 Nov 2022 08:39:13 -0500 > > The current eglot--path-to-uri implementation should produce a valid > file:// url unless what it receives is already a URL. > > So it could receive something like: > > /home/user/project/whatever.c > d:/what/home/is/on/windows/whatever.c > > Both of which should be transformed into file:// URLs > OR what it receives may already be a URL like > > zipfile:home/user/project.zip::/path/in/zip.c > > If it receives a URL, we want to pass it along, and not transform it > into a file:// URL. > > If it is a full windows path, we DO want to turn that into a file url. > > So how do we detect that is is a windows path, and not a URL already? You test that system-type is windows-nt AND that the file-name-absolute-p returns non-nil for the argument. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 18 10:14:48 2022 Received: (at submit) by debbugs.gnu.org; 18 Nov 2022 15:14:48 +0000 Received: from localhost ([127.0.0.1]:37907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow34p-0002iu-PR for submit@debbugs.gnu.org; Fri, 18 Nov 2022 10:14:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:45460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow34o-0002in-UO for submit@debbugs.gnu.org; Fri, 18 Nov 2022 10:14:47 -0500 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 1ow34j-0001Wk-DY for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 10:14:44 -0500 Received: from out2.migadu.com ([188.165.223.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ow34e-00022T-L7; Fri, 18 Nov 2022 10:14:39 -0500 References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> <87o7t5wlby.fsf@gmail.com> <87bkp5xl6f.fsf@dfreeman.email> <87fsehw4ze.fsf@gmail.com> <83cz9kd99x.fsf@gnu.org> <87wn7swf4e.fsf@dfreeman.email> <83zgco9vqe.fsf@gnu.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1668784472; 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=t4v3uME8TjJiiZzplBn2ad1jXqBMdWHLHWaEvOVW2Eg=; b=OFjmJDCRtrzSHVYWAh1eygtN9vQYtsUJxx8mObHQEWxNacPIfPquzy02igRSA5eDl7+7St sHso1kx09SjhOepsUIMvGPLG+IjXxCCpeJsxhCiXPtwce4gOpfiUmN5HqUg/WL/vftW+vB MF+/0SBL35WPc+nfZmChImV1bGh8TGU= 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#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows Date: Fri, 18 Nov 2022 09:55:47 -0500 In-reply-to: <83zgco9vqe.fsf@gnu.org> Message-ID: <87bkp4wazv.fsf@dfreeman.email> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=188.165.223.204; envelope-from=danny@dfreeman.email; helo=out2.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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 Cc: arash@gnu.org, arstoffel@gmail.com, bug-gnu-emacs@gnu.org, 59338@debbugs.gnu.org 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 (--) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> If it is a full windows path, we DO want to turn that into a file url. >> >> So how do we detect that is is a windows path, and not a URL already? > > You test that system-type is windows-nt AND that the > file-name-absolute-p returns non-nil for the argument. That is incredible simple. Maybe something like this patch will work: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Eglot-don-t-confuse-URLs-and-windows-file-paths.patch >From 85821844094e5d00ceb01902c55d9aa0fef73d17 Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Fri, 18 Nov 2022 10:09:17 -0500 Subject: [PATCH] Eglot: don't confuse URLs and windows file paths * lisp/progmodes/eglot.el (eglot--path-to-uri): check for windows path --- lisp/progmodes/eglot.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index c2d7fc309d..4661cf0e1a 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1502,11 +1502,15 @@ eglot--uri-path-allowed-chars (defun eglot--path-to-uri (path) "URIfy PATH." (let ((truepath (file-truename path))) - (if (url-type (url-generic-parse-url truepath)) + (if (and (url-type (url-generic-parse-url path)) + ;; It might be a windows path which includes a drive + ;; letter that looks like a URL scheme + (not (and (eq system-type 'windows-nt) + (file-name-absolute-p 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 + path (concat "file://" ;; Add a leading "/" for local MS Windows-style paths. (if (and (eq system-type 'windows-nt) -- 2.38.1 --=-=-= Content-Type: text/plain I can confirm it works on linux, but I don't have a windows machine. Someone else would need to verify it there. -- Danny Freeman --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 18 15:02:13 2022 Received: (at submit) by debbugs.gnu.org; 18 Nov 2022 20:02:13 +0000 Received: from localhost ([127.0.0.1]:38342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow7Yy-00069P-Nn for submit@debbugs.gnu.org; Fri, 18 Nov 2022 15:02:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:41010) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow7Yx-00069I-DK for submit@debbugs.gnu.org; Fri, 18 Nov 2022 15:02:11 -0500 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 1ow7Yx-00078V-8s for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 15:02:11 -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 1ow7Yw-00071r-RC; Fri, 18 Nov 2022 15:02:10 -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=rdw1Q1vbIyvdf5QGq/mV1nNZpyc9k9dr3S1t/IJyIeg=; b=alfndgxLmHY3rfKvL+Vz /vO38XOGnhggMTUuTS3hUQ73zMmC4Bg3yWkzIT4ROJXN99Djmm+s5Nkf2ZpDh1gX3Zx/rQ4rj7i/A hikNuaiWYUv3Y+RIui2fWdu7R9T90vQx7ABSdye/Fl9jvNid5Ji3xcai81s+Ehf32lOlp+pGTJ9ut 5QVbYLgG1gEsrn5b5n5Nr9LwJ3euwYNhZIAa0FqOoICSXLidtDIsOt8oRakBJSjwfyiN5iSnX6M9E KgDN4nCmahDKRj8SYnos/9cU7isbYR2zH71LQfJahiWvelB/qZFyJI/PMNKt66WLNqd/BLfJKmWyc /G1QdJA541cBcQ==; 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 1ow7Yv-00039s-N6; Fri, 18 Nov 2022 15:02:10 -0500 From: Arash Esbati To: Danny Freeman Subject: Re: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows In-Reply-To: <87bkp4wazv.fsf@dfreeman.email> (Danny Freeman's message of "Fri, 18 Nov 2022 09:55:47 -0500") References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> <87o7t5wlby.fsf@gmail.com> <87bkp5xl6f.fsf@dfreeman.email> <87fsehw4ze.fsf@gmail.com> <83cz9kd99x.fsf@gnu.org> <87wn7swf4e.fsf@dfreeman.email> <83zgco9vqe.fsf@gnu.org> <87bkp4wazv.fsf@dfreeman.email> Date: Fri, 18 Nov 2022 21:01:54 +0100 Message-ID: <86fsegowul.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Eli Zaretskii , arstoffel@gmail.com, bug-gnu-emacs@gnu.org, 59338@debbugs.gnu.org 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 (---) Danny Freeman writes: > I can confirm it works on linux, but I don't have a windows machine. > Someone else would need to verify it there. Many thanks for working on this. I tried your patch on my Windows box and this is what I get: (require 'eglot) (insert "\n" (format "%s" (eglot--path-to-uri "d:/digestif-test/tikz-test.tex"))) => file:///d%3A/digestif-test/tikz-test.tex (insert "\n" (format "%s" (eglot--path-to-uri "d:/digestif-test/tikz test.tex"))) => file:///d%3A/digestif-test/tikz%20test.tex As Eli already mentioned, %-escaping the colon seems to be wrong (I couldn't find a definitive source for this, though), but it seems a deliberate decision in eglot.el's `eglot--uri-path-allowed-chars', which also references this GitHub issue[1]. My original problem is solved and digestif-LSP works on Windows again. So for now, I suggest to apply your patch and close this report. Best, Arash Footnotes: [1] https://github.com/joaotavora/eglot/pull/639 From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 23 07:50:40 2022 Received: (at 59338) by debbugs.gnu.org; 23 Nov 2022 12:50:40 +0000 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 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 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) MIME-Version: 1.0 References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> <87o7t5wlby.fsf@gmail.com> <87bkp5xl6f.fsf@dfreeman.email> <83edu0d9dg.fsf@gnu.org> In-Reply-To: <83edu0d9dg.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 23 Nov 2022 12:51:37 +0000 Message-ID: Subject: Re: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows To: Eli Zaretskii , Richard Copley Content-Type: multipart/alternative; boundary="000000000000d75e6305ee22bbd4" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59338 Cc: arash@gnu.org, arstoffel@gmail.com, Danny Freeman , 59338@debbugs.gnu.org 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 (-) --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-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 24 08:45:01 2022 Received: (at 59338) by debbugs.gnu.org; 24 Nov 2022 13:45:01 +0000 Received: from localhost ([127.0.0.1]:57743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyCXF-0005EZ-DL for submit@debbugs.gnu.org; Thu, 24 Nov 2022 08:45:01 -0500 Received: from out0.migadu.com ([94.23.1.103]:28081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyCXC-0005EP-Fs for 59338@debbugs.gnu.org; Thu, 24 Nov 2022 08:44:59 -0500 References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> <87o7t5wlby.fsf@gmail.com> <87bkp5xl6f.fsf@dfreeman.email> <83edu0d9dg.fsf@gnu.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dfreeman.email; s=key1; t=1669297497; 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=5lR7COGIwYmB2Pj2F/a+0pQpc/MZK/POpxgyYAVYrsQ=; b=Hodv8LMvo9GR1jHU5Kpap8tqidRUfF9CGtYxhqu7XY7HiuKiVLob2n9scfvBatOegLaOUQ SJOLH/8gzL9NG4r9UQaWn47md+amL8SuJWhh9q97clWWHu1r79FB62VgRr0Ci4JgyzAndz U6GS7+rO5M89sAwWceMOgKRJipeJJuY= 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#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows Date: Thu, 24 Nov 2022 08:42:36 -0500 In-reply-to: Message-ID: <87tu2olb56.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: 59338 Cc: Richard Copley , Eli Zaretskii , arstoffel@gmail.com, arash@gnu.org, 59338@debbugs.gnu.org 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 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 > Should my patch for eglot be merged then? https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D59338#53 --=20 Danny Freeman From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 24 10:28:16 2022 Received: (at 59338-done) by debbugs.gnu.org; 24 Nov 2022 15:28:16 +0000 Received: from localhost ([127.0.0.1]:59836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyE9A-0008W8-Ac for submit@debbugs.gnu.org; Thu, 24 Nov 2022 10:28:16 -0500 Received: from mail-oo1-f45.google.com ([209.85.161.45]:40519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyE98-0008Vr-28 for 59338-done@debbugs.gnu.org; Thu, 24 Nov 2022 10:28:14 -0500 Received: by mail-oo1-f45.google.com with SMTP id v7-20020a4aa507000000b00496e843fdfeso303713ook.7 for <59338-done@debbugs.gnu.org>; Thu, 24 Nov 2022 07:28:14 -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=BzATovxQx8pF0VUpp8YHsm8Ob9dn7fuc+KX/K+iuME0=; b=Ar0nXPijwOpur2vUq1DPiMQPOvHL2DrmJXPsUcBdvaO4hDQIWV52sXuGUg+0n0x/S1 +F29NBX+Z9193/tWB+grrmh2Xpeegg2FQITeN4EHmKkzz5LO0pq/i8iDlJyBbtzZkVIC kbG0TKCqTlN+kgrEwE9h98q7ScJxHgde3XgYtVsVfS9gApZkmnjsPlAa/LLXQpXG8zaK UCVVcjIz3zaxszlD0/kYlvXPWyHvztpw9yuHIILNp/1Y7Huvd5B80VYvDb+f4senYjHo RCx49R+m9Z0d9xuILDAtcJlBiItol1Q10IXxWuHxdxoCbkPYlLmdLMD2CFqe6Nj80LSb dgcw== 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=BzATovxQx8pF0VUpp8YHsm8Ob9dn7fuc+KX/K+iuME0=; b=1SChr48nrFSuwY6MGnJTkcIalHyxSAptT9TBFV+6Nu3oHFymtORgyydFmp9C0lX93L IMUIONmOrPjKBlcI9eiBe6JLQqzUKJ9RuwPuEaMokJCJUPw8HFAh5D4y5K7ft8d1NkWN jCKksPcM8fkqtwuyuaRyDB8YAeoCf2+yCDSneFxL03zg+Bz0L1HX/lQk/OKN3dQPXPHC qnwhxEaUIoq+bXCO1QfmyqxlrhD1aoAE8mSj/pQWWYmuMwnSOkyG4UKCJxTYylzbA9dZ QTfQvsqUkz67QlJH93mqLdx18FPdHhyTEezgeCTTm/6sfgRDoMAn1aPAt/gU66zvhJay JBLQ== X-Gm-Message-State: ANoB5pk6LIODhNoPAeqsD2YgMa2w4nxkStZKxaD+TV6Ih1smXxmzYukI 0VQ1aPpylb28K9GNnqvFCoypnP4ABywHIwpCKY8= X-Google-Smtp-Source: AA0mqf6CuyD0eyDGQzgmkLE/DcMc/tse3VqGeO88VVkCyPXO5TUT4mgpS5CekOe464hEQvUy77bgOCcdotBXrJBbtjU= X-Received: by 2002:a4a:e0d3:0:b0:49f:de1:96c0 with SMTP id e19-20020a4ae0d3000000b0049f0de196c0mr14917447oot.7.1669303688374; Thu, 24 Nov 2022 07:28:08 -0800 (PST) MIME-Version: 1.0 References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> <87o7t5wlby.fsf@gmail.com> <87bkp5xl6f.fsf@dfreeman.email> <83edu0d9dg.fsf@gnu.org> <87tu2olb56.fsf@dfreeman.email> In-Reply-To: <87tu2olb56.fsf@dfreeman.email> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Thu, 24 Nov 2022 15:27:57 +0000 Message-ID: Subject: Re: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows To: Danny Freeman , 59338-done@debbugs.gnu.org Content-Type: multipart/alternative; boundary="0000000000005e2d1f05ee390d32" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59338-done Cc: Richard Copley , Eli Zaretskii , arstoffel@gmail.com, arash@gnu.org 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 (-) --0000000000005e2d1f05ee390d32 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I've just tested it on a Windows machine and pushed it, thanks. Closing this. Jo=C3=A3o On Thu, Nov 24, 2022 at 1:44 PM Danny Freeman wrote: > > Jo=C3=A3o T=C3=A1vora writes: > > > I just found out this bug was ongoing. > > > > Eli, if you're proposing to fix url-parse.el to not be fooled by window= s > > 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.e= l > > 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 > > > > Should my patch for eglot be merged then? > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D59338#53 > > -- > Danny Freeman > --=20 Jo=C3=A3o T=C3=A1vora --0000000000005e2d1f05ee390d32 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I've just tested it on a Windows machine and pushed it= , thanks.

Closing this.

Jo=C3=A3o=

On Thu, Nov 24, 2022 at 1:44 PM Danny Freeman <danny@dfreema= n.email> wrote:

Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com> writes:

> I just found out this bug was ongoing.
>
> Eli, if you're proposing to fix url-parse.el to not be fooled by w= indows
> 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
>

Should my patch for eglot be merged then?
https://debbugs.gnu.org/cgi/bugreport.cgi?bu= g=3D59338#53

--
Danny Freeman


--
Jo=C3=A3o T=C3=A1vora
--0000000000005e2d1f05ee390d32-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 25 03:56:56 2022 Received: (at control) by debbugs.gnu.org; 25 Nov 2022 08:56:56 +0000 Received: from localhost ([127.0.0.1]:33461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyUW0-00007g-FI for submit@debbugs.gnu.org; Fri, 25 Nov 2022 03:56:56 -0500 Received: from mail-ot1-f48.google.com ([209.85.210.48]:40928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oyUVd-00006U-SH for control@debbugs.gnu.org; Fri, 25 Nov 2022 03:56:48 -0500 Received: by mail-ot1-f48.google.com with SMTP id p10-20020a9d76ca000000b0066d6c6bce58so2256016otl.7 for ; Fri, 25 Nov 2022 00:56:33 -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 :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=TdSwgm8fK6yQitMATFn3O/V+T6nAy4VgtRVresEmXLk=; b=HMxnn7ZKmTkLVXUrrcXiqaQjmNTDgZH1u3OSwCZM2L6N8MYBioPOi8ttFkN9TJylzn sXL9aGcWxobOQuOlOmFMjr3tF9b87ad9eBalfYlgWubHr8IVELRem57qEB9XHC5LefJd 8k32bZ9wr7YXv1KKSa/JNAIH1tUygtDo82orc487aR2KwqN2jixl8XHD6UkKh5q1T+Ug +xkoWBcQzQVb1PRkJwwoUiSPM38Mb2Gwx+44HjST1E62WuGuPielPgAYAjF262+YZZ/3 it6vYehbTRiAJhf7hsctPekL1LRonEG0NevqDBz9lSQvf8XGUHsrGii7HNY1DErPyCPE 4HiQ== 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 :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=TdSwgm8fK6yQitMATFn3O/V+T6nAy4VgtRVresEmXLk=; b=Qd3X1ntCyqFpvheUm+IfD3hcKwOrFIrjY7bTehON7/5ivpRg+3GA4lnBIRTDO12/2E jlw2smH/bEz/namOeAybqTFQyJuTPwdW/bB0TMGj/xm5sjVAHSFaEnFZuC5/LDJjMQQN d3rC/AJEfdHvWWA3k9hXcqF09tjWdptRiS1WnP84HLQh/jojOn3KHvJvj1cdYwRYX10f h1mDPR/L4O8owEvxvtLYv7qPu64OdSoY0+S2h4kA7z/8OPD41T6tcQ8DQEHB3PNL2Txn 34Qt2kTRZ/h+xqxIicfc3GeB3013Qb7gWbk+ocYy27W9MxGCDsgoB/ARFfEjjrX/Zb4R 2g1Q== X-Gm-Message-State: ANoB5pkECa4+MNh0U9ezBLVcm0tsW/SvvwFqcK0DrAh5FO30rPcm3k2p HWCoAU+FXX5n+E64bqyuvhDCUFyLyNGNGcW+oFw= X-Google-Smtp-Source: AA0mqf5874N2/pyxKbhD6JagqghWo9R9Ht7DL0M5CLBo6tMZ7kPVoxXEF2kecBz1yki+ibhsdj34B36TgGnLpzJWCUw= X-Received: by 2002:a9d:5c81:0:b0:661:c48b:12db with SMTP id a1-20020a9d5c81000000b00661c48b12dbmr9690282oti.105.1669366588220; Fri, 25 Nov 2022 00:56:28 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 25 Nov 2022 00:56:27 -0800 From: Stefan Kangas In-Reply-To: <86k03jwhml.fsf@gnu.org> References: <86k03jwhml.fsf@gnu.org> X-Hashcash: 1:20:221125:arash@gnu.org::i0rsvgejlplnFQO4:4MWX MIME-Version: 1.0 Date: Fri, 25 Nov 2022 00:56:27 -0800 Message-ID: Subject: Re: bug#59565: Eglot should use file uris To: Arash Esbati , =?UTF-8?Q?Johann_H=C3=B6chtl?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Bcc: control@debbugs.gnu.org X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: 59565@debbugs.gnu.org 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 (-) forcemerge 59338 59565 thanks Arash Esbati writes: > Johann H=C3=B6chtl writes: > >> Eglot merged into master doesn't use file:// uris, at least gopls langua= ge server >> and typescript-language-server do not support non-file uris and won't >> work. >> >> The fix as of now is easy, install eglot from melpa on top of the >> builtin eglot, as it takes precedence and uses file uris. > > The issue you describe was fixed with commit d34fc7b7aa. Updating your > local repo and rebuilding Emacs should help. I'm therefore merging the bugs. From unknown Sun Aug 10 07:31:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 23 Dec 2022 12:24:11 +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