Closed emacs18 closed 3 years ago
Thanks for your various attempts. I think I like this one, it's easier to follow and I think it's a sensible path forward.
That said there are still some things to be figured out, since now we will be taking over ~/.emacs.d
.
Currently when there is no ~/.emacs-profile
then chemacs defaults to "default"
, and if there is no ~/.emacs-profiles.el
then it defaults to (("default" . ((user-emacs-directory . "~/.emacs.d"))))
, this is all to mimic the default behavior of loading ~/.emacs.d
, but that will no longer make sense.
I think the right way forward is to enforce having a ~/.emacs-profiles.el
, so if it's not found then print a warning and exit.
Something like this:
[chemacs] .emacs-profiles.el not found. Create it with
[chemacs] echo '(("default" . ((user-emacs-directory . "~/my-emacs-config"))))' > ~/.emacs-profiles.el
These are all fairly impactful breaking changes, so I would like to create a plexus/chemacs2
repo where we put this new early-init compatible version, and leave the old chemacs as is for people that don't need early-init and like things the way they are. plexus/chemacs
can still receive patches if necessary.
Some related things:
chemacs-version
variable to both versions (currently the source says "v0.1" even though we've had multiple changes, I'll bump that number and start keeping a changelog)A final thought, how about we use a chemacs-early-init
variable to signal if we're being loading from early-init or not, and then simply load the main script? That way you could still put chemacs in ~/.emacs
if you wanted to.
For folks following along at home, we are going ahead with the early-init support in a separate repo, https://github.com/plexus/chemacs2/pull/1
This PR has been merged into that repo.
This is yet another attempt which seems to be cleaner in that early-init.el and init.el files use different code so that we don't have to try to deduce between the two within the code.
Most of what was in .emacs is now in chemacs-common.el. early-init.el and init.el simply load this common file and call the main function differently. One sets
early-init-p
argument tot
and the other sets it tonil
.