From: Radon Rosborough <radon.neon@gmail.com>
To: emacs-devel@gnu.org
Subject: Summary and next steps for (package-initialize)
Date: Sat, 19 Aug 2017 19:38:05 -0700 [thread overview]
Message-ID: <CADB4rJG9kCvp8iRXM_BMMhv1_MKqKV-hdTZCc4h3MkzVdPhHAg@mail.gmail.com> (raw)
SUBJECT: Summary and next steps for (package-initialize)
FROM: radon.neon@gmail.com
TO: emacs-devel@gnu.org
Hi all,
Last week I posted an inquiry [1] about package.el's auto-insertion of
code into the init-file. Six people weighed in, but no definitive
conclusion was reached. I would like to propose concrete next steps,
summarizing relevant parts of the discussion in the process.
==> The proposal
The `package--ensure-init-file' logic will be removed, and package.el
will not ever directly modify the user's init-file. However, if Emacs
is started with no init-file, then a default one will be generated and
loaded (except in 'emacs -Q'). This template init-file would include a
call to (package-initialize) and some comments explaining that package
configuration must be put after (package-initialize).
==> The disadvantages of this proposal
* If somebody (1) has an existing init-file, (2) uses package.el to
install a package, (3) adds configuration code directly to their
init-file, (4) fails to read the documentation about the need for
`package-initialize', and (5) has not used package.el in the last
year or two, then their package configurations will not work.
I argue that this specific use case is virtually nonexistent. In
particular, the vast majority of people already have
(package-initialize) in their init-file due to the previous behavior
of package.el, and new users will get to use the template init-file.
Thus, I do not think this is a real disadvantage. Please tell me if
you disagree.
* Emacs is creating a whole file without being asked.
I argue that the current behavior is worse in this regard than the
proposed behavior. The current behavior is that user-created files
are edited automatically by Emacs. The proposed behavior is that
nonexistent files are created automatically by Emacs. It seems clear
to me that automatic file creation is much safer than automatic file
editing.
Thus, I do not think this is a real disadvantage. Please tell me if
you disagree.
==> The advantages of this proposal
* Emacs does not automatically modify the user's init-file without
asking. This eliminates a wide range of unfortunate and annoying
side-effects, as you can imagine. Here are two:
- People who don't want to use package.el don't get irrelevant and
damaging (because of duplicate loading) code stuck in their
config.
- People who use package.el but call (package-initialize) in some
file other than init.el will not get a superfluous call inserted
(which might well break their config) if there happens to be an
error during init.
* In future, if we wish to improve the "out-of-the-box" user
experience, we can do so without needing to break backwards
compatibility, by simply modifying the template init-file.
* It's consistent with standard best practices. All other programs
which have a similar problem to package.el solve it by providing a
template config file. The reason that all these other programs avoid
modifying their config files is the same reason that package.el
should avoid modifying the init-file as well.
* It will never accidentally place (package-initialize) in the wrong
place, which happens frequently with the current system and defeats
the entire purpose of an aggressive hack to make things "just work".
In fact, the current system *always* places (package-initialize) in
the wrong place if the user happened to customize anything like
`package-archives' in their init-file (which is extremely common,
and I'd go so far as to say that *not* doing this is the uncommon
case).
==> Things that are unaffected by this proposal
* New user experience is unaffected. Package installation and
configuration continues to work out-of-the-box.
* Emacs will still automatically call `package-initialize' in
startup.el after loading the init-file, unless it was already
called, or `package-enable-at-startup' is set to nil.
==> Conclusion
If you object to this proposal, please tell me what the concrete
disadvantages to it would be, or explain why the advantages I have
listed are not valid. Otherwise, let's start the process of figuring
out the best implementation.
Best,
Radon Rosborough
[1]: https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00154.html
next reply other threads:[~2017-08-20 2:38 UTC|newest]
Thread overview: 106+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-20 2:38 Radon Rosborough [this message]
2017-08-20 6:10 ` Summary and next steps for (package-initialize) Drew Adams
2017-08-20 17:20 ` Radon Rosborough
2017-08-20 18:09 ` Drew Adams
2017-08-20 18:39 ` Radon Rosborough
2017-08-21 0:33 ` Drew Adams
2017-08-21 4:08 ` Radon Rosborough
2017-08-20 8:13 ` Stefan Monnier
2017-08-20 17:21 ` Radon Rosborough
2017-08-20 8:15 ` Clément Pit-Claudel
2017-08-20 17:21 ` Radon Rosborough
2017-08-20 14:20 ` Eli Zaretskii
2017-08-20 16:37 ` Alex
2017-08-20 16:44 ` Eli Zaretskii
2017-08-20 16:46 ` Yuri Khan
2017-08-20 16:54 ` Drew Adams
2017-08-20 17:18 ` Colin Baxter
2017-08-22 21:24 ` Alex
2017-08-20 17:22 ` Radon Rosborough
2017-08-20 17:36 ` Eli Zaretskii
2017-08-20 17:54 ` Radon Rosborough
2017-08-21 16:35 ` Eli Zaretskii
2017-08-21 16:43 ` Radon Rosborough
2017-08-21 17:40 ` Eli Zaretskii
2017-08-21 20:33 ` Radon Rosborough
2017-08-22 2:37 ` Eli Zaretskii
2017-08-22 4:52 ` Radon Rosborough
2017-08-22 8:41 ` Clément Pit-Claudel
2017-08-22 16:02 ` Radon Rosborough
2017-08-22 14:33 ` Eli Zaretskii
2017-08-22 18:09 ` Radon Rosborough
2017-08-22 21:01 ` Clément Pit-Claudel
2017-08-21 9:04 ` Stefan Monnier
2017-08-21 14:31 ` Eli Zaretskii
2017-08-21 16:34 ` Radon Rosborough
2017-08-21 17:47 ` Clément Pit-Claudel
2017-08-22 11:37 ` Timur Aydin
2017-08-22 16:58 ` Radon Rosborough
2017-08-22 21:04 ` Clément Pit-Claudel
2017-08-23 5:17 ` Radon Rosborough
2017-08-23 11:33 ` Angelo Graziosi
2017-08-23 17:16 ` Radon Rosborough
2017-08-23 13:28 ` Drew Adams
2017-08-23 17:31 ` Radon Rosborough
2017-08-23 18:00 ` Drew Adams
2017-08-23 18:32 ` Radon Rosborough
2017-08-23 20:27 ` Drew Adams
2017-08-23 20:59 ` Clément Pit-Claudel
2017-08-23 21:21 ` Drew Adams
2017-08-23 21:44 ` Clément Pit-Claudel
2017-08-23 21:53 ` Drew Adams
2017-08-24 0:44 ` Radon Rosborough
2017-08-24 6:39 ` Drew Adams
2017-08-25 1:03 ` Radon Rosborough
2017-08-24 17:14 ` Eli Zaretskii
[not found] ` <<83fucg99cj.fsf@gnu.org>
2017-08-24 17:44 ` Drew Adams
2017-08-24 18:12 ` Clément Pit-Claudel
2017-08-24 18:29 ` Drew Adams
2017-08-24 21:34 ` Clément Pit-Claudel
2017-08-24 21:40 ` Drew Adams
2017-08-25 1:04 ` Radon Rosborough
2017-08-24 18:14 ` Eli Zaretskii
[not found] ` <<83bmn496js.fsf@gnu.org>
2017-08-24 18:36 ` Drew Adams
2017-08-24 18:57 ` Eli Zaretskii
2017-08-25 1:04 ` Radon Rosborough
2017-08-25 1:04 ` Radon Rosborough
2017-08-23 3:15 ` Stefan Monnier
2017-08-24 16:47 ` Eli Zaretskii
2017-08-24 17:48 ` Stefan Monnier
2017-08-24 18:26 ` Eli Zaretskii
2017-08-25 3:52 ` Stefan Monnier
2017-08-25 3:59 ` Radon Rosborough
2017-08-25 4:39 ` Stefan Monnier
2017-08-25 4:45 ` Radon Rosborough
2017-08-25 4:48 ` Stefan Monnier
2017-08-25 6:47 ` Eli Zaretskii
2017-08-25 11:51 ` Stefan Monnier
2017-08-25 1:04 ` Radon Rosborough
2017-08-25 4:14 ` Stefan Monnier
2017-08-25 4:28 ` Radon Rosborough
2017-08-25 4:47 ` Stefan Monnier
2017-08-25 21:07 ` Stefan Monnier
2017-08-25 21:34 ` Radon Rosborough
2017-08-26 22:29 ` Stefan Monnier
2017-08-26 22:33 ` Radon Rosborough
2017-08-21 16:18 ` Radon Rosborough
2017-08-20 19:09 ` Mark Oteiza
2017-08-23 15:57 ` Nikolay Kudryavtsev
2017-08-23 18:17 ` Radon Rosborough
2017-08-23 19:17 ` Nikolay Kudryavtsev
2017-08-23 19:38 ` Radon Rosborough
2017-08-23 20:09 ` Nikolay Kudryavtsev
2017-08-24 0:13 ` Radon Rosborough
2017-08-24 13:44 ` Nikolay Kudryavtsev
2017-08-25 1:04 ` Radon Rosborough
2017-08-24 17:12 ` Eli Zaretskii
2017-08-23 22:30 ` Nathan Moreau
2017-08-24 0:54 ` Radon Rosborough
2017-08-24 11:13 ` Nathan Moreau
2017-08-24 17:02 ` Eli Zaretskii
2017-08-24 17:52 ` Nikolay Kudryavtsev
2017-08-24 18:31 ` Eli Zaretskii
2017-08-25 13:48 ` Nikolay Kudryavtsev
-- strict thread matches above, loose matches on Subject: below --
2017-08-21 8:24 angelo.g0
2017-08-21 16:22 ` Radon Rosborough
2017-08-21 19:35 ` Angelo Graziosi
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=CADB4rJG9kCvp8iRXM_BMMhv1_MKqKV-hdTZCc4h3MkzVdPhHAg@mail.gmail.com \
--to=radon.neon@gmail.com \
--cc=emacs-devel@gnu.org \
/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.