Felician Nemeth writes: > Theodor Thornhill writes: > >> This wouldn't help for the usage in find-buffer-visiting, though. But >> this one could more easily be replaced by reworking the diagnostics >> handler. We could store the last received diagnostics in the server >> object, and do a quick lookup from known buffers there. > > eglot-handle-notification:textDocument/publishDiagnostics, > eglot--xref-make-match, and eglot--apply-workspace-edit call > find-buffer-visiting. It seems to me only the first case might be > really time sensitive. Theo, can you email me the relevant messages > that your server sends to Emacs? Does the server send lots of similar > diagnostics messages frequently? > > Thanks, > Felicián I'll try to include such a report a little later today. But yes, it happens a lot. Consider the following patch, though. It eliminates the issues for publishDiagnostics. It can easily be extended to the other places where find-buffer-visiting is used. The publishDiagnostics is sent on change from the server, so that isn't directly initiated by Eglot. What do you think? Theo