Commit Graph

597 Commits

Author SHA1 Message Date
41987bb00f fix(cli): persist correct doom-log-level to after-scripts 2024-09-13 23:07:13 -04:00
0e5935f0f7 fix(cli): "Argument list too long" error from after-scripts
Because a persisted envvar was larger than MAX_ARG_STRLEN (which is
typically ~2kb).
2024-09-13 23:07:13 -04:00
14189be77c fix: out-of-bounds error if this-single-command-raw-keys is empty
It seems there's an edge case in EXWM where input events may occur
without keys to cause them (#8064), so these two keybind fixes need to
be ready to receive an empty vector from `this-single-command-raw-keys`.

Fix: #8064
2024-09-13 23:07:13 -04:00
9359a81e81 fix: gui frames fail to open from emacsclient
This was a tricky regression to track down. 9753bfb tries to fix an
issue where the `default` face's :foreground changes to `#000000` in any
new frames created after the initial one (by calling `make-frame`),
because those frames' `background-color` and `foreground-color`
parameters default to "#000000" (possibly a bug with `disable-theme` too
eagerly defaulting them to black).

240493a replaces that with new, seemingly cleaner approach: setting
`frame-inherited-parameters`, which instructs `make-frame` to copy those
parameters from the last open frame, however, those parameters in the
initial daemon frame will be set to "unspecified-bg" or
"unspecified-fg" (see the docstring for `face-{back,fore}ground`), which
are invalid color strings. `make-frame` crashes tries to create a frame
with those color values, causing #8059.

Fix: #8059
Amend: 240493ae92
Amend: 9753bfb775
2024-09-12 06:06:25 -04:00
288b6dc962 fix(cli): doom run: symlinks to XDG dirs beyond $HOME
The targets for $XDG_*_HOME symlinks weren't created correctly if they
were set to an absolute path outside of the user's $HOME.

Fix: #8062
2024-09-11 20:08:16 -04:00
9bd9d55354 fix(lib): define doom-context-error 2024-09-11 19:46:15 -04:00
3256fc7fca fix: trigger defcustom setters in files opened from command-line 2024-09-11 19:46:15 -04:00
19d68887b1 refactor: remove redundant auto-mode-alist entries
I moved these into lisp/init.el in e02d3c7, but didn't remove the old
forms (though they weren't doing anything, anyway).

Amend: e02d3c79a9
2024-09-11 19:46:15 -04:00
70bfb9f0e9 docs: letf!: add demo & rewrite docstring 2024-09-11 19:46:15 -04:00
a974210605 refactor(lib): letf!: use define-advice & split defun/defun* 2024-09-11 19:46:15 -04:00
4ca5819532 fix(lib): file!: lower current-load-list priority
Also changes it to consider base buffer's filename (for `eval`
contexts).
2024-09-11 19:46:15 -04:00
f8f2b28580 feat: add doom-log-level
Gives doom-log that capability of indicating log levels for its
messages, so that I can later work of reducing excessive logging in
`doom-debug-mode`.
2024-09-11 19:46:15 -04:00
771fccc52b nit: minor reformatting & revision
Also corrects the version string of obsolete variable `+mu4e-backend`.
2024-09-11 19:46:14 -04:00
6d7a39c482 tweak: load site-lisp verbosely in debug mode 2024-09-11 19:46:14 -04:00
546e56f1fa fix: suppress visual startup optimizations in debug mode
Also interferes with doom/sandbox's launch targets.
2024-09-11 19:46:14 -04:00
a8515034de refactor: rename childframe predicate function
- The name reflected the opposite of what it detected.
- It should be treated as an internal (not public) function.
2024-09-11 19:46:14 -04:00
240493ae92 fix: face-* calls crashing new emacsclient frames
Those `face-*` calls sometimes returned nil, causing new frames spawned
from emacsclient to quietly crash sometimes. By instead relying on
`frame-inherited-parameters` we achieve the same but more stable result.

Amend: 9753bfb775
2024-09-11 19:46:14 -04:00
5a4aa916bc fix: adding newly created project to known-projects
Fix: #7413
2024-09-11 03:50:57 -04:00
a022e55c08 fix(lib): doom/sandbox: vanilla-doom+ target
Between this and 60083a2, doom/sandbox is now fully functional (this is
a stopgap fix until v3.0).

Ref: 60083a2626
Fix: #5845
Fix: #6505
Fix: #7486
2024-09-10 17:56:35 -04:00
60083a2626 fix(lib): doom/sandbox
Fixes all the launch paths *except* for `vanilla-doom+` (Doom core +
modules - private config), which needs some work from v3 to properly
fix.
2024-09-10 17:26:54 -04:00
86b7bef512 fix: type error if default returns nil :foreground/:background
Ref: #8059
2024-09-10 17:20:16 -04:00
e02d3c79a9 feat: backport safe-local-variable-directories from Emacs 30 2024-09-10 04:18:39 -04:00
632a091abb refactor: remove unneeded optimizations
Neither of these have had enough/any impact on runtime performance to
warrant keeping them.
2024-09-09 00:35:57 -04:00
871efdce08 refactor: windows: move doom dirs to %LOCALAPPDATA%
More appropriate location for these files on Windows than %APPDATA%.
2024-09-07 19:04:37 -04:00
6025e141aa perf(lib): minor optimizations
To reduce allocations in hot loops.
2024-09-07 19:04:37 -04:00
de1ffbca11 feat: distinguish [C-m] key from RET
Now, uses can rebind ctrl+m by targeting [C-m] (or "<C-m>", same thing),
and it won't rebind RET. This will only work in GUI Emacs, however, and
there is no kkp support for this one.

Ref: 96d7e50f3e
2024-09-07 14:50:32 -04:00
4fc11b696e tweak: projectile: don't follow symlinks by default
Experienced users (the type to use symlinks in their projects) can add
-L back to `projectile-git-fd-args`, otherwise, its poorer UX for
beginners if Projectile indexes symlinked build artifacts (like 'result'
symlinks by Nix); i.e. things they didn't symlink themselves.

Fix: #7781
2024-09-07 14:20:29 -04:00
2d3821741a refactor(cli): introduce doom-cli-shell
Instead of constantly checking $__DOOMSH, since I may eventually add
additional values for it (like in the cases where the doom script is
invoked by bin/doomscript, from a terminal emulator in Emacs, or future
wrappers).
2024-09-07 13:52:25 -04:00
2981aec4dd fix(lib): doom/{reload,upgrade}: double-escaped %s in command
Amend: f644c4fa6c
2024-09-07 13:51:21 -04:00
73ab554566 fix(cli): don't auto-invoke pager under powershell
Need to find a pager that works on Windows.
2024-09-07 04:03:02 -04:00
4c7aec35ba fix(cli): envvar injection into bin/doom post-script 2024-09-07 02:42:34 -04:00
f644c4fa6c feat: add basic android support 2024-09-07 01:06:33 -04:00
8d2cf32fef feat(cli): add doom.ps1 for Windows users
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
2024-09-07 01:05:57 -04:00
9753bfb775 fix: {back,fore}ground-color in subsequent frames
New frames created after the first get initialized with #000000 as their
{back,fore}ground-color parameters, for some reason, making text
unreadable in dark themes.
2024-09-07 01:05:57 -04:00
6d9a7e9a8f fix: over-aggressive deactivation of hl-line-mode
`(de?)activate-mark-hook` is triggered a little too often in too many
edge cases where the user isn't interactively selecting a region. One
annoying edge case has non-evil motions used on evil operators
activating but not deactivating the mark (e.g. #8047).

This leaves non-evil users without the nicety of hl-line auto-disabling
itself when the region is active, but I'll revisit that in v3.0, when
most of these package defaults are moved out to modules.

Fix: #8047
2024-09-05 15:30:22 -04:00
a940ac5614 fix(cli): doom install: load $DOOMDIR/cli.el too
In case the user's put some configuration in cli.el that could be
relevant to eventual profile generation.
2024-09-04 15:04:32 -04:00
1a5ff08da4 fix(cli): doom install: bootstrap other profiles if present
Like 'doom sync', have 'doom install' set up the profiles bootloader.
2024-09-04 15:04:32 -04:00
42df7cb9fd docs(cli): doom install: reformat output
Also simplifies the first-timer "things you should know" snippet after
running 'doom install'.
2024-09-04 15:04:32 -04:00
559e5b6a96 docs(cli): doom gc: corrections
To reflect changes made to this command when it was renamed 'doom gc'
(from 'doom purge').
2024-09-03 04:04:29 -04:00
5c7f6f5c41 fix(cli): don't native-comp site-files without --aot
Amend: e3fdfee1c5
Ref: #6811
2024-09-03 04:04:22 -04:00
76f7384621 fix(cli): "void-function: doom-modules-initialize" error
This reference to a function that doesn't exist (yet) snuck into
3bced4d.

Amend: 3bced4dbbe
2024-09-01 17:29:03 -04:00
3bced4dbbe refactor(cli): separate cli bootstrap from lib
Eventually, I want to autoload some of this stuff, so that users in
interactive sessions can safely load it without side effects (useful
when writing their own CLIs or editing Doom's source).
2024-09-01 14:45:52 -04:00
d6db88162e refactor(lib): doom-load 2024-09-01 14:45:52 -04:00
8475d29f3c refactor: remove redundant set-default-toplevel-value call 2024-09-01 14:45:52 -04:00
515f61295b nit(cli): revise comments wrt site-run-file loading 2024-09-01 14:45:52 -04:00
2bc6dd2a96 fix(cli): don't load subdirs.el again
Doom loaded subdirs.el's in `load-path`, but doesn't need to. This
normally wasn't an issue because subdirs.el files are typically
idempotent, but there is one case where it isn't: on nixpkgs, with
certain configurations on top of programs.emacs (see
NixOS/nixpkgs#267548), which will cause file-missing errors trying to
load the user's site-lisp afterwards (see #7681).

Ref: NixOS/nixpkgs#267548
Fix: #7681
Amend: 6c0b7e1530
2024-09-01 14:45:52 -04:00
086aed32b2 release(modules): 24.10.0-dev
Ref: 2b39e41368
2024-08-31 22:08:56 -04:00
069ea9e02f fix(cli): straight: highlight 'Reset "*" to "*"' option 2024-08-31 21:50:08 -04:00
8c6ee0ed4b fix: associate .doom(project|module|profile) w/ lisp-data-mode
Same as .dir-locals.el
2024-08-31 15:09:57 -04:00
22fc36dba7 fix(lib): doom/add-directory-as-project
If the target directory wasn't in a project, this command would throw a
type error (see #8032).

This also adds more checks and informative error handling to the
command.

Fix: #8032
2024-08-31 00:59:45 -04:00