From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Felician Nemeth Newsgroups: gmane.emacs.bugs Subject: bug#62198: eglot feature request: set Initialize.ClientInfo.{Name, Version} Date: Sat, 15 Jul 2023 12:18:11 +0200 Message-ID: <87351psckc.fsf@betli.tmit.bme.hu> References: <87cz1es23m.fsf@betli.tmit.bme.hu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39599"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: 62198@debbugs.gnu.org, Alan Donovan To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 15 12:19:19 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 1qKcMw-000A7M-4a for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Jul 2023 12:19:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKcMh-0003m9-Iv; Sat, 15 Jul 2023 06:19:03 -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 1qKcMg-0003ls-QE for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 06:19:02 -0400 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 1qKcMg-0004j4-IY for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 06:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qKcMg-0005cM-0V for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2023 06:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Felician Nemeth Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jul 2023 10:19: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.168941630121541 (code B ref 62198); Sat, 15 Jul 2023 10:19:01 +0000 Original-Received: (at 62198) by debbugs.gnu.org; 15 Jul 2023 10:18:21 +0000 Original-Received: from localhost ([127.0.0.1]:44217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKcM1-0005bN-1G for submit@debbugs.gnu.org; Sat, 15 Jul 2023 06:18:21 -0400 Original-Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:56773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKcLz-0005bA-ST for 62198@debbugs.gnu.org; Sat, 15 Jul 2023 06:18:20 -0400 Original-Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-992acf67388so351439066b.1 for <62198@debbugs.gnu.org>; Sat, 15 Jul 2023 03:18:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689416293; x=1692008293; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=dFzLmf43GfgpAZtRKDhsu5m738yTlKDNmplDAby/cxE=; b=PeXC93MvjqV9B1RtYr+wl+rfsDyFCKzeNNpT4pXlRZCD5/zxciJLaCCGO4vylE+of9 AosK1788VlPj8OJJlDk4yReyTTTfcIRvnb3bUfHKM6WyIR3c0LcZaVQVp9BptLk7bzKH QEGIJH81BzQ9azfWNh2/QLRRGX93tSkaNVTIhoQp4rdHtvGh9JDnxLHo3LbYhul9Vg3V 2D8oKBBFAiw0/8ImqfSSQd3oDgLNC1qnaRe0Eg0VpLByZDKe4/ya7KJ0ZWbUJCklDm9V 8wePfPDzjRhzmxHvzxFwHOwPg7hfyvh8OIvqyx1h/83EntmcjMJ1+MEoLool59QxTzLZ gTLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689416293; x=1692008293; h=mime-version:face:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dFzLmf43GfgpAZtRKDhsu5m738yTlKDNmplDAby/cxE=; b=KfVdJQ/Son0ACxCCwTh5AjeLEY4kHcG3PcDSmzSEDI5IpvIjglYEVnZKubl75fF0nG kqYi+YrKQ5WVZ+IJRHF0ujsLhe4jQFDlstOcJvzpb6+v7RmZi/ZKnDI4iKlJ0x3UTKli 0/vHG6uCRyE9GvEUPjefPjvDD2KrydbWuai66w+fg3vxI6BM8j+xHOtq8KZYEfaYkRhy jCu0JiNVKGa8kslJgFoCFOuQD19qdzTeVEkVkBECSb1gAG6VbhudB8NN5SGteHP2ddJG 9VrH48WeLRKSRjj31BXouy9hiysNiCKZdiFw+GaoSPStKMYM3nZnpj9HF49VTSCsc3lY QITA== X-Gm-Message-State: ABy/qLaYa1MPosBlcZuloasGCEa/WH4rOafXQcsDOq/jUuTvo/0/AWtw G/owVOjM0/BjPZD4JRBTu3kFumdQv4w= X-Google-Smtp-Source: APBJJlGbqBR6XNLLvDw8dzKqaAH/1XPLGPWMPoiMfon5ns2fZCwotBQNp+SzS+gWjjxnNTVD85mvNw== X-Received: by 2002:a17:906:6492:b0:973:d06d:545f with SMTP id e18-20020a170906649200b00973d06d545fmr6280454ejm.24.1689416293200; Sat, 15 Jul 2023 03:18:13 -0700 (PDT) Original-Received: from betli.gmail.com (catv-89-134-210-182.catv.fixed.vodafone.hu. [89.134.210.182]) by smtp.gmail.com with ESMTPSA id r11-20020a17090638cb00b00992f309cfe8sm6668909ejd.178.2023.07.15.03.18.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 03:18:12 -0700 (PDT) In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Thu, 29 Jun 2023 17:02:44 +0100") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEUMBwgHAgMFAAGPjY7/ //80MDHq6eqJt3pKAAABr0lEQVQ4jX2UzZKDIAzHqR177q7TPbtx2HMr6guQcrbY9txZ0fd/hA0f onXazcEJ/CD8E4Js8/HS9mwjXtqeMRxHXJkakTEm4b4GPVQW8PU8ov4fQCqeThlF60MBWdo1IXzd 2nEEZE7CEAZLwI0N/gJAhTj7ESQAX4gPgO8lyI+cvgViSVPlNomAj2M9gW40eg7VWY3cATjUcyiO Z+i03cFruGLYoUR7VyU3HihdmCEVhoDN65FXkpbSxkomOzsTQN/gySaodGb9Gdi1oSRXP46gdBWh LcUKJNdeGCWac74GKakmne0aHCFvyqJPYLsCFAVlhRTvGdzMdLHqtgRyUulyXIAH7CYQ3AB0Nody JQhAkq/qtOnbjhxdzYDkXPxlH5y4WdUAeUcX1NVJ6GR7UQEYPGWoAnA36OQNn5lRRp38vHTAp9Br LoTmvlPPDoRCKzpjG1SXT89AaT5l456BamJuMcs+NIOMzJ/s5dI6yUVcrARlruwOebfdv6gunTn4 ww3+QjGBEn5suVyLHoSGvAqREuDLN+iqZ+VcFg+HBbsJUU9+FZthbez9T+bdb+kPv2Ls6ct3hTkA AAAASUVORK5CYII= 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:265189 Archived-At: --=-=-= Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable >> 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). > 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=E1n? I've attached the updated patch. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Eglot-send-version-in-clientInfo-bug-62198.patch >From df775108a9d0c5171ca6eeb19af752bec15c626a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felici=C3=A1n=20N=C3=A9meth?= Date: Sat, 15 Jul 2023 12:02:49 +0200 Subject: [PATCH] Eglot: send version in clientInfo (bug#62198) * lisp/progmodes/eglot.el (eglot--version): New defconst. (eglot--connect): Use it. --- lisp/progmodes/eglot.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 8ac21638a5..0da4641fba 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -421,6 +421,14 @@ eglot-withhold-process-id ;;; Constants ;;; +(defconst eglot--version + (eval-when-compile + (when byte-compile-current-file + (require 'lisp-mnt) + (lm-version byte-compile-current-file))) + "The version as a string of this version of Eglot. +It is nil if Eglot is not byte-complied.") + (defconst eglot--symbol-kind-names `((1 . "File") (2 . "Module") (3 . "Namespace") (4 . "Package") (5 . "Class") @@ -1352,7 +1360,9 @@ eglot--connect (eq (jsonrpc-process-type server) 'network)) (emacs-pid)) - :clientInfo '(:name "Eglot") + :clientInfo + `(:name "Eglot" ,@(when eglot--version + `(:version ,eglot--version))) ;; Maybe turn trampy `/ssh:foo@bar:/path/to/baz.py' ;; into `/path/to/baz.py', so LSP groks it. :rootPath (file-local-name -- 2.39.2 --=-=-=--