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: Thu, 29 Jun 2023 17:46:37 +0200 Message-ID: <87cz1es23m.fsf@betli.tmit.bme.hu> References: 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="40323"; 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 Thu Jun 29 17:47: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 1qEtra-000A5g-6Q for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Jun 2023 17:47:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEtrO-0003ZK-00; Thu, 29 Jun 2023 11:47:06 -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 1qEtrL-0003Yy-Pu for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 11:47:03 -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 1qEtrK-000673-DM for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 11:47:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qEtrJ-0006Zi-V7 for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 11:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Felician Nemeth Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2023 15:47: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.168805361125254 (code B ref 62198); Thu, 29 Jun 2023 15:47:01 +0000 Original-Received: (at 62198) by debbugs.gnu.org; 29 Jun 2023 15:46:51 +0000 Original-Received: from localhost ([127.0.0.1]:53868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEtr9-0006ZE-6w for submit@debbugs.gnu.org; Thu, 29 Jun 2023 11:46:51 -0400 Original-Received: from mail-ej1-f53.google.com ([209.85.218.53]:57371) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEtr4-0006Yt-2y for 62198@debbugs.gnu.org; Thu, 29 Jun 2023 11:46:49 -0400 Original-Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-98d34f1e54fso92701266b.2 for <62198@debbugs.gnu.org>; Thu, 29 Jun 2023 08:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688053600; x=1690645600; h=content-transfer-encoding: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=0CFU3Z1PZ6BkX4ud18p+AopgSTstohtQARJtfIVSUJI=; b=erxAdmDBeSGiJr7NMvVEmYNADC8Cjm6pdbUkJJb1IU9mhSAEUuFDbQFQt4KdaiO3oi qfl+zhtg4RBfpdfmEIvc2pklZ8bbp47UbuaWZy6yV6htYkpDejoxF9AuNZ6R688sXQWV YU10QQ45Uo2LPAphu7vMaPZvuBkRRduFxxlYXbfe8hOHf8gd+axzbJ2O10VQIG30VKTL paaexiDJHuzta70iAwe4BJ8/dkPVrrewAJdoDTiqSzL6XqgGeSTceGJ00QlBZdJXvHIb 6leDIyZR4EMCc8c2bCIrJTfrPNfVwGgilgxx7seFs1nbSWah+FqdZdd2mNUnwOAkqMVK EF0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688053600; x=1690645600; h=content-transfer-encoding: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=0CFU3Z1PZ6BkX4ud18p+AopgSTstohtQARJtfIVSUJI=; b=Mq86NEyjXzn9lwtYtPsxXI6jpLTzaGfAnSnuN0sOrjcCedveQGLUiQeUOINA3pdNIh /Y/K3PZBbnDCgDzuyS6WkshV4PqFxMlj3DLlbHBYEBMQ6yESRZT8k+4cfGsZ3ghrqunu O895jqVwd7RvlrUpVqJIQEXbjECkBPmsefF90AUJMbeYEXabUyW9KvwW/VXF5QQ5mKZ7 eqz//8a9Z7ktpAFsIsBeVed7DM0p1A4UkerRZBIVgdGEP1LO6oQ2yC1flykaE8pxh3ls qD+olczWF8/i6LYDys6dkzNeX2tUiOd/X0ii9Gxhf24HD0E/8WxH8dq7XalrqQMlvzry /LEA== X-Gm-Message-State: AC+VfDx3S/uMfAec1DL85RbWCvinD9AGjXTUrj+aBh8O+aIeFfYYNyzN VgvxwjTcbPXwolYNrEMONQuZqIogl00= X-Google-Smtp-Source: ACHHUZ5LZMdKNd2Nau51Nt/6kMd9V2hhr7Oo6RKUyin+POAbpwToz6CSQnQF+wdr+1NcRoONUpjvgw== X-Received: by 2002:a17:907:944b:b0:992:1653:3406 with SMTP id dl11-20020a170907944b00b0099216533406mr6421513ejc.73.1688053599815; Thu, 29 Jun 2023 08:46:39 -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 l13-20020a170906078d00b00992b17a5a85sm735580ejc.151.2023.06.29.08.46.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 08:46:39 -0700 (PDT) In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Wed, 28 Jun 2023 22:02:40 +0100") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEWOdXElERN7LDLZs6/l 0dDQq6TepMcqAAACW0lEQVQ4jWWSzY7bMAyEaSm6mypylxjkroTRvUW8d9lavf+r7NDOZotWQHzg lyGHP0Sn5ed9qKrLWWIWos9/QJWIeCSywPNTd/AE0LtwFj7A+3WT5PwfeBrQKcsBnkfwVcNySWQr 3i34XN6gRNgis/v4uwSKHCD9lPitB0Aq9BHfHX4cgsI7cJJfLdZg/4bbCzoRmkD9MsagQSBDedZi CgNxkVSJmSOStTBUBKkywEnEoZzbwWj+ACiVJkF6pOpak2PMCqkMYDpaw+gatLR8atMOrB3JGzmm 3rSQo+tkxU+UAbhQSgtslULhsXKk6+IyQ1QTzeQB0MzjlpkCEUCeUdviWrwBcxVqpZjP+v0MYPA0 aq2rvIEZe4GRM0v+9QIB03rsABVSk5y+Mz3LSzExtJLlCCO6dV1uzDQFTBad+gO0TqqL9XE8x4ek +orvYiMJgzC8e+r6TqaPaK6QyqVNvoHtsRrooQ6tTi4vgaSkd8wIikodB3B0iIk58avsDdYNajpS bSKJ+mQnipGszB6zW4lGgsOkKHE2RWVcBpwhaIv3BYIAu3WsnC7YYKLRchp6w8fRGZIWiZuFsVai 7gbcUcJEhiDZ3K1+uzZvBlfaEO8oH4MLu6/hrKVM7QpQcIXJFuC1XjfbfKRxNslk94l9cYcEihV2 HWyNDQAXaLsvnrSyp7HaQhrAn13V6/XW11nh0XINBOEAV+tHK4EvAGNGvEwc0eZw8Vyr56imYEsV sOW9jxm/yb9AH1ufqGMviIK7A0Tc/723oM3tJ4HTOu9gDr3ftbdkxfdjsUv5AqWKwyfCYo5WAAAA AElFTkSuQmCC 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:264279 Archived-At: 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, sometimes > 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 thi= s. 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.