From 4c5dbc458ca1b13a897b6f01f69cacd9490c1ee1 Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Thu, 3 Nov 2022 09:57:45 -0400 Subject: [PATCH 2/2] Warn when eglot receives a non-file type URI that Emacs can't handle (bug#58790) The file-name-operation being checked, any-handler, has no significant meaning, other than that it is not one that would 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. --- lisp/progmodes/eglot.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index b272d370ab..f0969290d0 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1524,6 +1524,8 @@ eglot--uri-to-path (substring retval 1) retval))) (concat remote-prefix normalized)) + (unless (find-file-name-handler uri 'any-handler) + (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.0