From 86a444be767a3e160f60e46086e38ef154134683 Mon Sep 17 00:00:00 2001 From: dannyfreeman Date: Thu, 10 Nov 2022 19:07:46 -0500 Subject: [PATCH] Eglot: Warn when receiving a non-file type URI (bug#58790) When this occurs, Emacs will probably not know how to open up the URI. The warning may help users when investigating a potential solution. * lisp/progmodes/eglot.el (eglot--uri-to-path): warn on unhandled URI --- lisp/progmodes/eglot.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 97c674f7aa..97febdacc2 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1534,7 +1534,11 @@ If optional MARKER, return a marker instead" (substring retval 1) retval))) (concat remote-prefix normalized)) - + ;; Use a fake operation, eglot--fake-file-name-op because we + ;; don't want this check to be suppressed by `inhibit-file-name-operation'. + ;; We just want to see if a handler exists. + (unless (find-file-name-handler uri 'eglot--fake-file-name-op) + (eglot--message "Received URI with unexpected scheme: %s" uri)) uri))) (defun eglot--snippet-expansion-fn () -- 2.38.1