Put native compiled files in user-emacs-directory/eln-cache#910
Merged
Put native compiled files in user-emacs-directory/eln-cache#910
Conversation
* Makefile (HYPB_BYTE_COMP_ELN_LOAD_PATH): Add users eln-cache last in
native-comp-eln-load-path so that batch-byte+native-compile uses that
for storing the en-files.
(%.elc): Use HYPB_BYTE_COMP_ELN_LOAD_PATH.
Owner
|
I think a lot of people today use native compilation so having a make target and build hyperbole with that is a useful feature to have if we can work out the location location to save the ELN files.
|
Owner
|
Also look at whether remove-package will update the eln-cache. |
rswgnu
approved these changes
Mar 21, 2026
Collaborator
Author
Having a make target for it is not really needed and its usefulness can be questioned:
|
Collaborator
Author
I don't think that is a problem. The eln-file is not standalone as elc. Without an el- or elc-file it will not be used and I think there are timestamp and hash-code checks that the eln-file is a valid native version of the source file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Put native compiled files in user-emacs-directory/eln-cache.
Why
The function
batch-byte+native-compilestores the eln files in the last dir innative-comp-eln-load-path. This means that the system folder is preferred by this function. Only workaround is to append the user cache last. This was unnoticed since I used native compilation on a machine where I also build Emacs for the user and have write permission in the system folder. When trying theelntarget on a machine with a system installed Emacs this does not work.Note
I'm really thinking of removing the native build support from the Makefile. It does not seem to give us anything since the byte compilation provides all warnings and errors.