GNU bug report logs - #17530
24.4.50; `package-load-list': incorrect defcustom type

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Mon, 19 May 2014 16:28:01 UTC

Severity: minor

Found in version 24.4.50

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17530 in the body.
You can then email your comments to 17530 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17530; Package emacs. (Mon, 19 May 2014 16:28:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 19 May 2014 16:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; `package-load-list': incorrect defcustom type
Date: Mon, 19 May 2014 09:26:45 -0700 (PDT)
The defcustom type is (repeat symbol), but the doc string says that it
should be a repetition of entries like this:

1. The symbol `all' (only).
2. List (NAME VERSION), where NAME is a symbol and VERSION is one of
   these: t, a string, or nil.

So it is currently effectively impossible to customize this option.



In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-04-29 on ODIEONE
Bzr revision: 117031 monnier <at> iro.umontreal.ca-20140429151607-qnkgbymwfaj5ut08
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/snapshot/trunk
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
 LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include''




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17530; Package emacs. (Mon, 19 May 2014 16:34:02 GMT) Full text and rfc822 format available.

Message #8 received at 17530 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: 17530 <at> debbugs.gnu.org
Subject: RE: bug#17530: 24.4.50; `package-load-list': incorrect defcustom type
Date: Mon, 19 May 2014 09:33:02 -0700 (PDT)
And why is the default value `all'?

If someone does not customize this or does `package-initialize' in
their init file before loading `custom-file' then they might be in
for an unwelcome surprise, depending on what packages they have
locally.

The default value would be better as nil, IMHO.




Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Sun, 15 Sep 2019 00:30:02 GMT) Full text and rfc822 format available.

Notification sent to Drew Adams <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Sun, 15 Sep 2019 00:30:02 GMT) Full text and rfc822 format available.

Message #13 received at 17530-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 17530-done <at> debbugs.gnu.org
Subject: Re: bug#17530: 24.4.50; `package-load-list': incorrect defcustom type
Date: Sun, 15 Sep 2019 02:29:28 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> The defcustom type is (repeat symbol), but the doc string says that it
> should be a repetition of entries like this:
>
> 1. The symbol `all' (only).
> 2. List (NAME VERSION), where NAME is a symbol and VERSION is one of
>    these: t, a string, or nil.
>
> So it is currently effectively impossible to customize this option.

This has subsequently been fixed:

commit 9be8a2fb41043b4d4734a67f155d6923df10671b
Author: Glenn Morris <rgm <at> gnu.org>
Date:   Thu Jan 28 08:58:43 2016 -0800

    * lisp/emacs-lisp/package.el (package-load-list): Improve :type.

I'm therefore closing this bug report.

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17530; Package emacs. (Sun, 15 Sep 2019 14:01:02 GMT) Full text and rfc822 format available.

Message #16 received at 17530-done <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 17530-done <at> debbugs.gnu.org
Subject: RE: bug#17530: 24.4.50; `package-load-list': incorrect defcustom type
Date: Sun, 15 Sep 2019 07:00:37 -0700 (PDT)
> This has subsequently been fixed:
> 
> commit 9be8a2fb41043b4d4734a67f155d6923df10671b
> Author: Glenn Morris <rgm <at> gnu.org>
> Date:   Thu Jan 28 08:58:43 2016 -0800
> 
>     * lisp/emacs-lisp/package.el (package-load-list): Improve :type.
> 
> I'm therefore closing this bug report.

OK; good that the :type spec was fixed.

But at least in Emacs 26.3, the default is still
`(all)'.  For the record, this part of the problem
hasn't been addressed:

> If someone does not customize this or does
> `package-initialize' in their init file before
> loading `custom-file' then they might be in
> for an unwelcome surprise, depending on what
> packages they have locally.
>
> The default value would be better as nil, IMHO.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17530; Package emacs. (Sun, 15 Sep 2019 15:38:01 GMT) Full text and rfc822 format available.

Message #19 received at 17530 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Stefan Kangas <stefan <at> marxist.se>, 17530 <at> debbugs.gnu.org
Subject: Re: bug#17530: 24.4.50; `package-load-list': incorrect defcustom type
Date: Sun, 15 Sep 2019 11:37:43 -0400
Drew Adams <drew.adams <at> oracle.com> writes:

