unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Friendly discussion about (package-initialize)
Date: Fri, 11 Aug 2017 10:03:19 +0200	[thread overview]
Message-ID: <e8a1bd6a-a5a4-e021-8e59-2ee47346b95d@gmail.com> (raw)
In-Reply-To: <878tiqkism.fsf@holos>

On 2017-08-11 03:14, Mark Oteiza wrote:
> Sure, `package-load-list' is arguably less likely to be changed, but
> tons of people change `package-archives' to use 3rdp packages, and these
> users are at the core of the argument for this misfeature.  Either
> variable being in the wrong position relative to package-initialize
> breaks things.

I'm not well-versed in these issues, so apologies if this is misguided. Would the following work?

* Call package-initialize *before* loading init.el
* Add two new functions package-set-load-list and package-set-archives that call package-initialize after setting the relevant variables.  This could be extended to any other variable that affect the behavior of package-initialize.  If there are many, a larger package-configure function or macro might be more useful.

The hope it to settle this package.el trouble by providing something that works without requiring users to add a package-initialize form in their .emacs.

I can see the following downsides, and potential fixes:

* What about existing configurations? Presumably they currently call package-initialize, so this wouldn't break things for them.
* What if people set those variables directly and expect things to work? We could add watchpoints on these variables, or keep the package-initialize call that runs after loading init.el.  I don't think people would expect setting a variable to do much, so I don't think thatwould be much of an issue.
* What about performance? Won't these extra (implicit) calls (from package-set-archives etc.) make things slow? We could make them reload only what's needed. IOW, package-set-archives would be akin to (progn (setq package-archives …) (package-refresh)) with package-refresh a new function that builds atop a previous package-initialize call.
* What if I *don't want* to use package.el at all? We could recognize a special dot-file in .emacs.d to disable package.el entirely (say, .nopackage).

On the upside, we get a working configuration for everyone without having to require or insert package-initialize calls in the user's config.

Clément.




  reply	other threads:[~2017-08-11  8:03 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
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8a1bd6a-a5a4-e021-8e59-2ee47346b95d@gmail.com \
    --to=cpitclaudel@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).