From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Bozhidar Batsov" Newsgroups: gmane.emacs.devel Subject: Re: Obtaining the version of an installed package Date: Mon, 09 Aug 2021 17:03:21 +0300 Message-ID: <0b71ad0a-8e9e-41ff-99a2-616b9e3bacef@www.fastmail.com> References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=d75e78080ca44a7c8304b8e9ad521f0b Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33459"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-552-g2afffd2709-fm-20210805.001-g2afffd27 To: "Emacs Devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 09 16:07:23 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mD5w0-0008S1-Lf for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Aug 2021 16:07:22 +0200 Original-Received: from localhost ([::1]:59606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mD5vz-0000Kj-HN for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Aug 2021 10:07:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mD5sa-0001Fd-Ba for emacs-devel@gnu.org; Mon, 09 Aug 2021 10:03:48 -0400 Original-Received: from new4-smtp.messagingengine.com ([66.111.4.230]:41205) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mD5sX-0004fZ-VH for emacs-devel@gnu.org; Mon, 09 Aug 2021 10:03:48 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 46D1C580DCA for ; Mon, 9 Aug 2021 10:03:44 -0400 (EDT) Original-Received: from imap43 ([10.202.2.93]) by compute4.internal (MEProxy); Mon, 09 Aug 2021 10:03:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=batsov.dev; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=fm1; bh=M+D34KCf+aot6lJnNe7W154QuFb4+T9 p/CYUBS/YHug=; b=Fun0TgewksW0oSFASI6XkbCn/AFIL3XS8egecgeWT56Uep/ UpM2NCKBNOL7e4piBUDc6mtInAfltfqgbDgbDF5pqJ3HCGK7OCTA3ejpcfHfzwPr P8br9oHseFb8WR0DFwLuyIDyS/93V3Yqv1eeOUldM2KHpO6gWdXK1GrA6VQeFpX0 10MEkWIolWXDih4aYNtIpwqfWrq4SFisPeGxLB6qOzM9Xjt+BPG2dXQlOtMSWa3q dMF2zxdQrpdoXoULJZLxNbc5fJBK81LPwZBvEGRlqTojst0gFjqSMMe973B1fCGB /lPlI6KeYs9nHoys3GH6qahwLKPyz8V/gmHPGjQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=M+D34K Cf+aot6lJnNe7W154QuFb4+T9p/CYUBS/YHug=; b=aXmeqNY19fbllDu6O6PEl3 JXxG2+RLQvu/42XQFZe4ksoL4jtXdvcd97iNsiEqmN0vciax3OGeQIhz0u8W1uY8 ow/FOSnlCPT3npnvEpIHYhyYEBUQC4RDYC66tqy4i1vTMgZVKM9ofOtkZGSTUduh +6m9/GwP28LNJmQvRu9iqsBhSbc69mRZkd7FpQzrjc9llXSTQTtAnJY7H+c6Qy2x 8hzP4gVypQhGjdCLhgMrcnFmtRrI3KI2/9MflhG7IZ9pJuLQ7ltLjrVhb0zZX7aP JZISAzd4lLektbit2rOGmTgRZinDcJyndUiOrLkjGMTdOjK3d3GYIYRFg/Dk/J1A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrjeejgdejvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsegrtderreerredtnecuhfhrohhmpedfuehoiihh ihgurghruceurghtshhovhdfuceosghoiihhihgurghrsegsrghtshhovhdruggvvheqne cuggftrfgrthhtvghrnhepieetueehvedvudejhfetjedvgeehleehtdekhfdvteehhfef feeitdekkeehiefhnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsohiihhhiuggrrhessggr thhsohhvrdguvghv X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 80400AC0DD0; Mon, 9 Aug 2021 10:03:43 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: Received-SPF: pass client-ip=66.111.4.230; envelope-from=bozhidar@batsov.dev; helo=new4-smtp.messagingengine.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_FMBLA_NEWDOM28=0.798, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272234 Archived-At: --d75e78080ca44a7c8304b8e9ad521f0b Content-Type: text/plain I guess that could work, although from what I gathered it operates only on the current package. I was hoping to find something like an API like `(package-get-version 'package-name)`. On Mon, Aug 9, 2021, at 3:58 PM, Stefan Monnier wrote: > > 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. > > Are you looking for `package-get-version`? > > > Stefan > > > --d75e78080ca44a7c8304b8e9ad521f0b Content-Type: text/html Content-Transfer-Encoding: quoted-printable
I guess that co= uld work, although from what I gathered it operates only on the current = package. I was hoping to find something like an API like `(package-get-v= ersion 'package-name)`. 

On Mon, Aug 9, 20= 21, at 3:58 PM, Stefan Monnier wrote:
> I'm wondering if there's an API for obta= ining metadata about installed
> packages, in particula= r the version information.
> For years I was using this= function from pkg-info
https://githu= b.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. 

Are you looking for `pa= ckage-get-version`?


 &n= bsp;      Stefan

<= br>


--d75e78080ca44a7c8304b8e9ad521f0b--