> But at least in Emacs 26.3, the default is still
> `(all)'.  For the record, this part of the problem
> hasn't been addressed:
>
>> If someone does not customize this or does
>> `package-initialize' in their init file before
>> loading `custom-file' then they might be in
>> for an unwelcome surprise, depending on what
>> packages they have locally.
>>
>> The default value would be better as nil, IMHO.

A default of nil would mean that no packages are loaded.  So pretty much
anyone installing packages would have to customize it to `(all)' in
order to get their packages working.  That sounds like a worse default.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17530; Package emacs. (Sun, 15 Sep 2019 21:28:02 GMT) Full text and rfc822 format available.

Message #22 received at 17530 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: Stefan Kangas <stefan <at> marxist.se>, 17530 <at> debbugs.gnu.org
Subject: RE: bug#17530: 24.4.50; `package-load-list': incorrect defcustom type
Date: Sun, 15 Sep 2019 14:27:16 -0700 (PDT)
> > But at least in Emacs 26.3, the default is still
> > `(all)'.  For the record, this part of the problem
> > hasn't been addressed:
> >
> >> If someone does not customize this or does
> >> `package-initialize' in their init file before
> >> loading `custom-file' then they might be in
> >> for an unwelcome surprise, depending on what
> >> packages they have locally.
> >>
> >> The default value would be better as nil, IMHO.
> 
> A default of nil would mean that no packages are loaded.

No, just by default.  No packages loaded by default.

> So pretty much anyone installing packages

No, anyone who wants to _load_ packages.  You would
specify/configure which packages to load, yes.  Is
that outlandish or too restrictive?

> would have to customize it to `(all)' in order to
> get their packages working.  That sounds like a
> worse default.

Not to me, it doesn't.  Just because you've installed
some packages doesn't mean you want them to all to be
loaded.  That's a bit like automatically applying
`require' to everything you have in your `load-path'.

Why would we assume that, by default, users should
load the latest installed versions of all installed
packages?

Do I feel strongly about this?  No.  But it seems
wrong.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17530; Package emacs. (Sun, 15 Sep 2019 21:40:02 GMT) Full text and rfc822 format available.

Message #25 received at 17530 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Noam Postavsky <npostavs <at> gmail.com>, 17530 <at> debbugs.gnu.org
Subject: Re: bug#17530: 24.4.50; `package-load-list': incorrect defcustom type
Date: Sun, 15 Sep 2019 23:39:27 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> > So pretty much anyone installing packages
>
> No, anyone who wants to _load_ packages.  You would
> specify/configure which packages to load, yes.  Is
> that outlandish or too restrictive?

It's too restrictive, yes.  You have already specified that you want
to use them by installing them.

>> would have to customize it to `(all)' in order to
>> get their packages working.  That sounds like a
>> worse default.
>
> Not to me, it doesn't.  Just because you've installed
> some packages doesn't mean you want them to all to be
> loaded.

In this use case you would customize `package-initialize' to only load
what you're interested in.

> Why would we assume that, by default, users should
> load the latest installed versions of all installed
> packages?

Because that's what most users would expect, I think.

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17530; Package emacs. (Sun, 15 Sep 2019 22:08:02 GMT) Full text and rfc822 format available.

Message #28 received at 17530 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Noam Postavsky <npostavs <at> gmail.com>, 17530 <at> debbugs.gnu.org
Subject: RE: bug#17530: 24.4.50; `package-load-list': incorrect defcustom type
Date: Sun, 15 Sep 2019 15:05:25 -0700 (PDT)
> > > So pretty much anyone installing packages
> >
> > No, anyone who wants to _load_ packages.  You would
> > specify/configure which packages to load, yes.  Is
> > that outlandish or too restrictive?
> 
> It's too restrictive, yes.  You have already specified
> that you want to use them by installing them.

Really?  How so?  Installing isn't loading.  Mightn't
a user install some packages that s?he doesn't want to
load?

After all, isn't that the _point_ of this user option?
A user might install packages at various times, for
various reasons.  Why would it follow that s?he wants
to load them all by default?

Isn't "installing" essentially downloading, compiling,
and setting up autoloads?  It doesn't imply loading,
AFAIK.

