From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows Date: Thu, 17 Nov 2022 18:12:05 -0500 Message-ID: <87fsehw4ze.fsf@gmail.com> References: <86bkp5y16y.fsf@gnu.org> <83r0y1cxyb.fsf@gnu.org> <87o7t5wlby.fsf@gmail.com> <87bkp5xl6f.fsf@dfreeman.email> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27465"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: eliz@gnu.org, 59338@debbugs.gnu.org, arash@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 00:13:14 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 1ovo4I-0006y4-BS for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Nov 2022 00:13:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovo48-0000ot-Et; Thu, 17 Nov 2022 18:13: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 1ovo46-0000oL-VQ for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 18:13:02 -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 1ovo46-0005I3-EB for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 18:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ovo46-0007j8-9G for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 18:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Nov 2022 23: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: Eli Zaretskii , bug-gnu-emacs@gnu.org, Arash Esbati , 59338@debbugs.gnu.org Original-Received: via spool by 59338-submit@debbugs.gnu.org id=B59338.166872673829611 (code B ref 59338); Thu, 17 Nov 2022 23:13:02 +0000 Original-Received: (at 59338) by debbugs.gnu.org; 17 Nov 2022 23:12:18 +0000 Original-Received: from localhost ([127.0.0.1]:34617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovo3O-0007hX-AH for submit@debbugs.gnu.org; Thu, 17 Nov 2022 18:12:18 -0500 Original-Received: from mail-qk1-f176.google.com ([209.85.222.176]:42652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovo3I-0007gc-SV for 59338@debbugs.gnu.org; Thu, 17 Nov 2022 18:12:15 -0500 Original-Received: by mail-qk1-f176.google.com with SMTP id z1so2351730qkl.9 for <59338@debbugs.gnu.org>; Thu, 17 Nov 2022 15:12:12 -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=rW6kTm7ZbmlaOny+ebQFcF1mEw1q8VXhdfndOMNmyy3/GQCmc6ddS6Ygq5p5dRjd/j W1id064wxvg12kw3mH4kFGYLv3xUnPnw0OWVX76XOFUbgOJ6kf9nM17DBFfQErcuhTRU 14gJFyg0Rz+X0kqIcL/KpaaUYUO/I4ovI39DQnULXiN0Qbqu6iJpsE5re+nrk4L8fyPx jpdPu2CSGROfQZDv+WPvvfC+wtPH+dEYaYy1xh7fd3MgHRVcbqUOM6xCogvjXn8vqLC6 R1NIrXQg5vqdA5HkBU1Mam5P4QkT/6bskWB+yX0hYsd090orhi5TWGEi0fO3CcUF4Q9N J/Bw== X-Gm-Message-State: ANoB5pm5a7SMAKDpMm8jOoJ+7SYpMoTns6rWtmIDKbwFf8S3FkRfXZvj 5mEzOHAgyfFc4dRKpqKZ+bI= 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) Original-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) In-Reply-To: <87bkp5xl6f.fsf@dfreeman.email> (Danny Freeman's message of "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:248149 Archived-At: 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-]+:".