* bug#13824: 24.3.50; :package-version not taking priority over :version @ 2013-02-26 17:28 Bastien Guerry 2019-08-08 3:59 ` Stefan Kangas 0 siblings, 1 reply; 8+ messages in thread From: Bastien Guerry @ 2013-02-26 17:28 UTC (permalink / raw) To: 13824 The docstring 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. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ but `describe-variable-custom-version-info' gives priority to :version over :package-version. Which one is correct here? Thanks! ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#13824: 24.3.50; :package-version not taking priority over :version 2013-02-26 17:28 bug#13824: 24.3.50; :package-version not taking priority over :version Bastien Guerry @ 2019-08-08 3:59 ` Stefan Kangas 2019-08-10 9:22 ` Eli Zaretskii 0 siblings, 1 reply; 8+ messages in thread From: Stefan Kangas @ 2019-08-08 3:59 UTC (permalink / raw) To: Bastien Guerry; +Cc: 13824 Bastien Guerry <bzg@altern.org> writes: > The docstring 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. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > but `describe-variable-custom-version-info' gives priority to :version > over :package-version. Which one is correct here? This is still an issue on current master (and 26.2). I reproduced this using: (progn (defcustom foobar nil "foo" :version "27.1" :package-version '(foo . "1")) (describe-variable-custom-version-info 'foobar)) Which results in: "This variable was introduced, or its default value was changed, in version 27.1 of Emacs. " But C-h f 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. Thanks, Stefan Kangas ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#13824: 24.3.50; :package-version not taking priority over :version 2019-08-08 3:59 ` Stefan Kangas @ 2019-08-10 9:22 ` Eli Zaretskii 2019-08-10 14:13 ` Stefan Kangas 2019-08-10 22:10 ` Bill Wohler 0 siblings, 2 replies; 8+ messages in thread From: Eli Zaretskii @ 2019-08-10 9:22 UTC (permalink / raw) To: Stefan Kangas, Bill Wohler; +Cc: bzg, 13824 > From: Stefan Kangas <stefan@marxist.se> > Date: Thu, 8 Aug 2019 05:59:21 +0200 > Cc: 13824@debbugs.gnu.org > > Bastien Guerry <bzg@altern.org> writes: > > > The docstring 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. > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > but `describe-variable-custom-version-info' gives priority to :version > > over :package-version. Which one is correct here? > > This is still an issue on current master (and 26.2). > > I reproduced this using: > > (progn > (defcustom foobar nil > "foo" > :version "27.1" > :package-version '(foo . "1")) > (describe-variable-custom-version-info 'foobar)) > > Which results in: > > "This variable was introduced, or its default value was changed, in > version 27.1 of Emacs. > " > > But C-h f 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. The implementation only prefers :package-version for the purposes of customize-changed-options, i.e. the Options->Customize Emacs->New Options menu item. By contrast, describe-variable-custom-version-info is used for displaying the doc strings of options. For a package that is bundled with Emacs, I think displaying :version in "C-h v" makes sense. If people agree, then this is a minor documentation bug (also to be fixed in the ELisp manual), not a code bug. Bill, what is your take on this? Your change, which introduced this attribute, only modified customize-changed-options. Was that on purpose? ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#13824: 24.3.50; :package-version not taking priority over :version 2019-08-10 9:22 ` Eli Zaretskii @ 2019-08-10 14:13 ` Stefan Kangas 2019-08-10 22:10 ` Bill Wohler 1 sibling, 0 replies; 8+ messages in thread From: Stefan Kangas @ 2019-08-10 14:13 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Bastien Guerry, Bill Wohler, 13824 Eli Zaretskii <eliz@gnu.org> writes: > For a package that > is bundled with Emacs, I think displaying :version in "C-h v" makes > sense. If people agree, then this is a minor documentation bug (also > to be fixed in the ELisp manual), not a code bug. Yes, that makes sense. Let's see what Bill says. Thanks, Stefan Kangas ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#13824: 24.3.50; :package-version not taking priority over :version 2019-08-10 9:22 ` Eli Zaretskii 2019-08-10 14:13 ` Stefan Kangas @ 2019-08-10 22:10 ` Bill Wohler 2019-08-10 22:40 ` Bill Wohler 2019-08-11 14:01 ` Eli Zaretskii 1 sibling, 2 replies; 8+ messages in thread From: Bill Wohler @ 2019-08-10 22:10 UTC (permalink / raw) To: Eli Zaretskii; +Cc: bzg, Stefan Kangas, 13824 Eli Zaretskii <eliz@gnu.org> wrote: > > From: Stefan Kangas <stefan@marxist.se> > > Date: Thu, 8 Aug 2019 05:59:21 +0200 > > Cc: 13824@debbugs.gnu.org > > > > Bastien Guerry <bzg@altern.org> writes: > > > > > The docstring 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. > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > > > but `describe-variable-custom-version-info' gives priority to :version > > > over :package-version. Which one is correct here? > > > > This is still an issue on current master (and 26.2). > > > > I reproduced this using: > > > > (progn > > (defcustom foobar nil > > "foo" > > :version "27.1" > > :package-version '(foo . "1")) > > (describe-variable-custom-version-info 'foobar)) > > > > Which results in: > > > > "This variable was introduced, or its default value was changed, in > > version 27.1 of Emacs. > > " > > > > But C-h f 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. > > The implementation only prefers :package-version for the purposes of > customize-changed-options, i.e. the Options->Customize Emacs->New > Options menu item. By contrast, describe-variable-custom-version-info > is used for displaying the doc strings of options. For a package that > is bundled with Emacs, I think displaying :version in "C-h v" makes > sense. If people agree, then this is a minor documentation bug (also > to be fixed in the ELisp manual), not a code bug. > > 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. -- Bill Wohler <wohler@newt.com> aka <Bill.Wohler@nasa.gov> http://www.newt.com/wohler/, GnuPG ID:610BD9AD ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#13824: 24.3.50; :package-version not taking priority over :version 2019-08-10 22:10 ` Bill Wohler @ 2019-08-10 22:40 ` Bill Wohler 2019-08-11 14:01 ` Eli Zaretskii 1 sibling, 0 replies; 8+ messages in thread From: Bill Wohler @ 2019-08-10 22:40 UTC (permalink / raw) To: Eli Zaretskii, Stefan Kangas, bzg, 13824 Bill Wohler <wohler@newt.com> wrote: > Eli Zaretskii <eliz@gnu.org> wrote: > > > > From: Stefan Kangas <stefan@marxist.se> > > > Date: Thu, 8 Aug 2019 05:59:21 +0200 > > > Cc: 13824@debbugs.gnu.org > > > > > > Bastien Guerry <bzg@altern.org> writes: > > > > > > > The docstring 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. > > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > > > > > but `describe-variable-custom-version-info' gives priority to :version > > > > over :package-version. Which one is correct here? > > > > > > This is still an issue on current master (and 26.2). > > > > > > I reproduced this using: > > > > > > (progn > > > (defcustom foobar nil > > > "foo" > > > :version "27.1" > > > :package-version '(foo . "1")) > > > (describe-variable-custom-version-info 'foobar)) > > > > > > Which results in: > > > > > > "This variable was introduced, or its default value was changed, in > > > version 27.1 of Emacs. > > > " > > > > > > But C-h f 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. > > > > The implementation only prefers :package-version for the purposes of > > customize-changed-options, i.e. the Options->Customize Emacs->New > > Options menu item. By contrast, describe-variable-custom-version-info > > is used for displaying the doc strings of options. For a package that > > is bundled with Emacs, I think displaying :version in "C-h v" makes > > sense. If people agree, then this is a minor documentation bug (also > > to be fixed in the ELisp manual), not a code bug. > > > > 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. And to answer your question directly, if I didn't change other functions, it was not on purpose. By the way, I just checked and describe-variable-custom-version-info, which was added in 2007, did not yet exist when I added :package-version in 2006. -- Bill Wohler <wohler@newt.com> aka <Bill.Wohler@nasa.gov> http://www.newt.com/wohler/, GnuPG ID:610BD9AD ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#13824: 24.3.50; :package-version not taking priority over :version 2019-08-10 22:10 ` Bill Wohler 2019-08-10 22:40 ` Bill Wohler @ 2019-08-11 14:01 ` Eli Zaretskii 2019-08-11 18:06 ` Bill Wohler 1 sibling, 1 reply; 8+ messages in thread From: Eli Zaretskii @ 2019-08-11 14:01 UTC (permalink / raw) To: Bill Wohler; +Cc: bzg, stefan, 13824 > cc: Stefan Kangas <stefan@marxist.se>, bzg@altern.org, > 13824@debbugs.gnu.org > From: Bill Wohler <wohler@newt.com> > 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. ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#13824: 24.3.50; :package-version not taking priority over :version 2019-08-11 14:01 ` Eli Zaretskii @ 2019-08-11 18:06 ` Bill Wohler 0 siblings, 0 replies; 8+ messages in thread From: Bill Wohler @ 2019-08-11 18:06 UTC (permalink / raw) To: Eli Zaretskii; +Cc: bzg, stefan, 13824 Eli Zaretskii <eliz@gnu.org> wrote: > > cc: Stefan Kangas <stefan@marxist.se>, bzg@altern.org, > > 13824@debbugs.gnu.org > > From: Bill Wohler <wohler@newt.com> > > 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 <wohler@newt.com> aka <Bill.Wohler@nasa.gov> http://www.newt.com/wohler/, GnuPG ID:610BD9AD ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-08-11 18:06 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-02-26 17:28 bug#13824: 24.3.50; :package-version not taking priority over :version Bastien Guerry 2019-08-08 3:59 ` Stefan Kangas 2019-08-10 9:22 ` Eli Zaretskii 2019-08-10 14:13 ` Stefan Kangas 2019-08-10 22:10 ` Bill Wohler 2019-08-10 22:40 ` Bill Wohler 2019-08-11 14:01 ` Eli Zaretskii 2019-08-11 18:06 ` Bill Wohler
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).