unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Felician Nemeth <felician.nemeth@gmail.com>
Cc: sebastian.poeplau@mailbox.org, adonovan@google.com,
	62116@debbugs.gnu.org
Subject: bug#62116: RFE: eglot: support window.showDocument LSP RPC
Date: Mon, 15 May 2023 11:45:37 +0100	[thread overview]
Message-ID: <CALDnm52RWX0av_L688Yk_cGNmD2AssgJ-nB11GaCKmEY1viWGQ@mail.gmail.com> (raw)
In-Reply-To: <CALDnm52U-pKnc4hYhS5_TTPam4WyR45q8xnKUQtj8Lx-=NT=8A@mail.gmail.com>

On Sun, May 14, 2023 at 8:19 PM João Távora <joaotavora@gmail.com> wrote:

> > 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.
>
> Oof, you're right.  That's why I didn't want the async version.  Hmm, so
> either we go back to the sync version (and solve the problems that that may
> bring -- which AFAICT are only speculations about imenu/which-func at this
> point) or we do some file-readable-p checking.
>
> Though the latter isn't horrible, ideally we would just proclaim that
> putting request-generating hooks into the major-mode hook isn't allowed.
> Because it's a bad idea anyway, since a mode hook is supposed to be cheap.

Scratch that.  It's true that it's a bad idea in this particular case, but
my proposal is far from "ideal".  The right thing to do is to extend jsonrpc.el
so that it allows asynchronous request dispatchers.  Not only would this solve
the "needs to run in separate stack frame problem" but it would solve future
problems where Elisp JSONRPC endpoints need to contact other potentially
slow endpoints.

I'm working on this change to jsonrpc.el.  This will solve the Eglot
showDocument
problem by allowing the find-file _and_ the return code calculation to be async.

João





  reply	other threads:[~2023-05-15 10:45 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 15:34 bug#62115: RFE: eglot: support window.showDocument LSP RPC Alan Donovan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-10 15:40 ` bug#62116: " Alan Donovan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-11 12:56   ` João Távora
2023-03-11 13:17     ` Eli Zaretskii
2023-03-11 20:20       ` João Távora
2023-03-12  6:26         ` Eli Zaretskii
2023-04-22  9:08           ` Felician Nemeth
2023-05-05  6:03             ` Eli Zaretskii
2023-05-05  7:35               ` João Távora
2023-05-05 16:51               ` João Távora
2023-05-05 17:06                 ` Alan Donovan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-05 17:19                   ` João Távora
2023-05-05 17:35                     ` Alan Donovan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-05 17:36                       ` Alan Donovan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-11 23:12                       ` João Távora
2023-05-06 12:46                 ` Felician Nemeth
2023-05-08 13:23                   ` Felician Nemeth
2023-05-08 16:36                     ` João Távora
2023-05-09 17:03                       ` Felician Nemeth
2023-05-09 17:13                         ` Alan Donovan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-11 22:41                           ` João Távora
2023-05-12  0:54                         ` João Távora
2023-05-12 20:46                           ` Alan Donovan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-15  8:48                             ` João Távora
2023-05-13 10:21                           ` Felician Nemeth
2023-05-13 11:57                             ` João Távora
2023-05-14 19:02                               ` Felician Nemeth
2023-05-14 19:19                                 ` João Távora
2023-05-15 10:45                                   ` João Távora [this message]
2023-05-16 18:34                                     ` João Távora
2023-05-24 22:13                                       ` Alan Donovan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-25  1:03                                       ` Dmitry Gutov

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=CALDnm52RWX0av_L688Yk_cGNmD2AssgJ-nB11GaCKmEY1viWGQ@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=62116@debbugs.gnu.org \
    --cc=adonovan@google.com \
    --cc=felician.nemeth@gmail.com \
    --cc=sebastian.poeplau@mailbox.org \
    /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).