[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Friendly discussion about (package-initialize)
From: |
Radon Rosborough |
Subject: |
Re: Friendly discussion about (package-initialize) |
Date: |
Thu, 10 Aug 2017 10:06:34 -0700 |
> This sounds like a contradiction. [...] Now I'm utterly confused.
Sorry, it looks like I failed to provide enough context in the name of
being concise. Let me try again.
The issue is complicated because there are actually a number of
different issues at play, which all interact in different ways.
Firstly, let me describe my ideal world. This would be a world in
which `package-initialize' was not called automatically anywhere, or
inserted into the init-file, or anything. However, new users could
still benefit from package.el because Emacs would generate a template
init-file which would contain a call to `package-initialize', if no
init-file already existed.
Now there is also the question of where it is appropriate to call
`package-initialize'. IMO, the only appropriate place to call it is in
the user's init-file. Doing it anywhere else smells like unnecessary
magic, and limits customizability. For example, calling it in
startup.el after loading the init-file means that package
customizations cannot be put in the init-file (unless you use
`after-init-hook', an advanced and rather nonstandard approach), but
the package management system still works after init. Can you possibly
think of any setup that would be *more* confusing to new users?
Then there is the issue of Emacs automatically modifying the init-file
to stick a call to `package-initialize' in it. I think this behavior
is disgusting because of how fragile and nonstandard it is.
Now let me address your specific concerns.
> If we call package-initialize from startup.el, why does it have to
> also be called from the init files?
IMO, it should not be called anywhere. I think having it only called
in startup.el would be a reasonable compromise. Having Emacs insist on
putting the call into the init-file, but then *also* calling it in
startup.el, makes no sense.
> since you are opposed to Emacs putting tyhis call to init files, why
> do you disagree that calling package-initialize in startup.el is
> wrong?
I do think that the correct place to call `package-initialize' is in
the init-file, but I object to Emacs taking care of this
automatically. It might seem like the best solution at first glance,
but doing it this way has a laundry list of horrible side effects (see
my original email).
> that's where Emacs performs all the initialization for the upcoming
> session, and that should include initializing the packages which
> need initialization.
Like I said, having the call be only in startup.el would be a
perfectly reasonable compromise IMO. My main issue is with Emacs
modifying the init-file automatically.
Does this make more sense? I can elaborate, but briefly:
1. I want `package--ensure-init-file' to go away ASAP.
2. I think Emacs should generate a template init-file; in addition to
making `package--ensure-init-file' mostly superfluous, this would
have other advantages in terms of improving default user
experience.
3. If possible, I'd like startup.el to not call `package-initialize'
either, but this is an order of magnitude less important than (1)
and (2).
Best,
Radon
- Friendly discussion about (package-initialize), Radon Rosborough, 2017/08/06
- Re: Friendly discussion about (package-initialize), Stefan Monnier, 2017/08/06
- Re: Friendly discussion about (package-initialize), Radon Rosborough, 2017/08/06
- Re: Friendly discussion about (package-initialize), Stefan Monnier, 2017/08/06
- Re: Friendly discussion about (package-initialize), Radon Rosborough, 2017/08/07
- Re: Friendly discussion about (package-initialize), Stefan Monnier, 2017/08/09
- Re: Friendly discussion about (package-initialize), Radon Rosborough, 2017/08/09
- Re: Friendly discussion about (package-initialize), Eli Zaretskii, 2017/08/10
- Re: Friendly discussion about (package-initialize), Radon Rosborough, 2017/08/10
- Re: Friendly discussion about (package-initialize), Eli Zaretskii, 2017/08/10
- Re: Friendly discussion about (package-initialize),
Radon Rosborough <=
- Re: Friendly discussion about (package-initialize), Eli Zaretskii, 2017/08/10
- Re: Friendly discussion about (package-initialize), Radon Rosborough, 2017/08/10
- Re: Friendly discussion about (package-initialize), Mark Oteiza, 2017/08/10
- Re: Friendly discussion about (package-initialize), Eli Zaretskii, 2017/08/11
- Re: Friendly discussion about (package-initialize), Nick Helm, 2017/08/10
- Re: Friendly discussion about (package-initialize), Stefan Monnier, 2017/08/11
- Interoperation between package managers (was: Friendly discussion about (package-initialize)), Stefan Monnier, 2017/08/09
- Re: Interoperation between package managers (was: Friendly discussion about (package-initialize)), Radon Rosborough, 2017/08/09
- Re: Interoperation between package managers, Stefan Monnier, 2017/08/10
- Re: Interoperation between package managers, Radon Rosborough, 2017/08/10