GNU bug report logs - #59338
29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows

Previous Next

Package: emacs;

Reported by: Arash Esbati <arash <at> gnu.org>

Date: Thu, 17 Nov 2022 16:52:01 UTC

Severity: normal

Merged with 59565

Found in version 29.0.50

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: Danny Freeman <danny <at> dfreeman.email>
Cc: eliz <at> gnu.org, 59338 <at> debbugs.gnu.org, arash <at> gnu.org
Subject: bug#59338: 29.0.50; Commit 1a2d603bb3 breaks Eglot on Windows
Date: Thu, 17 Nov 2022 18:12:05 -0500
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-]+:".




This bug report was last modified 2 years and 231 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.