emacscollective / auto-compile

Automatically compile Emacs Lisp libraries
GNU General Public License v3.0
172 stars 16 forks source link

[RFE] Consider submitting to core Emacs #29

Closed jonathanunderwood closed 1 year ago

jonathanunderwood commented 1 year ago

I've been playing around with a chicken and egg problem with auto-compile: I want to have an emacs configuration that is self bootstrapping on new machines, so I am using use-package to manage package installation from init.el. But, ideally, auto-compile would be loaded in early-init.el, before package.el is initialized. There are various ways to kludge around this, but it really would be much easier of auto-compile was part of the core emacs distribution and so available immediately. Has this been considered? To my mind, this package really is the perfect candidate for inclusion in the core distribution, given the nature of its functionality.

tarsius commented 1 year ago

I doubt they would be interested in adding this to emacs.git. They contact maintainers of many popular packages, but they have not contacted me about this one. This relies on advising core functions, which is a no-no, at least for built-in packages (could be changed of course; more work). They don't even enable load-prefer-newer by default, so something more extreme might be--too extreme.

It could be added to [Non]GNU Elpa instead, but that wouldn't help with your situation. Maybe one day I will propose adding it to Emacs, but that could take a while and I make no promises. It is more likely that this will never happen.

I don't think this package is needed during initial setup. use-package (or rather package) should take care of compiling everything that needs to be compiled during that phase. This package is more about compiling after you have edited files yourself.

Simply loading this in early-init.el seems good enough to me, but you might have to wrap that with (when (require 'auto-compile nil t) ...) to avoid issues during initial setup.