emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Obtaining the version of an installed package


From: Bozhidar Batsov
Subject: Obtaining the version of an installed package
Date: Mon, 09 Aug 2021 11:28:07 +0300
User-agent: Cyrus-JMAP/3.5.0-alpha0-552-g2afffd2709-fm-20210805.001-g2afffd27

Hey everyone, 

I'm wondering if there's an API for obtaining metadata about installed packages, in particular the version information.
For years I was using this function from pkg-info https://github.com/emacsorphanage/pkg-info/blob/master/pkg-info.el#L65, but I'm wondering if it'd be easy to strip one dependency from my packages. 

I've skimmed over package.el, but I didn't notice anything that does this, that's why I decided to ask on the mailing list as well.
I see there's the function `package-get-descriptor`, but it seems it was added only 7 months ago, so it can't be used in packages that need to support several Emacs versions. Copying it and related functions might work, but I'm hoping to find a more elegant solution. Thanks in advance for your help! 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]