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#57725: 29.0.50; eglot: Error when using :initializationOptions Date: Sat, 17 Sep 2022 20:09:25 +0100 Message-ID: References: <87sfky9yw6.fsf@gmail.com> <87v8pueyg2.fsf@tcd.ie> <87bkrlq3ar.fsf@gmail.com> <875yhmckro.fsf@gmail.com> <87edwaarbh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ea29ec05e8e433ed" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36272"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Basil L. Contovounesios" , 57725-done@debbugs.gnu.org, Augusto Stoffel To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 17 21:09:12 2022 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 1oZdBf-0009JG-Rw for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Sep 2022 21:09:11 +0200 Original-Received: from localhost ([::1]:58668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZdBe-00032F-Kl for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Sep 2022 15:09:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZdBW-000325-Uc for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2022 15:09:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48132) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZdBW-0007yR-Mt for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2022 15:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oZdBW-0001YQ-A3 for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2022 15:09:02 -0400 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: Sat, 17 Sep 2022 19:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57725 X-GNU-PR-Package: emacs Original-Received: via spool by 57725-done@debbugs.gnu.org id=D57725.16634417135939 (code D ref 57725); Sat, 17 Sep 2022 19:09:02 +0000 Original-Received: (at 57725-done) by debbugs.gnu.org; 17 Sep 2022 19:08:33 +0000 Original-Received: from localhost ([127.0.0.1]:47210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZdB2-0001Xj-PN for submit@debbugs.gnu.org; Sat, 17 Sep 2022 15:08:33 -0400 Original-Received: from mail-il1-f173.google.com ([209.85.166.173]:43563) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZdB0-0001XV-A2 for 57725-done@debbugs.gnu.org; Sat, 17 Sep 2022 15:08:32 -0400 Original-Received: by mail-il1-f173.google.com with SMTP id x2so6690524ill.10 for <57725-done@debbugs.gnu.org>; Sat, 17 Sep 2022 12:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=5az4ZKmg+cmL2pHy/D21fSV40k99blOfk2aCDwLpXZY=; b=p+KeRflsCvFHXk/+TMmi7Tlwnl0gWEv5/m82SzyoDn+iuIFLt+zpOcmhINmV+ulnFc GQwkC9c1qqRBBt0XkpXIRYdmQQrV8+6KX3jPaPlk6ZIoRcHewO4/byKTQby+ZY9gHK+6 ELZMmRpAi1fgAAUECfyZl0vyaP7DB+ybawpXNQtQLOQaEqN8q59ttV0paSPogt441p4S 5DefRsRcQM22f8oZcDuqvcR6BE4l3Avl4OIUSFnEcQVyL5SZbeVbeQ5Jts48WQhxHCY1 ybPUZZWnW/Rz/cmYKkosE/QlLbey6ZLq5uC6bGypM1kMi4aRXX7dWoY+GOzmc+QI0h6L JlTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=5az4ZKmg+cmL2pHy/D21fSV40k99blOfk2aCDwLpXZY=; b=FykSwaLAM5zTds+SGaElFSoy3yH1dBJtocxAF86+bgnrJys2Osaf6Rq+Pmxffv7YTp x+DX2wHgpEeAjE8eMCiEO3kq3bHu6b0f8j9aq5Cu2sXUjjDwUjkIeGA7cTTkNbBq1gsa TV8ka5T3RRBkeZDqRnysg3rSa9YsJ2rLnxuMANLRyfw7+kgsmOdmBLL7YJnaMXeLg7w/ cFelfpCO7Q5Xx697TZplbBvgkZfm1x/f4zptPkiYXz4LK98Huu0HOTWmXaX8uIzEkOc2 u2nns8+mRsLNsoaxPXLNpnNoo5YVpnbwITM0SjHIhfpGblq1nfRj20eKJi+3wfCvwwVp R1gw== X-Gm-Message-State: ACrzQf1n4r/e+ZoSZaAHwrgx3GKSDmYbj5oOv270T9uh+Q50sKbs52aG 6VXLDiYdRsdP5mIKk0allw0tpFLZSCA3nfXaoFE= X-Google-Smtp-Source: AMsMyM7Puu3rwBo+b3DXB5EQDBx0B79s563KcvYouyx2iJGkr+uA/cxsew4h7z8LNW3arAAb0ytsZ5ch7WFccoYHFDs= X-Received: by 2002:a05:6e02:164d:b0:2f1:9b43:9157 with SMTP id v13-20020a056e02164d00b002f19b439157mr4540075ilu.94.1663441704723; Sat, 17 Sep 2022 12:08:24 -0700 (PDT) In-Reply-To: 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" Xref: news.gmane.io gmane.emacs.bugs:242907 Archived-At: --000000000000ea29ec05e8e433ed Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable In the future, I would suggest the other direction. Ask me or Stefan to close the ticket at the Eglot tracker. Anyway, I think this two-liner patch fixes the problem and doesn't have any unintended side-effects for M-x eglot-reconnect. diff --git a/eglot.el b/eglot.el index ff94d5ca5f..3b1b1a9536 100644 --- a/eglot.el +++ b/eglot.el @@ -796,6 +796,8 @@ treated as in `eglot-dbind'." :documentation "Represents a server. Wraps a process for LSP communication.") +(cl-defmethod initialize-instance :before ((_server eglot-lsp-server) &optional args) + (cl-remf args :initializationOptions)) ;;; Process management (defvar eglot--servers-by-project (make-hash-table :test #'equal) On Sat, Sep 17, 2022 at 5:41 PM Stefan Kangas wrote: > Augusto Stoffel writes: > > > Yes, please close this ticket here at the Emacs tracker. > > Done. > --=20 Jo=C3=A3o T=C3=A1vora --000000000000ea29ec05e8e433ed Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In the future, I would suggest the other direction.= =C2=A0 Ask me or Stefan to close the ticket at the Eglot tracker.

Anyway, I think this two-liner patch fixes the problem and = doesn't have any unintended side-effects for M-x eglot-reconnect.
=

diff --git a/eglot.el b/eglot.el
index ff94d5ca5f..3= b1b1a9536 100644
--- a/eglot.el
+++ b/eglot.el
@@ -796,6 +796,8 @@= treated as in `eglot-dbind'."
=C2=A0 =C2=A0:documentation
= =C2=A0 =C2=A0"Represents a server. Wraps a process for LSP communicati= on.")
=C2=A0
+(cl-defmethod initialize-instance :before ((_serve= r eglot-lsp-server) &optional args)
+ =C2=A0(cl-remf args :initializ= ationOptions))
=C2=A0
=C2=A0;;; Process management
=C2=A0(defvar e= glot--servers-by-project (make-hash-table :test #'equal)
On Sat, S= ep 17, 2022 at 5:41 PM Stefan Kangas <stefankangas@gmail.com> wrote:
Augusto Stoffel <arstoffel@gmail.com> writes:

> Yes, please close this ticket here at the Emacs tracker.

Done.


--
Jo=C3=A3o T=C3=A1vora
--000000000000ea29ec05e8e433ed--