Subject: bug#62116: RFE: eglot: support window.showDocument LSP RPC

From: Felician Nemeth <[email-masked]>
Date: Sun, 14 May 2023 21:02:02 +0200

>> Even when takeFous is nil, shouldn't we still at least raise the frame?
>> Otherwise Emacs might not show the document.
>
> I don't understand.  Can you show this problem. , I think display-buffer
> ensures the buffer is displayed.  It doesn't guarantee that it is
> visible in the context of the windowing system, but that's another
> matter.

I was worried about the case when there are two frames: frame A is in
focus, and frame B is minimized but contains the target buffer.  But
you're right.  display-buffer does raise frame B and keeps the focus in
frame A.

> I pushed a version with the above adjustments to master, as we're
> converging anyway and it's easier than trading patches.

The pushed version is good, but there is one minor problematic detail.
It returns "success" even before it tries to find-file the requested
URI.  So if it cannot open the file, because the user does not have the
required permissions, it is too late to send an error to the server.