From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#13824: 24.3.50; :package-version not taking priority over :version Date: Sun, 11 Aug 2019 17:01:59 +0300 Message-ID: <83r25ru7fs.fsf@gnu.org> References: <87txozc7c4.fsf@bzg.ath.cx> <83sgq98jet.fsf@gnu.org> <116969.1565475013@olgas.newt.com> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="134756"; mail-complaints-to="usenet@blaine.gmane.org" Cc: bzg@altern.org, stefan@marxist.se, 13824@debbugs.gnu.org To: Bill Wohler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 11 16:03:11 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 1hwoRC-000Yva-IP for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Aug 2019 16:03:10 +0200 Original-Received: from localhost ([::1]:40388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwoRB-0000wE-6l for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Aug 2019 10:03:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39959) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwoR5-0000w5-K9 for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2019 10:03:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hwoR4-00039L-H5 for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2019 10:03:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36852) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hwoR4-00039B-Dt for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2019 10:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hwoR4-0005UB-6g for bug-gnu-emacs@gnu.org; Sun, 11 Aug 2019 10:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Aug 2019 14:03: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.156553214521025 (code B ref 13824); Sun, 11 Aug 2019 14:03:02 +0000 Original-Received: (at 13824) by debbugs.gnu.org; 11 Aug 2019 14:02:25 +0000 Original-Received: from localhost ([127.0.0.1]:45673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hwoQS-0005T3-M9 for submit@debbugs.gnu.org; Sun, 11 Aug 2019 10:02:24 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hwoQQ-0005Sq-07 for 13824@debbugs.gnu.org; Sun, 11 Aug 2019 10:02:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35678) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hwoQK-0002tK-4s; Sun, 11 Aug 2019 10:02:16 -0400 Original-Received: from [176.228.60.248] (port=2400 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hwoQJ-0002kI-B0; Sun, 11 Aug 2019 10:02:15 -0400 In-reply-to: <116969.1565475013@olgas.newt.com> (message from Bill Wohler on Sat, 10 Aug 2019 15:10:13 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:164881 Archived-At: > 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.