> >> would have to customize it to `(all)' in order to
> >> get their packages working.  That sounds like a
> >> worse default.
> >
> > Not to me, it doesn't.  Just because you've installed
> > some packages doesn't mean you want them to all to be
> > loaded.
> 
> In this use case you would customize `package-initialize'
> to only load what you're interested in.

Customization can work for any use case.  That doesn't
speak to what the default value should be.  It's just
as arguable that if you want all then you customize to
`(all)'.

> > Why would we assume that, by default, users should
> > load the latest installed versions of all installed
> > packages?
> 
> Because that's what most users would expect, I think.

I'm asking why you think that.

You don't think that most users would expect that all
libraries in their `load-path' should be loaded by
default, do you?  (I don't.)  If you don't, then why
do you think differently about installed packages?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17530; Package emacs. (Sun, 15 Sep 2019 22:28:01 GMT) Full text and rfc822 format available.

Message #31 received at 17530 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Noam Postavsky <npostavs <at> gmail.com>, 17530 <at> debbugs.gnu.org
Subject: Re: bug#17530: 24.4.50; `package-load-list': incorrect defcustom type
Date: Mon, 16 Sep 2019 00:27:41 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> Really?  How so?  Installing isn't loading.  Mightn't
> a user install some packages that s?he doesn't want to
> load?
>
> After all, isn't that the _point_ of this user option?

Yes, this defcustom exists to support the use case where a user wants
to specify which packages to load.

> > > Why would we assume that, by default, users should
> > > load the latest installed versions of all installed
> > > packages?
> >
> > Because that's what most users would expect, I think.
>
> I'm asking why you think that.

For starters, it's been the default for a long time.  But more
importantly, the overwhelmingly common use case is that a user only
installs a package that he/she wants to use.  That means that it has
to be loaded.

Of course, some users might install a package for other reasons.
Therefore it makes sense to allow them to specify exactly what
packages to load.

> You don't think that most users would expect that all
> libraries in their `load-path' should be loaded by
> default, do you?  (I don't.)  If you don't, then why
> do you think differently about installed packages?

Well, no, but I also don't think that this is a very good comparison.
In this case, you have to specify with a call to require that you want
to load it.  In the package.el case, you specify it by installing it.
Nothing is loaded blindly or unexpectedly.

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17530; Package emacs. (Sun, 15 Sep 2019 23:39:02 GMT) Full text and rfc822 format available.

Message #34 received at 17530 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Stefan Kangas <stefan <at> marxist.se>, 17530 <at> debbugs.gnu.org
Subject: Re: bug#17530: 24.4.50; `package-load-list': incorrect defcustom type
Date: Sun, 15 Sep 2019 19:38:14 -0400
Drew Adams <drew.adams <at> oracle.com> writes:

> Isn't "installing" essentially downloading, compiling,
> and setting up autoloads?  It doesn't imply loading,
> AFAIK.

package-load-list controls the "setting up autoloads" (and load-path)
part.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17530; Package emacs. (Mon, 16 Sep 2019 01:19:01 GMT) Full text and rfc822 format available.

Message #37 received at 17530 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: Stefan Kangas <stefan <at> marxist.se>, 17530 <at> debbugs.gnu.org
Subject: RE: bug#17530: 24.4.50; `package-load-list': incorrect defcustom type
Date: Sun, 15 Sep 2019 18:18:19 -0700 (PDT)
> > Isn't "installing" essentially downloading, compiling,
> > and setting up autoloads?  It doesn't imply loading,
> > AFAIK.

N> package-load-list controls the "setting up autoloads" (and load-path)
N> part.

OK.

S> the overwhelmingly common use case is that a user
S> only installs a package that he/she wants to use.

OK.  I'll take your word for it.  But it's not what I
expected.

I'm no expert on package.el or how most people use it.
It seemed odd to me that just installing should, by
default, also automatically load everything installed.
But I guess that's a misunderstanding on my part.

I use `load-path' and `require', and I've put tons of
stuff in my `load-path' that I rarely, if ever, load.
I imagined that many package users would similarly
install stuff they don't want to load systematically.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 14 Oct 2019 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 194 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.