-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(build): prefix load paths instead of set #185
Conversation
Thanks for suggesting this PR. Before checking the content, I would like to identify the problem.
Since #178 has been merged, you can use |
My config was originally based on terlar's. I also wanted a custom early-init.el/init.el. I approached it a different route using --init-directory emacs flag so it would work just by installing the package (no home-manager needed). When cleaning up my config I realized it wasn't actually working. I can't fix this in |
The build elisp function is tangential, I should probably migrate my build process to it :) But my understanding is that doesn't solve the runtime lookup of the built eln files. |
See: https://github.com/emacs-mirror/emacs/blob/e59e7278924cd0dca49d4333dba188530721f5a3/lisp/startup.el#L610 where it gets the load paths. We need to make sure the location of early-init.eln is there. |
The reason it works when not using --init-directory is it pushes edit: It is actually more subtle then that. There is a second behavior here to keep in mind even if if this is fixed upstream. Emacs startup assumes the top of the
|
Thank you for looking into the problem space and elaborating. Sounds more difficult than it should be. Why do you want to load the native-compiled early-init.el? Is it intended to improve the startup time? |
Startup time and if you don't byte compile it, emacs byte compiles early-init.el it in the background. I'll update the diff to remove prefixing the |
This isn't the case with my config (installed via home-manager), but if it is, the fix should be the default, and not a customization feature. |
Twist doesn't integrate with |
Allows callers to add their own native load paths. See PR for a long winded explanation of why it is useful for users of `--init-directory`.
This entire thing is a workaround for users of
obviously the correct fix is upstream, but for now its a one liner workaround. |
Okay, this change will not cause any regression to users of home-manager, so I'll merge it. I may override the change in the future depending on priorities. |
@jordanisaacs Thank you for your patience and investigating the issue. |
I reported an upstream bug https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75022, will revert this change if/once a fix lands https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75022 |
Allows callers to add their
EMACSNATIVELOADPATH
. This is a workaround for a bug where--init-directory
is set after the user eln cache is set up. By allowing the caller to add the eln cache directory in the env variable, emacs will be able to discover the byte compiled{early-}init.el
files.