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#62198: eglot feature request: set Initialize.ClientInfo.{Name, Version} Date: Thu, 29 Jun 2023 17:02:44 +0100 Message-ID: References: <87cz1es23m.fsf@betli.tmit.bme.hu> 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="12329"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62198@debbugs.gnu.org, Alan Donovan To: Felician Nemeth Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 29 18:04:38 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 1qEu8M-0002z8-Q2 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Jun 2023 18:04:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEu7y-0003jN-2o; Thu, 29 Jun 2023 12:04:14 -0400 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 1qEu7p-0003g5-5Q for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 12:04:05 -0400 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 1qEu7m-0002S6-MV for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 12:04:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qEu7l-0007Bj-Vo for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 12:04: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: Thu, 29 Jun 2023 16:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62198 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 62198-submit@debbugs.gnu.org id=B62198.168805458527494 (code B ref 62198); Thu, 29 Jun 2023 16:04:01 +0000 Original-Received: (at 62198) by debbugs.gnu.org; 29 Jun 2023 16:03:05 +0000 Original-Received: from localhost ([127.0.0.1]:53883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEu6r-00079N-CJ for submit@debbugs.gnu.org; Thu, 29 Jun 2023 12:03:05 -0400 Original-Received: from mail-oa1-f48.google.com ([209.85.160.48]:58787) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEu6o-00078i-Hw for 62198@debbugs.gnu.org; Thu, 29 Jun 2023 12:03:04 -0400 Original-Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-1b038d7a5faso764331fac.1 for <62198@debbugs.gnu.org>; Thu, 29 Jun 2023 09:03:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688054576; x=1690646576; 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=aEjm+Cx3zOnXPlXJC1oUlJRZpqd/fpP7j2Hzgrla0A8=; b=GB0eDzGt+yrskk3o4YteKUuzKq8FzCjT5uFC407JGNYmacGWeDqPLfm8mZgDo8GYBz H7D4dgOfFW6sq25A7iC+8fC8VhsVBTVJwBqq6jTAYoU7maIQPpupMhrSpLdI1WDW5XuA 7l+O7XafCLs2hlgZse4L8TKc553J/h2ShYH0q91FAszscoZQgsXnQYKRmrlzJu+PNLSQ k+UXuKkXqW9B3uv8L8izqLYnsxPi/oZPOM1bd11KMfoDan9P6L+koJSCQqcLOVhBQ8e1 zaKydY7Ry3+dem03dLd7rHTbwe60P/WQHE/gQu3Qjkabqd3CzXFYwyhOvGR5i7rICHv/ lUFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688054576; x=1690646576; 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=aEjm+Cx3zOnXPlXJC1oUlJRZpqd/fpP7j2Hzgrla0A8=; b=KbnISs97sYXkk5k2dHfIV5ey3/VrTwm2I5mSsWnifPnkOmTE4FYdtDNlh1c8xjo3n2 mTpouAYPSHbGceO2jkamn4zXoCXQ2KG25x+rrUSnLqBelm1ntLsxQ/zrqT1Enhf4eaO+ +V4KzqemEJnSS4EOAuCBpGAO32JWku58qJN8ykeBOUByO+xut1YxodIg4hmGu3D0PCYj PndpJVOHnvx4O2Zq1QVBDbBCqo8mI4dvSrG7nrQeW+BSkcHy9xtEnUrNR2JRd2vX8PNu JeAvQN4h0W6x+ropiLo1oOXbCZTdkfLKBjgXmghYKHSNXZDR4a0BTzo2zq2Ke33glt5l 3DVA== X-Gm-Message-State: ABy/qLb1/ilvTytqGDIjBnwVK880uT0F7AU44CgowhWUispT9qeZuaJP aPrw6foQGR/Sy2C6lT7cvCnW0P5opvb1pCybMCE= X-Google-Smtp-Source: ACHHUZ6xp6T2bailWAwmI9GSk0BbJVf1+Vs3dfiZjUVSz7jdhsRF2YaqlU48gVQZMlS1CaB8MM5TaJlqomTwwul80s0= X-Received: by 2002:a05:6870:4c18:b0:1b0:2fc3:b4f1 with SMTP id pk24-20020a0568704c1800b001b02fc3b4f1mr447110oab.9.1688054576581; Thu, 29 Jun 2023 09:02:56 -0700 (PDT) In-Reply-To: <87cz1es23m.fsf@betli.tmit.bme.hu> 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:264280 Archived-At: On Thu, Jun 29, 2023 at 4:46=E2=80=AFPM Felician Nemeth wrote: > > Jo=C3=A3o T=C3=A1vora writes: > > > On Wed, Jun 28, 2023 at 9:41=E2=80=AFPM Alan Donovan wrote: > > > >> > >Hi Jo=C3=A3o, > >> > > would you mind making eglot populate the clientInfo.{name,version} > >> > > fields of the Initialize request parameters? All that's necessary = is > >> > > the one-line change below, though I'm sure you know a cleaner way = to > >> > >express the JSON literal and the version constant. > >> > No I wouldn't mind. > >> Great! I found that this expression works for the version, assuming > >> eglot is actually installed: > >> > >> (package-desc-version (cadr (assoc 'eglot package-alist))) > > > > That's the thing. Sometimes it is installed in that variable, sometime= s > > it's a builtin described in some other variable. There is, I think, > > a library for this. > > > > I've found the bug thread: bug#62198. > > > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D62198 > > > > Taking the liberty of CCing there. Felici=C3=A1n was also looking for t= his. > > If Eglot is installed, then it is byte-compiled as well. The earlier > patch in this bug report made sure that the helper library ('lisp-mnt) > was required only at compile time. However, the patch worked even if > Eglot was not installed with package.el (but Eglot still needed to be > byte-compiled). > > On the other hand, if package-desc-version is acceptable as opposed to > that earlier patch, then it is probably better than not sending a > version number in clientInfo. I thinkt the lisp-mnt-at-compile-time solution is preferable, as I'm not sure 'eglot always lives in package-alist (sometimes it is a built-in and that is a royal pain). Can you show an updated patch for it, when you have time, Felici=C3=A1n? Jo=C3=A3o