From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kyle Andrews Newsgroups: gmane.emacs.devel Subject: Re: GNU ELPA package for CC-mode Date: Sat, 25 Aug 2018 19:28:07 -0400 Message-ID: References: <20180819204918.GA3934@ACM> <20180821162043.GA3946@ACM> <20180823213418.GA32596@ACM> <83lg8w9mt2.fsf@gnu.org> <871saoc70o.fsf@gmx.de> <70f493fa-ed53-7450-3ff6-81b93731d721@gmail.com> <87sh32ywl6.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000282f805744cb921" X-Trace: blaine.gmane.org 1535247676 15524 195.159.176.226 (26 Aug 2018 01:41:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Aug 2018 01:41:16 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 26 03:41:12 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ftk3E-0003wq-2w for ged-emacs-devel@m.gmane.org; Sun, 26 Aug 2018 03:41:12 +0200 Original-Received: from localhost ([::1]:47615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftk5K-0006wZ-3R for ged-emacs-devel@m.gmane.org; Sat, 25 Aug 2018 21:43:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftk4a-0006wH-4j for emacs-devel@gnu.org; Sat, 25 Aug 2018 21:42:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ftk4Z-0000Et-A4 for emacs-devel@gnu.org; Sat, 25 Aug 2018 21:42:36 -0400 Original-Received: from mail-it0-x22d.google.com ([2607:f8b0:4001:c0b::22d]:38717) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ftk4Z-0000E3-4a for emacs-devel@gnu.org; Sat, 25 Aug 2018 21:42:35 -0400 Original-Received: by mail-it0-x22d.google.com with SMTP id p129-v6so6473374ite.3 for ; Sat, 25 Aug 2018 18:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rZsXEWuywEfQSeh5tnwapZGvdk2/jD3W+NfXjrSRE1Q=; b=swANoWjmf09fUZ3jQLCUfOcSB/4CyD2gLECZznwYYLYkRyGGJgtIjrmaxDL63dVGVy NIWcesktOnDO0hmoJ68ITqoxWqAf17lvuqc1PJu6Wd2dr8wLE/P6b2vPNWwFCHkep+v9 4hixCr0j33SXUpgEuR4EWfH+CEeWDMuPncsdgrUGM1RWC3Le3OE2ty7TGWNyH3oINugT XsMyUfRjx7Kf1wY42dkyHuNvkgc2ONMJaWLl3/Es6O3SiUp/dCivYiWm+R7YE1YSu5cC rysH5ZxwzMIQJsNLKuFluClsSwDso4qrt0KOqQJ+gppeRCdZ3pvsbnWjNXlYkFnfdRz5 v4fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rZsXEWuywEfQSeh5tnwapZGvdk2/jD3W+NfXjrSRE1Q=; b=V/zHl/Bpu1bRxZ+DwH0N1jU7JAw8uEo+6XIfoKe7oMIfgjfNMBEsQGT6NbVfEEB0U4 1gN87xi5A3KfC11kRxikAbiPuPpe/YKO6wHDfaAtAebDKESQnc2xW9+2qPeQJykLgyat Gpw9wk4KtwWCoQgseObbXXAUoTfnONXSHP0PL509dHnQF50wlx92a3xcM47UsDhKcavp 4AlSzJGAO1wSdOyHKiVrW21adFiArCidi84Y1fIHPginVkLVP9v9fh+Wdzi8T+T6lll/ gXsWRJJs+InJZEK4qosY7lw8oxPp+Im2gYEQpSI2TQL8uwLOGjdiKwuHjmlwtdsbZnlI pFoQ== X-Gm-Message-State: APzg51CiJc/XYaejDCjQMpklwkdfReGot4pjnNPqgH/JqAx9oGgQPBwl ujauEX5LAAqW0w9GRu6YJmKBzIuZ+ZPG2QGwZRE= X-Google-Smtp-Source: ANB0VdZc80T5OqPXv2hM5wf2VoHj0f3ZNREEZiTLeBpAV1RkxZGCzPCCCiIgw5jkn7Bn1PKNRzGYHZPQSD801HMpU7M= X-Received: by 2002:a24:da82:: with SMTP id z124-v6mr2832241itg.105.1535247753837; Sat, 25 Aug 2018 18:42:33 -0700 (PDT) In-Reply-To: <87sh32ywl6.fsf@tromey.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::22d 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:228919 Archived-At: --0000000000000282f805744cb921 Content-Type: text/plain; charset="UTF-8" K On Sat, Aug 25, 2018, 17:18 Tom Tromey wrote: > >>>>> "Stefan" == Stefan Monnier writes: > > >> We do this in Flycheck, but it makes retrieving the version number > >> less conveni.k,. Lololol Ll..k.. . K > ent. Maybe p.j ackage.el could provide a simple function > >> which, given a package name, returns the installed version? > > Stefan> Yes, it'd be nice. > > >> (Maybe there's one already?) > > Stefan> The closest I could find are: (lm-header "version") and > `bbdb-version`. > > lm-header is what package.el itself uses. > > I suspect this could be done by using a combination of the > load-file-name hack; see the end of: > > (info "(elisp) Multi-file Packages") > > combined with lm-header. To make it even better maybe this could be > done using eval-when-compile so that the bytecode just has a constant. > > Tom > > --0000000000000282f805744cb921 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable K

On Sat, Aug 25, 2018, = 17:18 Tom Tromey <tom@tromey.com&g= t; wrote:
>>>>> &quo= t;Stefan" =3D=3D Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> We do this in Flycheck, but it makes retrieving the version number=
>> less conveni.k,. Lololol Ll..k..
. K
<= div class=3D"gmail_quote">
ent.=C2=A0 Maybe p= .j=C2=A0 ackage.el could provide a simple function=C2=A0
>> which, given a package name, returns the installed version?

Stefan> Yes, it'd be nice.

>> (Maybe there's one already?)

Stefan> The closest I could find are: (lm-header "version") an= d `bbdb-version`.

lm-header is what package.el itself uses.

I suspect this could be done by using a combination of the
load-file-name hack; see the end of:

(info "(elisp) Multi-file Packages")

combined with lm-header.=C2=A0 To make it even better maybe this could be done using eval-when-compile so that the bytecode just has a constant.

Tom

--0000000000000282f805744cb921--