-
Notifications
You must be signed in to change notification settings - Fork 151
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
unrecognized keyword :straight with built in version of use-package #1035
Comments
I was able to get it to work via the following: Test Case(straight-bug-report
:pre-bootstrap
(require 'use-package-core)
:post-bootstrap
(use-package doct :straight t))
OutputBootstrapping straight.el...
Bootstrapping straight.el...done
Looking for gnu-elpa-mirror recipe → Cloning melpa...
Looking for gnu-elpa-mirror recipe → Cloning melpa...done
Looking for nongnu-elpa recipe → Cloning gnu-elpa-mirror...
Looking for nongnu-elpa recipe → Cloning gnu-elpa-mirror...done
Looking for emacsmirror-mirror recipe → Cloning nongnu-elpa...
Looking for emacsmirror-mirror recipe → Cloning nongnu-elpa...done
Looking for emacsmirror-mirror recipe → Cloning el-get...
Looking for emacsmirror-mirror recipe → Cloning el-get...done
Looking for straight recipe → Cloning emacsmirror-mirror...
Looking for straight recipe → Cloning emacsmirror-mirror...done
Building straight...
Building straight...done
Test run with version: prerelease (HEAD -> develop, origin/develop) e407ed5 2022-12-26
Cloning doct...
Cloning doct...done
Building doct...
Building doct...done
Packages:
"straight" n/a develop e407ed5 2022-12-26
"org-elpa" n/a n/a
"melpa" n/a master fbc5475f 2022-12-27
"gnu-elpa-mirror" n/a master eb11995 2022-12-15
"nongnu-elpa" n/a main b552c02813 2022-12-21
"el-get" melpa master 11affb52 2022-12-28
"emacsmirror-mirror" n/a master ec300b5 2022-12-27
"doct" melpa master 506c22f 2022-08-12
This is because straight-use-package-mode internally uses |
Thank you @progfolio adding |
Sorry I jumped the gun. It just cloned melpa and non-gnu-elpa and reverted back to the previous errors. |
Please try evaluating the test case from above in your *scratch* buffer: When it finishes running the *straight-bug-report-process* buffer should pop up. |
It said that lexial binding was required so I run |
Test Case(straight-bug-report
:pre-bootstrap
(require 'use-package-core)
:post-bootstrap
(use-package doct :straight t))
OutputBootstrapping straight.el...
Bootstrapping straight.el...done
Looking for gnu-elpa-mirror recipe → Cloning melpa...
Looking for gnu-elpa-mirror recipe → Cloning melpa...done
Looking for nongnu-elpa recipe → Cloning gnu-elpa-mirror...
Looking for nongnu-elpa recipe → Cloning gnu-elpa-mirror...done
Looking for emacsmirror-mirror recipe → Cloning nongnu-elpa...
Looking for emacsmirror-mirror recipe → Cloning nongnu-elpa...done
Looking for emacsmirror-mirror recipe → Cloning el-get...
Looking for emacsmirror-mirror recipe → Cloning el-get...done
Looking for straight recipe → Cloning emacsmirror-mirror...
Looking for straight recipe → Cloning emacsmirror-mirror...done
Building straight...
Building straight...done
Test run with version: prerelease (HEAD -> develop, origin/develop) e407ed5 2022-12-26
Cloning doct...
Cloning doct...done
Building doct...
Building doct...done
Packages:
"straight" n/a develop e407ed5 2022-12-26
"org-elpa" n/a n/a
"melpa" n/a master fbc5475f 2022-12-27
"gnu-elpa-mirror" n/a master eb11995 2022-12-15
"nongnu-elpa" n/a main b552c02813 2022-12-21
"el-get" melpa master 11affb52 2022-12-28
"emacsmirror-mirror" n/a master ec300b5 2022-12-27
"doct" melpa master 506c22f 2022-08-12
|
The test appears to have passed. |
Currently I am running the config I mentioned above because I'm trying to start from scratch. I'll try it another machine and report if the issue persists. |
Was there any definitive solution for this issue? Running straight.el on the latest Emacs 29 version only works consistently when using my non-bytecompiled init.el file. When loading with my byte-compiled init.elc, the native compilation yields the same error messages as mentioned above (e.g., "Error (use-package): Failed to parse package paradox: use-package: Unrecognized keyword: :straight"). The next time I restart Emacs, the initialization process encounters the following error: "Warning (initialization): An error occurred while loading ‘/Users/bram/.emacs.d/eln-cache/29.0.60-4bf8ba72/init-563b6df7-97eefad5.eln’:". I tried with and without the suggested workaround ("(require 'use-package-core)"). |
@bramadams: See https://www.gnu.org/software/emacs/manual/html_node/elisp/Compiling-Macros.html You'd likely have to wrap some forms in https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html |
Thanks a lot, @progfolio, this suggestion got it to work! My full initialization code to make byte/native compilation work with straight.el on Emacs 29 (23/03/2023 snapshot):
|
I can confirm @bramadams 's solution works. |
Having read the Emacs manual link @progfolio mentioned, I got a feeling I should try out disabling byte-compilation of my init file, thanks for the encouragement @lebensterben :-) |
Yeah, you can definitely byte-compile the init-file, but it takes special handling and custom code to make it work right. Otherwise you'll get all manner of problems. https://github.com/radian-software/radian is one reference configuration for taking care of this with |
What's wrong
I recently compiled Emacs from source. It has built in use-package. When trying to run my setup it fails with the error about unrecognized keyword :straight
Directions to reproduce
Version information
Emacs version:
This is GNU Emacs 30.0.50 (build 7, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, cairo version 1.17.6) of 2022-12-22
Operating system:
Linux fedora 6.0.15-300.fc37.x86_64
The text was updated successfully, but these errors were encountered: