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#67480: 30.0.50; Cannot start eglot Date: Tue, 28 Nov 2023 17:27:33 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007faf26060b3a6ee5" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1396"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67480@debbugs.gnu.org, Mou Tong To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 28 19:18:24 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 1r82fA-0000E4-A4 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Nov 2023 19:18:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r82ev-0006jG-3H; Tue, 28 Nov 2023 13:18:09 -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 1r82ei-0006iC-0Y for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2023 13:17:57 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r82eh-0002Da-Fr for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2023 13:17:55 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r82eo-0000Eq-FF for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2023 13:18:02 -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: Tue, 28 Nov 2023 18:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67480 X-GNU-PR-Package: emacs Original-Received: via spool by 67480-submit@debbugs.gnu.org id=B67480.1701195468892 (code B ref 67480); Tue, 28 Nov 2023 18:18:02 +0000 Original-Received: (at 67480) by debbugs.gnu.org; 28 Nov 2023 18:17:48 +0000 Original-Received: from localhost ([127.0.0.1]:47711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r82eZ-0000EJ-W2 for submit@debbugs.gnu.org; Tue, 28 Nov 2023 13:17:48 -0500 Original-Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]:55499) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r82eV-0000E2-Ts for 67480@debbugs.gnu.org; Tue, 28 Nov 2023 13:17:46 -0500 Original-Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-507a0907896so7583450e87.2 for <67480@debbugs.gnu.org>; Tue, 28 Nov 2023 10:17:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701195450; x=1701800250; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BQ9IQHTsrRaS+YNoK9blPZLHZB0uMxrdGFNB34Q8hsc=; b=ecO5kf2KCI89d20xjNBpUJCdkrl8NNbwYcuDmRmOR1HxH+IwxAaSod3fkJ1DcZX4Tz xjZ1Mice9ldsUdaf9/MLbPIQ2bN5GAeWgBTcllEGh1JlsPolXZ3/XSBGF11k5XeBbZGt Uo1lsO8uqAoSJZRPEgkDE1Ek6z6idxWwbeds3jGFyUOG5jeX192yejDtgOmQsyb6kU/N sfupgsqy5yqf/42n6dXb53X7n26GxxvDI58X/vETV5/O0Rtyr5mdppD3piElhgzKivVi Dw2hKfVzpqhhCJ9BPsGvG/1z16lY12Se2NLVOLSE/JIFsdwUGK8CmCDbppQwux1UDxKp SwPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701195450; x=1701800250; h=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=BQ9IQHTsrRaS+YNoK9blPZLHZB0uMxrdGFNB34Q8hsc=; b=FJUNlj3E71ik6G75QlyqZQg6qd6fV0eGctRuoK3LwFkr4MvJkV33c51g9V5WJdDsP9 FIQ1kLDqgLL/h+XpII+VQFbalpNtfk7VSzr6rpOWVO75egWDkA3e7iDyNqkGVhjnGhnX tzIHrEdO9dSEDkBXZV5Fi9M3T5YD8pZELEsHnsFX8EmsbHVBNF51PZjcnVdY5FwjQCAy i3wUB5DHFMzCW2LblPqX78GMNrDYkAUNZyjboI+RqOdFzdKodDQDcz+nrG5eMBbOwJ+s WtrFH3BHl0liW3buGeiAv9BSRq8G2XRq0IdDE8IZV+05wvbUfkshUXngGvvZXyAeUBiz jySQ== X-Gm-Message-State: AOJu0YxFwocbc65NRTqXVVGMxxVfcy9wAC9xLZ73iPr/5nRUeKy/2fr6 duSeH/duaWpph6Htvi4kpZ2EoAAWMUTrYW7t5Wo= X-Google-Smtp-Source: AGHT+IF/96W/Vz4zDnBrMfPP5q5WfpLe2UcjpBX/okYvao2FOfDZxQNDwdd1sCCInsMjkYpJCZq8y+Rs2AsSxP5IcDU= X-Received: by 2002:a05:6512:304e:b0:507:96cd:e641 with SMTP id b14-20020a056512304e00b0050796cde641mr10130465lfb.51.1701195450133; Tue, 28 Nov 2023 10:17:30 -0800 (PST) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275175 Archived-At: --0000000000007faf26060b3a6ee5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Nov 28, 2023, 15:48 Stefan Monnier wrote= : > >> diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el > >> index 52ffb220d8b..4298d75c5bf 100644 > >> --- a/lisp/jsonrpc.el > >> +++ b/lisp/jsonrpc.el > >> @@ -71,6 +71,7 @@ jsonrpc-connection > >> :accessor jsonrpc--request-continuations > >> :documentation "A hash table of request ID to continuation > lambdas.") > >> (-events-buffer > >> + :initform nil > >> :accessor jsonrpc--events-buffer > >> :documentation "A buffer pretty-printing the JSONRPC events") > >> (-events-buffer-scrollback-size > > > > Seem sensible, and feel free to push, please. > > > > But it'd also be nice to have a backtrace to that error to > > Have you tried the recipe sent by Mou Tong? > No. Didn't have the chance. > see why jsonrpc.el is trying to access the jsonrpc--events-buffer > > "too early". > > Not sure what you mean by "too early". Where is this slot filled? > No, I meant where it is read. The only place I see is in `jsonrpc-events-buffer` where we always read > it before setting it. I don't have the code in front of me, but ok, so a lazy slot. So maybe another fix would be to put a :before in the accessor generic. Then the accessor could lose the '--', and simplify things. AFAIR this is a standard CLOS technique for lazy slots. But the nil initial value works fine too. Jo=C3=A3o --0000000000007faf26060b3a6ee5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Nov 28, 2023, 15:48 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> diff --git a/lisp/jsonrpc.el b/l= isp/jsonrpc.el
>> index 52ffb220d8b..4298d75c5bf 100644
>> --- a/lisp/jsonrpc.el
>> +++ b/lisp/jsonrpc.el
>> @@ -71,6 +71,7 @@ jsonrpc-connection
>>=C2=A0 =C2=A0 =C2=A0 :accessor jsonrpc--request-continuations
>>=C2=A0 =C2=A0 =C2=A0 :documentation "A hash table of request I= D to continuation lambdas.")
>>=C2=A0 =C2=A0 =C2=A0(-events-buffer
>> +=C2=A0 =C2=A0 :initform nil
>>=C2=A0 =C2=A0 =C2=A0 :accessor jsonrpc--events-buffer
>>=C2=A0 =C2=A0 =C2=A0 :documentation "A buffer pretty-printing = the JSONRPC events")
>>=C2=A0 =C2=A0 =C2=A0(-events-buffer-scrollback-size
>
> Seem sensible, and feel free to push, please.
>
> But it'd also be nice to have a backtrace to that error to

Have you tried the recipe sent by Mou Tong?

No. Didn't have the chance.<= /div>

> see why jsonrpc.el is trying to access the jsonrpc--events-buffer
> "too early".

Not sure what you mean by "too early".=C2=A0 Where is this slot f= illed?

No, I meant where it is read.

The only place I see is in `jsonrpc-events-buffer` where we always read
it before setting it.

<= div dir=3D"auto">I don't have the code in front of me, but ok, so a laz= y slot.

So maybe another= fix would be to put a :before in the accessor generic. Then the accessor c= ould lose the '--', and simplify things. AFAIR this is a standard C= LOS technique for lazy slots. But the nil initial value works fine too.

Jo=C3=A3o
--0000000000007faf26060b3a6ee5--