c9acdb7 removes doom.cmd because it was broken in most cases. This adds
doom.ps1; an alternative script for Windows+Powershell users, which
properly initializes the state it needs. Naturally, it requires
Powershell 3+ be installed on your systems, but it can be invoked from
either cmd.exe or PowerShell.exe.
This is the first powershell script I've ever written, so I expect edge
cases (for one, shell commands passed to `exit!` will need to be guarded
against the environment).
This also requires emacs.exe be your $PATH, however, unless you set
$EMACS to its path first. E.g.
$env:EMACS = "C:\Program Files\Emacs\emacs-29.4\bin\emacs.exe"
That said, if you use WSL2, you're still far better off using the bash
script (bin/doom).
Ref: c9acdb72a4
LC_ALL must be set to a locale that exists on the current system, and
there is no locale I can safely expect all systems to have (see #7361).
Fortunately, c8070f1 seems to have addressed the underlying issue, so
this fix can be reverted.
Fix: #7361
Revert: #7331
Revert: 150ccd6305
Ref: c8070f11a4
Some shells (like ksh on SDF) may complain about $((...)) arithmetic
expansion syntax. Rather than wrestle with old shells, I'll offload this
trivial operation to elisp instead.
Close: #6970
From now on, our documentation will assume your Emacs config lives in
~/.config/emacs, by default, rather than ~/.emacs.d. Support for the
latter is not going away, it will simply be mentioned less in the
literature, as all supported versions of Emacs going forward (and future
versions of Doom) will support (and prefer) XDG conventions.
The user manual will be updated separately.
Close: #6965
Co-authored-by: gagbo <gagbo@users.noreply.github.com>
Sync definition of __DOOMGEOM in bin/doomscript with corresponding
variable of bin/doom.
* bin/doomscript (__DOOMGEOM): split tput call into two separate calls
Ref: beef0aef02
While fixing #6772, we also address several other issues found by
sh-shellcheck:
L47C39 SC1007:Remove space after = if trying to assign a value
(for empty string, use var='' ... ).
L47C46 SC2046:Quote this to prevent word splitting.
L62C20 SC2086:Double quote to prevent globbing and word splitting.
L82C9 SC2154:tmpdir is referenced but not assigned
(did you mean 'TMPDIR'?).
When trying to establish the value of EMACSDIR, the proper fallback
when BASH_SOURCE is undefined is $0 rather than 0, in correct shell-
scripting parlance.
BREAKING CHANGE: This restructures the project in preparation for Doom
to be split into two repos. Users that have reconfigured Doom's CLI
stand a good chance of seeing breakage, especially if they've referred
to any core-* feature, e.g.
(after! core-cli-ci ...)
To fix it, simply s/core-/doom-/, i.e.
(after! doom-cli-ci ...)
What this commit specifically changes is:
- Renames all core features from core-* to doom-*
- Moves core/core-* -> lisp/doom-*
- Moves core/autoloads/* -> lisp/lib/*
- Moves core/templates -> templates/
Ref: #4273
This killed the script prematurely (without displaying the error) if
Emacs failed to execute. In versions prior to bash 4, set -e would not
terminate the script if a non-zero exit code occurred within a subshell,
but it will in bash 4+.
In any case, we don't need this fallback to begin with. The script
handles its errors sufficiently otherwise.
I had missed the fact that -Q implies not only
--no-site-file (intended), but --no-site-lisp (unintended). Without the
latter, no site-lisp directory is left in load-path, and any attempt to
load it after-the-fact (which I do in core-cli.el) will fail. Thanks to
@yamanq for noticing this!
Fix: #6473Fix: #4198
Co-authored-by: Yaman Qalieh <yamanq@users.noreply.github.com>
If no EMACSDIR is given, assume ../ is the Emacs config we want to
operate out of, taking after bin/doom.
And use bash. This script was designed for the convenience of other
scripters on unix systems, so it can afford a small hit to portability.
Meant as a simple elisp interpreter with Doom's CLI framework preloaded.
Can be used as a shebang line:
#!/usr/bin/env doomscript
(princ "hello world!")
This isn't used for bin/doom because it requires doomscript be in your
$PATH, and any attempt to resolve its location in bin/doom's shebang
line would reduce its portability. Neither of these should be an issue
for the type of user who'd find this useful.