From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Paul W. Rankin" Newsgroups: gmane.emacs.devel Subject: Function to retrieve package version Date: Tue, 21 May 2019 14:55:57 +1000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="194619"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.2.0; emacs 26.2 To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 21 06:56:52 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSwpX-000oUP-Da for ged-emacs-devel@m.gmane.org; Tue, 21 May 2019 06:56:52 +0200 Original-Received: from localhost ([127.0.0.1]:46513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSwpW-0006f3-6B for ged-emacs-devel@m.gmane.org; Tue, 21 May 2019 00:56:50 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSwot-0006em-H4 for emacs-devel@gnu.org; Tue, 21 May 2019 00:56:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSwos-00041Y-7w for emacs-devel@gnu.org; Tue, 21 May 2019 00:56:11 -0400 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:55661) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hSwor-0003zc-P7 for emacs-devel@gnu.org; Tue, 21 May 2019 00:56:10 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id D53466F4 for ; Tue, 21 May 2019 00:56:06 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 21 May 2019 00:56:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulwrankin.com; h=from:to:subject:date:message-id:mime-version:content-type; s= fm3; bh=pTaafo8YP8D4SFRpuTfSAJiGwnBVGenwccqsaX1BqXA=; b=hf7xGynk bX9G3XvaZXl6ecUqnx7Amzi7Nfz6qBhF+Al5lgGDAeVn6vI0jLnVdhtccjwCr6nA ec5l0qkDSohcP8zvd7c/xFn9jvm+ZLXYJypbSnKKuZPu/02uxBPFzHchewdLW6qP y3/4qfxbv07uiSvwMUuHT+klSvA7tic5qtg3jIgKyPgycB8GawRsINHyuWRxWAlL cGn0KnHl9YIAM7aFFfH2akfA5WOEVkxNW96XxkcIdi5nc/UqUzGQ2phaQxfQsDQs Ru59/Sl4nlUlBTJAZeiuaE5/MhTOBgiK4zQZUSdSi06LVeMfjsRxpnXZUTTOPUFo 3gKgVEifYMzzKA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=pTaafo8YP8D4SFRpuTfSAJiGwnBVG enwccqsaX1BqXA=; b=kUeRS5kaljpRmUJZVHLDqkm0Ycp3ijQLWFAfXqXecc79X Pc761Katd3sRJtCqBwPTJvya7rAQrW/mcpNKKDzxM9KsAUgVtGx+qvGTU8zmUfyV +O78DYToz4TMNsPXJ3Ny/dKmMZL9LGol4xNFk3iamHvoWNRansChUy6njNOXF3G2 KhFQV2MshvmXUEhiveytV3CxpOt/C3LgNnRxwEtWq1CPa+CpSnbp01pZZKprukd8 bo4viW6xvzXkln0dac/OwaWQg4ArjxTFZL1XcMLRo9ORBaTaSWIWSw6wc750OzAz yrLHJvvYI68QdTr2OhdanqtpMiwYiT+AGZd5qpSjQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddruddtledgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfgfhvffufffkgggtsehttdertddtredtnecuhfhrohhmpedfrfgruhhlucgh rdcutfgrnhhkihhnfdcuoehhvghllhhosehprghulhifrhgrnhhkihhnrdgtohhmqeenuc ffohhmrghinhepphgruhhlfihrrghnkhhinhdrtghomhdpghhnuhdrohhrghenucfkphep uddvtddrvddvrddujeejrdduudenucfrrghrrghmpehmrghilhhfrhhomhephhgvlhhloh esphgruhhlfihrrghnkhhinhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Original-Received: from localhost (unknown [120.22.177.11]) by mail.messagingengine.com (Postfix) with ESMTPA id 45EDA1037C for ; Tue, 21 May 2019 00:56:03 -0400 (EDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.147.123.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236838 Archived-At: wrt. http://lists.gnu.org/archive/html/help-gnu-emacs/2019-05/msg00022.html I would like an easy function that retrieves the version of the current package, e.g. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;;; my-great-package.el --- A great package ;; Copyright (c) 1952-2019 Free Software Foundation, Inc. ;; Author: Mr. Big Pants ;; Version: 2.7.0 ;; Package-Requires: ((emacs "24.5")) (defvar my-great-package-version (package-get-version)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ my-great-package-version -> "2.7.0" -- https://www.paulwrankin.com