emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 3a4583baf67 1/2: Eglot: fix bug#70408 yet another way


From: Eli Zaretskii
Subject: Re: master 3a4583baf67 1/2: Eglot: fix bug#70408 yet another way
Date: Tue, 23 Apr 2024 19:48:40 +0300

> -(defun eglot-path-to-uri (path)
> -  "Convert PATH, a file name, to LSP URI string and return it."
> -  ;; Some LSP servers don't resolve symlinks, so we must do that
> -  ;; for them by calling 'file-truename below'.
> -  (let ((truepath (file-truename path)))
> +(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.
> +  (let ((truepath (if truenamep path (file-truename path))))

Why did you reword the comment I added there in a way that it's now
much less clear?  The original text said that some LSP servers don't
resolve symlinks, but now there's some vague reference to "assuming
little of filesystems", which is not easily related to the
file-truename call.  Was the comment I wrote incorrect in some way?
the purpose of the comment was to make sure no one ever replaces the
file-truename call without understanding what it does and why.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]