[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#62198: [PATCH] Eglot: Send clientInfo during the initialize request
From: |
Felician Nemeth |
Subject: |
bug#62198: [PATCH] Eglot: Send clientInfo during the initialize request |
Date: |
Thu, 23 Mar 2023 17:03:40 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
> Currently the manual advises users to list the files in
> 'package-user-dir', which is a really poor way of telling the versions
> of ELPA packages, but it's the best I've come up with. What I meant
> is I'd like to have a way to produce a listing of packages (required
> and optional, like markdown/company/yasnippet) for inclusion in bug
> reports.
The code below might be a good starting point for this. It is inspired
by `package-compute-transaction'. It seems to work even with Debian's
package manager ("apt install elpa-project"). So I'd like to think that
a potential failure in the code is a sign that the bug reporter has a
non-standard installation.
(require 'find-func)
(require 'package)
(defun my-list-dependencies (packages &optional seen versions)
"Retrun the versions of dependencies of PACKAGES.
Argument PACKAGES is a list of symbols. SEEN, VERSION are used
internally."
(while packages
(let ((package (pop packages)))
(unless (memq package seen)
(push package seen)
(let* ((file (condition-case error
(find-library-name (symbol-name package))
(error nil)))
(pkg-desc (if file
(with-temp-buffer
(insert-file-contents file)
(package-buffer-info))
(if (eq package 'emacs)
(package-desc-create :name "emacs"
:version (version-to-list
emacs-version))
(package-desc-create :name (symbol-name package)
:version '(0))))))
(push (package-desc-full-name pkg-desc) versions)
(setq packages (append packages
(mapcar #'car
(package-desc-reqs pkg-desc))))))))
versions)
(my-list-dependencies '(eglot markdown company other-optional-dependency))
- bug#62198: [PATCH] Eglot: Send clientInfo during the initialize request, Felician Nemeth, 2023/03/15
- bug#62198: [PATCH] Eglot: Send clientInfo during the initialize request, João Távora, 2023/03/15
- bug#62198: [PATCH] Eglot: Send clientInfo during the initialize request, Felician Nemeth, 2023/03/16
- bug#62198: [PATCH] Eglot: Send clientInfo during the initialize request, Michael Albinus, 2023/03/17
- bug#62198: [PATCH] Eglot: Send clientInfo during the initialize request, Felician Nemeth, 2023/03/19
- bug#62198: [PATCH] Eglot: Send clientInfo during the initialize request, João Távora, 2023/03/19
- bug#62198: [PATCH] Eglot: Send clientInfo during the initialize request, Felician Nemeth, 2023/03/22
- bug#62198: [PATCH] Eglot: Send clientInfo during the initialize request, João Távora, 2023/03/22
- bug#62198: [PATCH] Eglot: Send clientInfo during the initialize request,
Felician Nemeth <=