From a2b92859d0a327c843bcd677eede72c0c100821f Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Thu, 10 Nov 2022 13:05:49 -0500 Subject: [PATCH 2/2] Eglot: warn when receiving a non-file scheme URI * lisp/progmodes/eglot.el (eglot--uri-to-path): Write a message when eglot encounters a non-file scheme URI that Emacs is not capable of handling. Note that the file-name-handler operation checked is `nil' because we don't want to use a real one that may be suppressed by `inhibit-file-name-operation'. We just want to check that a handler exists and has the potential to handle this URI, not actually dispatch a file-name-operation right now. Addresses bug#58790 --- lisp/progmodes/eglot.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 2463f68f97..1850334b84 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1530,6 +1530,8 @@ eglot--uri-to-path (substring retval 1) retval))) (concat remote-prefix normalized)) + (unless (find-file-name-handler uri nil) + (eglot--message "Received URI with unexpected scheme: %s" uri)) ;; Leave non-file type URIs untouched, `file-name-handler-alist' ;; handlers can be used to dispatch them properly. uri))) -- 2.38.1