From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Bill Wohler Newsgroups: gmane.emacs.bugs Subject: bug#13824: 24.3.50; :package-version not taking priority over :version Date: Sun, 11 Aug 2019 11:06:04 -0700 Organization: Newt Software Message-ID: <34219.1565546764@olgas.newt.com> References: <87txozc7c4.fsf@bzg.ath.cx> <83sgq98jet.fsf@gnu.org> <116969.1565475013@olgas.newt.com> <83r25ru7fs.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="22861"; mail-complaints-to="usenet@blaine.gmane.org" Cc: bzg@altern.org, stefan@marxist.se, 13824@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 11 20:07:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hwsFQ-0005mU-Fg for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Aug 2019 20:07:16 +0200 Original-Received: from localhost ([::1]:41274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwsFP-0004Kw-AK for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Aug 2019 14:07:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36790) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwsFD-0004Kp-SR for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2019 14:07:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hwsFC-0002nq-HW for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2019 14:07:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36958) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hwsFC-0002nR-Dz for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2019 14:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hwsFC-0005N2-6f for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2019 14:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bill Wohler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Aug 2019 18:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 13824-submit@debbugs.gnu.org id=B13824.156554679720582 (code B ref 13824); Sun, 11 Aug 2019 18:07:02 +0000 Original-Received: (at 13824) by debbugs.gnu.org; 11 Aug 2019 18:06:37 +0000 Original-Received: from localhost ([127.0.0.1]:45779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hwsEi-0005Lh-Ma for submit@debbugs.gnu.org; Sun, 11 Aug 2019 14:06:36 -0400 Original-Received: from ecbiz204.inmotionhosting.com ([173.205.126.238]:43007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hwsEe-0005LG-Os for 13824@debbugs.gnu.org; Sun, 11 Aug 2019 14:06:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=newt.com; s=default; h=Message-ID:Date:Content-ID:Content-Type:MIME-Version:References :In-reply-to:Subject:From:cc:To:Sender:Reply-To:Content-Transfer-Encoding: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=jefvvdvhE54NuAUzLPyG/YaKLDVyoyJoskQZL5ThTeo=; b=3UvEfj2mvvAxXhBhQJjF9KGPvL 3k6bkmXND/xKWJSD/g2Y3wwaTSfnkl15hwxzqlwpos1e/olUYHndHWDu6qYaSsDQ44NqhrPfqtieT updi/yglQRFSl0JFPN3L5VHEr30jvhZ6zNPcMD5vfaBkQxiz30dHG3/XCh9x0F2w1gYY5xbW77W6S 5+5dLCAlgvzvwsxpiHDBSzZkuCZ0h92g1HjghS9w8jSFW4Ci0pGk6dH4cU1vhtSsQ+4skV3ujLoDV ZS9h/8mHRPS25IE27X9ZTtIHDEjnoy6YmKHT92KO+S8zS6XKzBwaPA7x/Vf9PFiAubnJ35xRTDYCN UBWhcpBQ==; Original-Received: from [73.162.57.71] (port=58648 helo=olgas.newt.com) by ecbiz204.inmotionhosting.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hwsEH-00CEaR-4T; Sun, 11 Aug 2019 14:06:21 -0400 Original-Received: by olgas.newt.com (Postfix, from userid 1000) id AC20A3802B3; Sun, 11 Aug 2019 11:06:04 -0700 (PDT) In-reply-to: <83r25ru7fs.fsf@gnu.org> Comments: In-reply-to Eli Zaretskii message dated "Sun, 11 Aug 2019 17:01:59 +0300." X-Mailer: MH-E 8.6; nmh 1.6; GNU Emacs 24.5.1 X-Image-URL: http://www.newt.com/wohler/images/bill-diving.png Content-ID: <34218.1565546764.1@olgas.newt.com> X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ecbiz204.inmotionhosting.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - newt.com X-Get-Message-Sender-Via: ecbiz204.inmotionhosting.com: authenticated_id: wohler@newt.com X-Authenticated-Sender: ecbiz204.inmotionhosting.com: wohler@newt.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164892 Archived-At: Eli Zaretskii wrote: > > cc: Stefan Kangas , bzg@altern.org, > > 13824@debbugs.gnu.org > > From: Bill Wohler > > Date: Sat, 10 Aug 2019 15:10:13 -0700 > > > > > Bill, what is your take on this? Your change, which introduced this > > > attribute, only modified customize-changed-options. Was that on > > > purpose? > > > > Thanks for asking. The original intent of package-version was to provide > > more accurate version information in packages that were updated more > > often than Emacs, regardless of whether they were packaged in Emacs > > (like MH-E and Gnus) or not. I think that should apply to any function > > that displays version information for an option. That is, any function > > that looks for :version should also look for :package-version. > > Thanks. > > Upon taking a better look, I conclude that there's more here than > originally met the eye. > > First, the doc string of defcustom says: > > :package-version > VALUE should be a list with the form (PACKAGE . VERSION) > specifying that the variable was first introduced, or its > default value was changed, in PACKAGE version VERSION. This > keyword takes priority over :version. For packages which > are bundled with Emacs releases, the PACKAGE and VERSION > must appear in the alist `customize-package-emacs-version-alist'. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > So Stefan's reproducer, viz.: > > (progn > (defcustom foobar nil > "foo" > :version "27.1" > :package-version '(foo . "1")) > (describe-variable-custom-version-info 'foobar)) > > wasn't supposed to work, since it doesn't play by the rules. > > Next, MH-E uses :package-version, but doesn't use :version. So, for > example, "C-h v mh-whitelist-preserves-sequences-flag RET" produces > the expected > > This variable was introduced, or its default value was changed, in > version 8.4 of the MH-E package that is part of Emacs 24.4. > > By contrast, Org mode files use both :package-version and :version, > which I guess was the reason why Bastien filed this bug report in the > first place. > > Now, since we _require_ the package versions to appear in > customize-package-emacs-version-alist, specifying :package-version > alone provides all the info we need about both the package version and > the corresponding Emacs version. Therefore, specifying :version as > well is simply redundant when :package-version is given, and Org > shouldn't use :version (btw, Org is the only bundled package which > uses both these attributes). IOW, if a package uses both attributes, > it's a mistake, we should document that to be a mistake (i.e. not just > say :package-version "overrides"), and it should probably be flagged > as a mistake by checkdoc. And yes, functions that need the version > information should ignore :version if :package-version is available. > Which means describe-variable-custom-version-info should indeed be > fixed. Thanks for digging in. That makes sense. A function that gets the version info from :package-version or :version as appropriate could be written (if it hasn't already). If used consistently throughout, it would provide a good example for obtaining version information. > > Thanks. > -- Bill Wohler aka http://www.newt.com/wohler/, GnuPG ID:610BD9AD