doomscript fails under Chemacs2
- Dominant language
- Emacs Lisp
- Stars
- 22.7k
- Forks
- 3.1k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 4
Description
### What did you expect to happen?
executing ```doomscript``` at the commandline, should invoke the named script
### What actually happened?
```
$ doomscript
```
(note that you don't even need a script argument to reproduce the error)
It yields the following failure:
```
Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "core-lib")
require(core-lib)
eval-buffer(# nil "/home/jeff/.emacs.d-doom/core/core.el" nil t) ; Reading at buffer position 10779
load-with-code-conversion("/home/jeff/.emacs.d-doom/core/core.el" "/home/jeff/.emacs.d-doom/core/core.el" nil t)
require(core "/home/jeff/.emacs.d-doom/core/core")
eval-buffer(# nil "/home/jeff/.emacs.d-doom/core/core-cli.el" nil t) ; Reading at buffer position 2647
load-with-code-conversion("/home/jeff/.emacs.d-doom/core/core-cli.el" "/home/jeff/.emacs.d-doom/core/core-cli.el" nil t)
load("/home/jeff/.emacs.d-doom/core/core-cli" nil t)
command-line-1(("--no-splash" "--load" "/home/jeff/.emacs.d-doom/core/core-cli" "--load" "" "--"))
command-line()
normal-top-level()
```
### Describe your attempts to resolve the issue
The root cause is that Chemacs2 needs its ```early-init.el``` executed, but ```doomscript```'s combo of emacs arguments ```-q --no-site-file --batch``` will clearly prevent normal user-land startup. Without Chemacs2 getting a way to execute, it cannot set ```user-emacs-directory``` properly, and so our ```core-lib``` will never be found. Hence the error.
The solution is to _also_ load the ```early-init.el``` from Chemacs2 if we're running in that environment.
Pull request forthcoming.
### Steps to reproduce
```$ doomscript```
### System Information
https://pastebin.com/v7AMjTng
Contributor guide
Assessment
This issue has not been assessed yet.