From: Radon Rosborough <radon.neon@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: Friendly discussion about (package-initialize)
Date: Thu, 10 Aug 2017 10:06:34 -0700 [thread overview]
Message-ID: <CADB4rJFSfTim5jTfySuRpgoyt0JkUDU03B5ZpUocbtr0v_fVfQ@mail.gmail.com> (raw)
In-Reply-To: <83h8xfsx5m.fsf@gnu.org>
> 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
next prev parent reply other threads:[~2017-08-10 17:06 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 0:37 Friendly discussion about (package-initialize) Radon Rosborough
2017-08-07 1:39 ` Stefan Monnier
2017-08-07 2:16 ` Radon Rosborough
2017-08-07 2:44 ` Stefan Monnier
2017-08-07 4:12 ` Radon Rosborough
2017-08-09 20:24 ` Stefan Monnier
2017-08-10 3:32 ` Radon Rosborough
2017-08-10 4:25 ` Eli Zaretskii
2017-08-10 4:39 ` Radon Rosborough
2017-08-10 7:24 ` Eli Zaretskii
2017-08-10 17:06 ` Radon Rosborough [this message]
2017-08-10 19:08 ` Eli Zaretskii
2017-08-10 19:31 ` Radon Rosborough
2017-08-10 20:00 ` Mark Oteiza
2017-08-11 6:14 ` Eli Zaretskii
2017-08-11 1:25 ` Nick Helm
2017-08-11 21:43 ` Stefan Monnier
2017-08-09 20:35 ` Interoperation between package managers (was: Friendly discussion about (package-initialize)) Stefan Monnier
2017-08-10 3:54 ` Radon Rosborough
2017-08-10 21:34 ` Interoperation between package managers Stefan Monnier
2017-08-11 2:14 ` Radon Rosborough
2017-08-11 22:05 ` Stefan Monnier
2017-08-12 17:54 ` Radon Rosborough
2017-08-12 20:53 ` Jonas Bernoulli
2017-08-13 21:43 ` Stefan Monnier
2017-08-13 21:25 ` Stefan Monnier
2017-08-13 22:42 ` Radon Rosborough
2017-08-13 23:32 ` Stefan Monnier
2017-08-14 0:29 ` Radon Rosborough
2017-08-14 8:02 ` Stefan Monnier
2017-08-23 19:39 ` Nikolay Kudryavtsev
2017-08-23 20:58 ` Radon Rosborough
2017-08-24 12:36 ` Nikolay Kudryavtsev
2017-08-24 20:11 ` Radon Rosborough
2017-08-25 14:31 ` Nikolay Kudryavtsev
2017-08-24 15:04 ` Ted Zlatanov
2017-08-24 15:46 ` Nikolay Kudryavtsev
2017-08-07 3:20 ` Friendly discussion about (package-initialize) Noam Postavsky
2017-08-07 4:14 ` Mark Oteiza
2017-08-08 0:47 ` Stefan Monnier
2017-08-10 20:15 ` Mark Oteiza
2017-08-10 21:29 ` Stefan Monnier
2017-08-11 1:14 ` Mark Oteiza
2017-08-11 8:03 ` Clément Pit-Claudel
2017-08-07 6:52 ` Colin Baxter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADB4rJFSfTim5jTfySuRpgoyt0JkUDU03B5ZpUocbtr0v_fVfQ@mail.gmail.com \
--to=radon.neon@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.