bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#70036: a fix that


From: João Távora
Subject: bug#70036: a fix that
Date: Fri, 19 Apr 2024 12:40:06 +0100

On Fri, Apr 19, 2024 at 12:32 PM Theodor Thornhill <theo@thornhill.no> wrote:

> I wonder - why can't we use just buffer-file-truename?
>
> In the below function, wouldn't buffer-file-truename let us avoid the
> file-truename in eglot-path-to-uri?

Never used, but try it out.  It seems it's already a built-in cache
of whatever the buffer's truename is (and the docstring says
it does call the slow `file-truename`).  But like in my patch, it's
a one-time thing.  So yeah, if it's available in old Emacsen as well,
 it could replace `eglot--cached-tdi`, but then the search in the
publishDiagnostics
handler would have to be adjusted accordingly to call uri-to-path again.

Try it out, may be cleaner indeed.

Beware though, Stefan has fixed the tests which is very good, but there
still isn't a test for the symlink scenario, so you'd have to test it
manually (or
even better, craft that test yourself, with clangd).

João





reply via email to

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