From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#61350: Eglot over Tramp freezes with large project Date: Thu, 23 Feb 2023 14:18:31 +0000 Message-ID: References: <87y1ootw2t.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27657"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Thomas Koch , 61350@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 23 15:19:23 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pVCRP-0006yo-Qq for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Feb 2023 15:19:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVCR5-00039m-8X; Thu, 23 Feb 2023 09:19:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVCR4-00039M-5X for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 09:19:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVCR3-0002qz-QA for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 09:19:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVCR3-0006MY-Ka for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 09:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Feb 2023 14:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61350 X-GNU-PR-Package: emacs Original-Received: via spool by 61350-submit@debbugs.gnu.org id=B61350.167716193124442 (code B ref 61350); Thu, 23 Feb 2023 14:19:01 +0000 Original-Received: (at 61350) by debbugs.gnu.org; 23 Feb 2023 14:18:51 +0000 Original-Received: from localhost ([127.0.0.1]:33460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVCQs-0006M9-Re for submit@debbugs.gnu.org; Thu, 23 Feb 2023 09:18:51 -0500 Original-Received: from mail-oi1-f182.google.com ([209.85.167.182]:45606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVCQr-0006Lv-DN for 61350@debbugs.gnu.org; Thu, 23 Feb 2023 09:18:49 -0500 Original-Received: by mail-oi1-f182.google.com with SMTP id t22so12829536oiw.12 for <61350@debbugs.gnu.org>; Thu, 23 Feb 2023 06:18:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gBKClO3p1uo7ODNpboTOBIx2szvVy8GQpuQUdrLdxh8=; b=D6gdpuE1pTSpXYhfcPO9QA2EC0NqRIK2BnG6MJ2vlTh8J8Ml4cLf1YhDvvTZjvrqKP DYLgyaNW0svf5yYgUs3ELYxNLrEFM/lXvm1x9kxjDtJw2MnRvQQX4t+7urTQd26hpn/D bqHT8v3bF/K4KDNhl5SRAoWSI3hY6TEEjM7paT4CAqOMPhZuroWDXGvKquC3/qAnAZxK sXEyPBKVbLRAxv0IkjITwLHRBuAnRTXJ/d98E0UXnJYCytgN4gAiMpNA69bAPQroPXKc oWzu5AoEi4d3q0zodvHgGiywgewOyP2YH+5lK+NQ0jDl6XR4mqbbB2MYuecnLECG7m5N xT8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gBKClO3p1uo7ODNpboTOBIx2szvVy8GQpuQUdrLdxh8=; b=6y5yYEpYVeZvPFeJ83f/KxH7nQjudfdPOxpIdLZONilrZU8X28ID78sPXd/fyxr02s qag79xvu17Qk+N/KzcKaYXrsVw43KHx0gksYMCF4kcYPzS6nxq5UHgTs3VHpI0eBn4UN NLMtDa1bQziWdJfNF7Impt9V17q65S5/y/n+5+1B34JKHnpx7m6It2AxsFLXoQ/xRglC jttFomeNXVbSAYXVz9UJcnr+NiscezgAD1LYPoacmAd4qyxvk8Qg82HJGUcFIEiuNpXY r7Fp88liv4LDzCxy0Y3BFny1emerFFvQbgHZckc5M9EV/MvLl9JGvLLEn/QimQerK+NT AKyw== X-Gm-Message-State: AO0yUKUW85YWTyAn3GkMKYiT5RU+vh4sN6m4ZWlC7oWZOby5RwZ8yUAI LTOeadnm88MbWPcmMJoPh5tDCmnVOLGGuLiJjSA= X-Google-Smtp-Source: AK7set9U4PanWVEGrcpie+a78YMvczL8JllueNCj1y3ClmWNp7EEAc4Op6ZgQJu5HL8mmfZBPT9uB4kuF92SHhRnJ0Q= X-Received: by 2002:a05:6808:13c9:b0:37f:84bc:b095 with SMTP id d9-20020a05680813c900b0037f84bcb095mr708328oiw.215.1677161922780; Thu, 23 Feb 2023 06:18:42 -0800 (PST) In-Reply-To: <87y1ootw2t.fsf@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:256467 Archived-At: > Can you try your experiment again after evaluating these two lines? > (cl-defmethod eglot-handle-notification :around (_ _ &key &allow-other-= keys) > (run-at-time 0 nil (lambda () (cl-call-next-method)))) I forgot to mention that one should evaluate that in a buffer were lexical-binding is t. Better try this jsonrpc.el patch instead which does basically the same, but won't have this pitfall. diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el index f583d116d20..45e3d97ca41 100644 --- a/lisp/jsonrpc.el +++ b/lisp/jsonrpc.el @@ -184,8 +184,8 @@ jsonrpc-connection-receive (apply #'jsonrpc--reply connection id reply))) (;; A remote notification method - (funcall (jsonrpc--notification-dispatcher connection) - connection (intern method) params)) + (run-at-time 0 nil (jsonrpc--notification-dispatcher connection) + connection (intern method) params)) (;; A remote response (setq continuations (and id (gethash id (jsonrpc--request-continuations connection)))) Jo=C3=A3o