Commit graph

921 commits

Author SHA1 Message Date
Henrik Lissner
0bbece56f1
refactor(vertico): marginalia-command-category: hoist to callers
Emit the metadata at the source.
2026-03-11 22:50:32 -04:00
Henrik Lissner
f573c7a1ee
fix: don't trigger doom-first-buffer-hook too early
The scratch or dashboard buffers triggered it too early.

Fix: #8706
2026-03-11 02:55:08 -04:00
Henrik Lissner
f0da6a2c31
fix(lib): doom-context-pop: logged output
Log should be prefixed with - to denote a lost context.
2026-03-11 02:28:59 -04:00
Henrik Lissner
b4917ef4f3
fix: remove vestigial references to setq!
setq! was deprecated in 304030f in favor of setopt.

Ref: 304030fdf8
2026-03-10 21:59:14 -04:00
Henrik Lissner
4fe1cbeddb
refactor: s/when-let/when-let*/
The former is deprecated on Emacs 31 for the latter.
2026-03-09 03:28:06 -04:00
Henrik Lissner
0b1de48daa
feat(lib): replace doom-region & add doom-region-bounds 2026-03-09 03:28:06 -04:00
Henrik Lissner
9840f8e454
fix: don't activate global-hl-line-mode when hl-line-mode is on
In recent versions of Emacs, `global-hl-line-mode` is separate from
`hl-line-mode`
(the global mode uses a different, more efficient mechanism for line
highlights), so it should bow out if `hl-line-mode` is enabled.
2026-03-08 03:24:50 -04:00
Henrik Lissner
be07b41ed4
perf: run doom-optimize-for-large-files-h earlier in find-file-hook
So later hooks can feel the performance benefits sooner in large files.
2026-03-08 03:23:03 -04:00
Henrik Lissner
08ab5d53b4
docs: update doomemacs repo urls
Close: #8695
Co-authored-by: kovan <kovan@users.noreply.github.com>
2026-03-05 22:48:55 -05:00
Henrik Lissner
a5552a701b
docs: doctor: do ripgrep check after loading $DOOMDIR
Now takes `doom-ripgrep-executable` into account.
2026-03-05 16:33:56 -05:00
Henrik Lissner
b87034c95d
docs: doctor: do non-POSIX shell check after loading $DOOMDIR
This allows user config to affect the result of the test (hiding it if
they've already addressed the issue).

Fix: #8136
2026-03-05 16:27:51 -05:00
Henrik Lissner
e11816e711
fix: doom-initialize-packages: don't activate package.el
This function should not be used as a substitute for
`package-initialize`, to activate packages installed via package.el,
this is solely for metadata for Doom's package manager.
2026-03-04 02:21:19 -05:00
Marien Zwart
dc7c43b6d3 refactor: use supported recentf-auto-cleanup value
We were setting recentf-auto-cleanup to nil, which is not one of the
supported values in its defcustom type.

Set it to `'never` instead. This has exactly the same effect (recentf
only references `recentf-auto-cleanup` from a `cond` statement, which
does nothing for both values), but we might as well future-proof.

Clean up a duplicate assignment while I'm there.

Noticed because I had copied this into my personal config at some
point (to disable Doom's periodic save in daemon sessions) and recently
converted that config to use `setopt`, which complained.
2026-03-03 18:26:05 -05:00
Marien Zwart
a6c57fd4fd fix: save after recentf-cleanup on exit
Doom adds `recentf-cleanup` to `kill-emacs-hook`, but that function only
cleans up `recentf-list` without saving it to disk: saving is handled by
`recentf-save-list`. `recentf-mode` adds `recentf-save-list` to
`kill-emacs-hook` as well... but it only adds that hook when
`recentf-mode` is enabled, which means `recentf-save-list` ends up
before `recentf-cleanup` on `kill-emacs-hook`, rendering the cleanup
ineffective.

This is normally barely noticable, but with many paths on (slow) network
filesystems on `recentf-list` the cleanup can get slow enough to be
annoying.

Fix it by passing a priority to `add-hook`.

This leaves an ineffective cleanup call if we exit Emacs with
recentf-mode disabled, but that should normally only happen if we exit
Emacs without opening a file (`doom-first-file-hook` enables
recentf-mode). If that's an issue, we could add a function to
`recentf-mode-hook` which in turn adds to `emacs-term-hook`, but that
seems too complicated for little gain.
2026-03-03 18:26:05 -05:00
Henrik Lissner
7f17dcf09a
fix(cli): doom emacs: use --init-directory if available
Emulating --init-directory has issues (e.g. isn't exposed to the *exact*
same $HOME environment), so if it's available (i.e. if Emacs 29+ is
being used or Doom lives in ~/.emacs.d or ~/.config/emacs), then use it.
This makes the 'doom emacs' command faster and more reliable as a launch
pad for Doom.
2026-03-03 06:34:45 -05:00
Henrik Lissner
51fe3798b2
docs: doctor: improve $HOME project root check
The check will now list the exact project root files that it finds and
better explain the solution.
2026-03-03 00:11:19 -05:00
Henrik Lissner
a2e0e9c8cf
docs: doctor: revise emacs versions checks
- Simplifies development build check explanation.
- Removes the 27 check, because Doom core will continue to support 27+
  for the foreseeable future, but Doom's modules will be dropping 27 and
  28 support soon, but that check will be done elsewhere.
2026-03-03 00:06:51 -05:00
Henrik Lissner
6c0881c684
nit: revise TODO/FIXME/HACK/REVIEW/etc in comments
Some were outdated, some were incorrectly labeled, others were already
completed, some were missing... Gotta fix them all.

Also, in :ui hl-todo, there are comments that describe how Doom uses
each of these annotations; those have been updated.
2026-03-02 19:45:09 -05:00
Henrik Lissner
a55d6ad958
bump: :doom
bbatsov/projectile@7cb1f64c1d -> bbatsov/projectile@4469d33f49
emacs-straight/project@ff700457fe -> emacs-straight/project@11a821c652
2026-03-02 01:39:49 -05:00
Henrik Lissner
9f00e2e816
release(modules): 26.04.0-dev
Ref: 2b39e41368
2026-03-02 01:39:49 -05:00
Henrik Lissner
f4d970fdf8
fix(lib,workspaces): arity error on persp-after-load-state-functions
`persp-after-load-state-functions` functions must take arguments, but
`doom-kill-childframes-h` didn't take any, causing errors when loading
persp-mode sessions.

Fix: #8700
Amend: e5bbae8144
2026-03-02 01:18:14 -05:00
Henrik Lissner
10d0b60f5d
refactor(lib): deprecate pushnew!
In the spirit of 6f40ad5, I'm deprecating this macro because it doesn't
provide enough value to exist and serves only to complicate a casual
reader's understanding of Doom's modules.

Ref: 6f40ad55f5
2026-03-01 18:10:43 -05:00
Henrik Lissner
f859850130
nit: fix indent for hl-line config 2026-03-01 18:10:43 -05:00
Henrik Lissner
e5bbae8144
feat(lib): introduce doom-kill-childframes-h
And use it to replace the various `posframe-delete-all` hooks littered
about to clean up child/posframes in contexts where they may linger
after destructive operations (like changing the active workspace or
executing `doom/reload`).
2026-03-01 18:10:42 -05:00
Henrik Lissner
e2bdb43bf6
fix(cli): doom emacs: forward $HOME using environment
Rather than hardcoding the envvar assignment into the shell command,
whose syntax isn't portable (see #8697).

Fix: #8697
2026-03-01 18:10:42 -05:00
Henrik Lissner
d9014ec4c5
fix: copy initial-value for load-path, exec-path, process-environment 2026-03-01 18:10:42 -05:00
Henrik Lissner
5311d4592d
fix: minor typo in cli restart logs 2026-03-01 18:10:42 -05:00
Henrik Lissner
59f9e1f5bb
docs(lib): revise doom-log & doom-run-hooks docstrings 2026-03-01 18:10:42 -05:00
Henrik Lissner
304030fdf8
refactor(lib): deprecate setq!
`setq!` was introduced to fix `setopt` pulling in packages. Now that
`setopt` was advised (in fad44ca228) to fix the issue at the source,
this macro is no longer necessary.

Ref: fad44ca228
2026-03-01 18:10:40 -05:00
Henrik Lissner
1c330eadce
refactor(lib): deprecate doom-load-envvars-file
In v3, the envvar file will be an elisp script, which can be `load`ed
directly, so a specialized loader will no longer be necessary.
2026-02-28 05:15:52 -05:00
Henrik Lissner
bd949b718f
refactor(lib): deprecate doom-compile-functions
Module autoloads will be separately byte-compiled in v3. Removing this
ahead of that.
2026-02-28 04:15:15 -05:00
Henrik Lissner
c2c1416634
revert: tweak: disable electric-quote-mode by default
Seems electric-quote-mode was already disabled by fault, but I was
troubleshooting a package that was globally enabling it in its
autoloads, so this setting wasn't needed.

Revert: 8e6d555cc4
2026-02-25 14:31:48 -05:00
Henrik Lissner
8308ac1e95
tweak: levels for certain doom logs
To reduce unnecessary debug spam when debug-mode is on.
2026-02-24 23:25:16 -05:00
Henrik Lissner
88f9bf95d6
fix: wrong lexical var in setopt--set advice
And remove no-op on debug mode, so issues can be debugged.

Amend: fad44ca228
2026-02-24 23:14:51 -05:00
Henrik Lissner
165caf677b
fix: void-variable custom-load-symbol error
custom-load-symbol may not be defined the first time setopt--set is
executed.

Fix: #8690
Amend: fad44ca228
2026-02-24 22:16:05 -05:00
Henrik Lissner
8e6d555cc4
tweak: disable electric-quote-mode by default
electric-quote-mode invisibly introduces difficult-to-differentiate
utf-8 characters into buffers, which seems strangely imposing as a
default behavior. I make it opt-in instead.
2026-02-24 02:42:08 -05:00
Henrik Lissner
8b1391a71c
nit: reformat long lines 2026-02-22 01:46:22 -05:00
Henrik Lissner
69f0df289b
fix(lib): profiles: ensure site-lisp load-path entries are last
If the site-lisp load-path entries different between the non-interactive
and interactive sessions, there could be redundant paths prepended to
load-path, causing load order issues (#8607). This ensures they are
appended, instead.

Fix: #8607
2026-02-22 01:40:54 -05:00
Henrik Lissner
ac649cce2a
feat(lib): add doom-real-buffer-modes
For dictating what buffers are considered real based on their major
modes.

Also makes most terminal emulator or comint-mode buffers real by
default.

Fix: doomemacs/community#73
2026-02-20 20:37:31 -05:00
Henrik Lissner
28cb499225
feat(lib): doom-special-buffer-p: consider special-mode parents 2026-02-20 20:37:31 -05:00
Henrik Lissner
1240162d7a
refactor(lib): remove doom/restart-and-restore
Emacs 29 introduced a `restart-emacs` command that is more reliable, but
it cannot restart Emacs with arbitrary arguments, which the old
`restart-emacs` library could. Without this capability,
`doom/restart-and-restore` is not trivially (or elegantly) possible, and
I can't justify a whole extra dependency just to support that,
especially in my pursuit to slim down Doom's core.

This commit also removes the doom/upgrade command, which is an awkward
and fickle command to support across platforms (too many edge cases).
2026-02-20 20:18:50 -05:00
Henrik Lissner
74d1b871b7
fix: silence straight package.el warning (part 2)
Amend: d2acb6b9c6
Fix: #8568
2026-02-18 00:33:01 -05:00
Henrik Lissner
fad44ca228
refactor(lib): advise setopt
The `setq!` macro was created to solve my issue with `setopt` (that it
can eagerly load packages; imposing more side-effects than necessary).
Instead of having a separate, wrapper macro to fix the matter, I now
advise `setopt` directly to fix the problem, so that users don't have
another macro to keep track of.  `setq!` will eventually be deprecated,
then removed in v3.
2026-02-18 00:31:19 -05:00
Henrik Lissner
28e52b8c89
refactor(cli): doom gc: remove redundant logic 2026-02-15 21:58:25 -05:00
Henrik Lissner
290003ae7a
fix: loading site-lisp in interactive sessions
1b8ea91 accidentally inhibited site-lisp in all sessions.

Amend: 1b8ea914de
Fix: #8682
2026-02-15 21:58:25 -05:00
kovan
7902c08729 fix(lib): use git symbolic-ref instead of branch -m for empty repos
Fix: #8538

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:02:58 -05:00
kovan
f1e8b97bad
fix(cli): show all commands in doom --help output
`doom --help` was missing `sync`, `upgrade`, `doctor`, and `profile` from
the command listing. The root cause: `doom-cli-load-all` iterates the CLI
hash table in non-deterministic order. When an alias stub (e.g. `doom s`
for `sync`) is processed before its primary command, `doom-cli-load` used
the alias's plist—which includes `:hide t`—as `doom-cli--group-plist`.
The loaded file's `defcli!` then inherited `:hide t`, incorrectly marking
the primary command as hidden.

Fix: strip `:hide` from the plist before passing it as the group plist,
and copy-sequence to prevent structural mutation of stored plists.

Fix: #8560
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 00:29:02 -05:00
Henrik Lissner
1b8ea914de
fix: only defer site-lisp in non-interactive sessions
And no-op on Emacs 31, which has changed startup order such that
site-lisp is loaded *before* early-init (and is therefore out of our
hands).
2026-02-13 23:57:34 -05:00
Henrik Lissner
3ad9eeb273
fix(lib): doom/reload: only escape spaces in $EMACS on Windows
This is a temporary measure until the interpolation in the powershell
script can be addressed directly (by someone better versed in
powershell).

Fix: #8572
Close: #8654
Co-authored-by: kovan <kovan@users.noreply.github.com>
2026-02-13 23:55:20 -05:00
Henrik Lissner
5e888018e5
docs: fix package! examples
These examples prematurely snuck into 3bea4f6. `:recipe` *will* be
optional post-v3, but this change hasn't been published yet.

Amend: 3bea4f66a8
2026-02-11 17:47:37 -05:00