Subject: bug#69605: closed (Re: bug#69605: [PATCH] Query Eglot version via package.el)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 18 May 2024 22:31:02 +0000

Your bug report

#69605: [PATCH] Query Eglot version via package.el

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
69605: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69605
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#69605: [PATCH] Query Eglot version via package.el
From: Philip Kaludercic <[email-masked]>
To: Stefan Kangas <[email-masked]>
Cc: João Távora <[email-masked]>, [email-masked]
Date: Sat, 18 May 2024 22:30:17 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Stefan Kangas <[email-masked]> writes:

> Philip Kaludercic <[email-masked]> writes:
>
>> The three tested versions on GitHub all appear to pass the test.  I'll
>> push the changes to emacs.git for now.
>
> Is there more to do here, or should this bug closed?

No, the change have been part of emacs.git since
3d4918c2f1d10df4051ca7dc1d17decf157adb3f.  I'll close the report.

-- 
	Philip Kaludercic on peregrine

Subject: [PATCH] Query Eglot version via package.el
From: Philip Kaludercic <[email-masked]>
To: [email-masked]
Date: Thu, 07 Mar 2024 09:23:47 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

It seems to me that 'package-get-version' should already implement the
logic which is currently being reproduced when defining the constant
'eglot--version', so I suggest the following simplification:

>From 7566857ae869eb4cf01bde527eaedb8a3353f035 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <[email-masked]>
Date: Thu, 7 Mar 2024 10:21:45 +0100
Subject: [PATCH] Query Eglot version via package.el

* lisp/progmodes/eglot.el (eglot--version): Remove constant.
(eglot--connect): Use 'package-get-version'.
---
 lisp/progmodes/eglot.el | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index f341428cac3..1ec186e75f8 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -545,13 +545,6 @@ 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")
@@ -1585,8 +1578,10 @@ eglot--connect
                                             'network))
                               (emacs-pid))
                             :clientInfo
-                            `(:name "Eglot" ,@(when eglot--version
-                                                `(:version ,eglot--version)))
+                            (append
+                             '(:name "Eglot")
+                             (let ((v (package-get-version)))
+                               (and v (list :version v))))
                             ;; Maybe turn trampy `/ssh:foo@bar:/path/to/baz.py'
                             ;; into `/path/to/baz.py', so LSP groks it.
                             :rootPath (file-local-name
-- 
2.44.0

-- 
	Philip Kaludercic on peregrine