The nix package manager supports a flexible way to bundle sets of
Emacs packages, including ahead-of-time native compilation. This
change provides a simple mechanism for insinuating a nix elisp
dependency bundle using chemacs, so that different nix package sets
can be selected using `--with-profile`, along-side profiles using
other package managers or distributions like Spacemacs/Doom.
In Emacs 27 and later `package-initialize` is called automatically
after `early-init.el` but before `init.el`. This change allows that
call to actually work with the user's packages. I left the assignment
in the init code for Emacs versions less than 27 that don't support
`early-init.el`.
directory under native-comp. If the user configures a non-default
eln-cache directory (i.e. somewhere other than ~/.emacs.d/eln-cache),
their expectation is that all native compiled .eln outputs end up in the
new location, since that's what happens without chemacs.
Until this change, chemacs required seq.el which caused seq and its few
dependencies to be native-compiled to the default eln-cache directory
before the user's init files had a chance to set a custom eln-cache
location.
This change removes chemacs' depenency on seq.el, so no native
compilation is triggered when chemacs loads. Note that chemacs itself
isn't native-compiled either, because chemacs isn't loaded as an .elc
file (native-comp looks for .elc files to indicate it should start
the corresponding .el -> .eln native compilation job).
See also https://www.emacswiki.org/emacs/GccEmacs
Currently a profile must first be specified in `~/.emacs-profiles.el`
in order to be used. In most day-to-day usage this is adequate, but
on occasion it is nice to have a 'throw-away' profile. The rationale
for such a profile is trying someone else's config out for a day / hour
or some such, but it's not something you're committed to.
This change enables the following to work:
```bash
emacs --with-profile '((user-emacs-directory . "/tmp/throw-away-config"))'
```
Remove the installation scripts, people should just clone into .emacs.d.
Remove the auto-creation of ~/.emacs-profiles.el, since we no longer can assume
where the default config lives.