all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Friendly discussion about (package-initialize)
Date: Sun, 06 Aug 2017 21:39:41 -0400	[thread overview]
Message-ID: <jwvmv7c6v2o.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: CADB4rJHz_mVOS2br1Pfr7CUXGvG-WKsq5BUOYBxLVHifW8H=SA@mail.gmail.com

> Sure, I think it's reasonable for Emacs to provide special support for
> packages which are built in. But there's such a thing as going too
> far.  And I personally think that you've gone too far in providing
> special support when that support actively makes it *more* difficult
> to swap out an alternative implementation.

You wrote lots and lots of lines of text just to complain about the
addition of a single "(package-initialize)" in the user's ~/.emacs,
which should do absolutely nothing in the case where the user doesn't
use package.el (i.e. doesn't have anything inside ~/.emacs.d/elpa).

So, it's not that big of a deal, really.

We could arrange for "(package-initialize)" to only be added if there is
at least one package inside ~/.emacs.d/elpa.

More to the point, I think that's already the case.  So users of other
package managers should simply never bump into this text (unless they
also user package.el, of course).  If they do, they should report it as
a bug.

> * Make it trivial to disable package.el. Right now, the only foolproof
>   way to prevent the init-file from being modified by package.el is to
>   place multiple advices on internal functions, and to do this as

Multiple?  Doesn't

    (advice-add 'package--ensure-init-file :override #'ignore)

do the trick?

I suspect that

    (setq package-enable-at-startup nil)

might also do the trick.

This said, the main motivation for calling package--ensure-init-file
from package-initialize was to fix existing user's config where they had
packages installed yet their .emacs didn't call package-initialize, so
they had trouble configuring their packages.  One might argue that this
situation is now mostly fixed and we could change tactic: only call
package--ensure-init-file when the user installs a package.

Another thing is that rather then look for "(package-initialize)" in
~/.emacs we could keep track of whether package-initialize was called
during initialization.  This will avoid the problem when the user placed
his call in another file.


        Stefan


PS: BTW, I'd be very interested to work with maintainers of other
package managers to see how we could make them better interoperate
(e.g. make it possible to install with one tool, but activate&config
with another).




  reply	other threads:[~2017-08-07  1:39 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 [this message]
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
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=jwvmv7c6v2o.fsf-monnier+gmane.emacs.devel@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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.