all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Summary and next steps for (package-initialize)
@ 2017-08-20  2:38 Radon Rosborough
  2017-08-20  6:10 ` Drew Adams
                   ` (5 more replies)
  0 siblings, 6 replies; 106+ messages in thread
From: Radon Rosborough @ 2017-08-20  2:38 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 106+ messages in thread
* Re: Summary and next steps for (package-initialize)
@ 2017-08-21  8:24 angelo.g0
  2017-08-21 16:22 ` Radon Rosborough
  0 siblings, 1 reply; 106+ messages in thread
From: angelo.g0 @ 2017-08-21  8:24 UTC (permalink / raw)
  To: emacs-devel

> > Do you like the idea of Emacs modifying the user's init-file
> > automatically, even if it already exists? If not, then do you agree
> > that my proposal at least reduces the problem?
>
> I don't like either of these, but again, I see no significant
> improvement, if at all.

As simple user, I hope you do not proliferate the number of initialization files.

If someone remember, I already flagged that the silently modification of init.el is not good but adding another file is even worse; in that discussion there was the suggestion to add this to init.el:

  (setq custom-file "~/.emacs.d/custom.el")
  (load custom-file)

and now everything is under control..

BTW, Emacs works also without the information saved in the init.el or custom.el files...

Ciao,
  Angelo.



^ permalink raw reply	[flat|nested] 106+ messages in thread

end of thread, other threads:[~2017-08-26 22:33 UTC | newest]

Thread overview: 106+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-20  2:38 Summary and next steps for (package-initialize) Radon Rosborough
2017-08-20  6:10 ` 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

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.