unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "João Távora" <joaotavora@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: master 3a4583baf67 1/2: Eglot: fix bug#70408 yet another way
Date: Tue, 23 Apr 2024 19:48:40 +0300	[thread overview]
Message-ID: <86bk603tzr.fsf@gnu.org> (raw)

> -(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	other threads:[~2024-04-23 16:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86bk603tzr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=joaotavora@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).