]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/progmodes/eglot.el (eglot-path-to-uri): Improve commentary.
authorEli Zaretskii <eliz@gnu.org>
Tue, 23 Apr 2024 18:28:09 +0000 (21:28 +0300)
committerEshel Yaron <me@eshelyaron.com>
Wed, 24 Apr 2024 17:43:34 +0000 (19:43 +0200)
(cherry picked from commit d8d4fd8c6dbe11542432fccdc31701da9f686460)

lisp/progmodes/eglot.el

index c35c4071297503aafc38a20ee79922a555e6b378..04dc70c4a1b70a0f356f39d8a35bbae8e835ad8d 100644 (file)
@@ -1091,8 +1091,11 @@ ACTION is an LSP object of either `CodeAction' or `Command' type."
 (cl-defun eglot-path-to-uri (path &key truenamep)
   "Convert PATH, a file name, to LSP URI string and return it.
 TRUENAMEP indicated PATH is already a truename."
-  ;; LSP assumes little of filesystems, servers being potentially
-  ;; physically detached from it.  Make sure we hand them true names.
+  ;; LSP servers should not be expected to access the filesystem, and
+  ;; therefore are generally oblivious that some filenames are
+  ;; different, but point to the same file, like a symlink and its
+  ;; target.  Make sure we hand the server the true name of a file by
+  ;; calling file-truename.
   (let ((truepath (if truenamep path (file-truename path))))
     (if (and (url-type (url-generic-parse-url path))
              ;; PATH might be MS Windows file name which includes a