Commit graph

913 commits

Author SHA1 Message Date
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
Henrik Lissner
ae7d7a605a
bump: :doom
Fuco1/smartparens@b629b4e893 -> Fuco1/smartparens@82d2cf084a
bbatsov/projectile@9325c45e0f -> bbatsov/projectile@7cb1f64c1d
emacs-compat/compat@cf14260191 -> emacs-compat/compat@38df650dce
emacs-straight/project@a66b0e0987 -> emacs-straight/project@ff700457fe
radian-software/straight.el@562639bd97 -> radian-software/straight.el@09b789a859
rainstormstudio/nerd-icons.el@d41902fe68 -> rainstormstudio/nerd-icons.el@9a7f44db9a
2026-02-10 18:12:22 -05:00
Henrik Lissner
4f4952d6c6
fix(cli): doctor: recursive macro expansion on advice
Emerged in Emacs 31+.

Fix: #8644
2026-02-10 13:12:28 -05:00
Henrik Lissner
ecd04f65da
release(modules): 26.03.0-dev
Ref: 2b39e41368
2026-02-09 22:56:17 -05:00
Henrik Lissner
19b3f4cd9e
docs: doctor: add Symbola font check
The lack of Symbola can cause crashes, slowdowns, or confusion when
certain glyphs don't show (like org-modern's unicode bullets or certain
ligatures).

Ref: doomemacs/community#66
2026-02-09 22:39:55 -05:00
Henrik Lissner
1a943aea69
refactor: cut down on pseudo-features
Way back, I added these three pseudo-features:

  (featurep 'dynamic-modules)
  (featurep 'harfbuzz)
  (featurep 'jansson)

Why? Because some build features have pseudo features (like
`tty-child-frames`, `pgtk`, and `threads`), but others don't, and I
wanted more consistency around build feature detection. Years later, I
realized it wasn't used much internally and only ended up confusing
readers who didn't realize these were Doom's additions and not built
into Emacs. Emacs' idiosyncrasies may not be nice or elegant, but
they're less surprising to elisp beginners and veterans alike.
2026-01-23 20:26:28 -05:00
Henrik Lissner
57818a6da9
fix: hl-line hacks on 31.1+
- Rely on the more efficient `global-hl-line-mode` implementation in
  31.1.
- Use the new `global-hl-line-buffers` predicate variable introduced in
  31.1 to implement our disable-hl-line-during-selection and major mode
  white/blacklist hacks.
- Reverts hl-line-sticky-flag to its default (t), because some features
  were aggressively (and erroneously) disabling hl-line (particularly
  eldoc).
2026-01-21 03:32:27 -05:00
Henrik Lissner
97d33cd641
fix: comp writing temp files to /tmp
Should've been moved to doom-profile-cache-dir, but
comp-run-async-workers was renamed to comp--run-async-workers in later
versions of Emacs.
2026-01-20 17:59:38 -05:00
Henrik Lissner
021abd4ab7
fix: outline-up-heading + better-jumper integration
Fix: #8566
2026-01-20 17:00:51 -05:00