GNU bug report logs -
#62198
[PATCH] Eglot: Send clientInfo during the initialize request
Previous Next
Full log
View this message in rfc822 format
> 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))
This bug report was last modified 1 year and 294 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.