Commit Graph

19879 Commits

Author SHA1 Message Date
c788769469 refactor: move GPG defaults to :config default
Assuming GPG is present and set up by default can be surprising for
beginners, so this commit makes GPG integration opt-in, behind a new
+gnupg flag in the :config default module. There'll be more added to
this later.
2024-12-05 16:38:26 -05:00
ea616ebd5b fix(lib): cmd!: remove superfluous macro declarations
These don't apply to macros anyway.
2024-12-05 16:25:54 -05:00
82cfe98ccc fix(lib): doom-copy: copy first level of records
Regardless of DEEP?, a record's fields should be copied one level deep
at least, to ensure shallow changes to shallow copies don't affect the
original.

Amend: 169540ad3b
2024-12-05 16:25:54 -05:00
637f70f53b fix(emacs-lisp): duplicate entries in flycheck-disabled-checkers 2024-12-05 16:25:54 -05:00
4418c80c95 fix(syntax): disable checker in non-project elisp files
CVE-2024-53920 describes an arbitrary code execution vulnerability
during macro expansion, which occurs during byte-compilation or when
evaluating macro calls in uncompiled elisp files.

Flycheck and flymake use byte-compilation to lint elisp files, exposing
users to this vulnerability. This commit attempts to protect users from
this by disabling both in elisp files that aren't part of a
project (because, presumably, untrusted elisp won't live in a project).
What a "project" is depends on your projectile settings, but generally
means a file that lives in a version controlled directory and/or a
directory containing a recognizable project root marker (like a
packages.json or Cargo.toml file).

This heuristic won't catch cases of untrusted elisp living within
legitimate projects, or the case where the user's $HOME is a project and
*all* their elisp files live under it, but there are already too many
ways to shoot yourself in the foot with Emacs to begin with, and
disabling fly(check|make) altogether stands a higher chance of making
people blindly re-enable them to "work around" the fact it's not
"working as expected", bringing them back to square one.

Anyhow, long story short, don't open elisp files you don't trust in
Emacs, mkay?

Ref: CVE-2024-53920
2024-12-05 16:25:54 -05:00
ec645b8381 fix(lib): 'unknown specializer record' error on Emacs <30
Seems the 'record' specializer wasn't introduced until Emacs 30, so
users on earlier versions will see this error on startup.

Fix: #8186
2024-12-01 15:48:52 -05:00
8072d62b4f refactor(cli): remove redundant setq
Already set in early-init.el (since c05e615).

Amend: c05e61536e
2024-12-01 11:49:39 -05:00
fca69c9849 release(modules): 25.01.0-dev
Ref: 2b39e41368
2024-12-01 11:31:40 -05:00
4a8f3bf033 fix(python): +python-executable-find ipython
+python-executable-find cannot find ipython since /bin/python is
hardcoded instead of using the parameter
2024-12-01 11:30:27 -05:00
dmr
52d1c208d4 feat(file-templates): add apply method
Factor template application code into command file-templates-apply.
This allows it to be invoked by the user.
2024-12-01 11:23:51 -05:00
05e34351ea fix(eval): double prompt when region sent to repl
The +eval/send-region-to-repl command was adding an extra newline when
sending regions to REPLs, causing double prompts to appear. This removes
the extra newline for cleaner REPL interaction across all language modes.

* modules/tools/eval/autoload/repl.el (+eval/send-region-to-repl):
remove concatenation of newline after region
2024-12-01 11:21:28 -05:00
7dddbcf793 fix(lib): native-comp-deferred-compilation-deny-list in sandbox 2024-12-01 11:14:46 -05:00
b9e436663b fix(cli): defcli-obsolete!: don't rely on lexical-binding
Emacs requires '-*- lexical-binding: t -*-' to be prefixed with an elisp
line comment (two semicolons), but due to our shebang shenanigans (which
are, unfortunately, necessary) starting this line with a :;, Emacs
ignores the `lexical-binding: t` at the top, thereby executing bin/doom
without lexical binding.

Until a better workaround is found, our CLI framework will have to
adapt. Fortunately, this only affects bin/doom and not any arbitrary
doomscript.
2024-12-01 01:59:03 -05:00
abedb71f96 refactor(cli): restructure doom profile commands
- Replace 'doom profiles sync' with 'doom profile sync --all'.
- Move lisp/cli/profiles.el to lisp/cli/profile.el.
- Move obsolete alias to bin/doom.
2024-12-01 01:57:46 -05:00
87a0d9d2e1 fix: void-variable native-comp-deferred-compilation-deny-list
Error occurs on Emacs 30.0.92 or newer, because this variable (what it's
aliased to, at least) was moved to comp-run.el, upstream.

Ref: emacsmirror/emacs@e6a955d242
2024-12-01 01:20:45 -05:00
be6fcece3a fix(cli): doom gc
cli/gc.el accidentally snuck into 5e84709, along with a particular
v3-isms that doesn't belong in Doom yet, such as autoloads in CLI libs
and them providing subfeatures of doom-cli, rather than doom-cli-*.
These have been reversed for now.

Amend: 5e84709577
2024-12-01 01:20:41 -05:00
ec65616284 refactor(cli): add stubs for v3 commands 2024-12-01 01:20:41 -05:00
9c8ea37a2d refactor(cli): remove cli/packages.el
This file is mostly redundant. There is much more trimming/culling of
Doom's package API pending, but I'll save that for v3.
2024-12-01 01:20:38 -05:00
9aaefbe4ae refactor: remove redundant straight hacks
These were moved to doom-straight and renamed in 8cafbe4.

Amend: 8cafbe4408
2024-11-30 22:50:27 -05:00
3401492c84 refactor: deprecate letenv!
`letenv!` is a layover from the days before
`with-environment-variables` (introduced in 28.x), and it remained
afterwards because I preferred the shorter name. From v3 and onward,
Doom's core will be put on a diet which, among other things, will
include culling redundant or superfluous functions/macros like this one.
2024-11-30 22:50:27 -05:00
a39dd36e97 refactor: move templates/ to static/
To better reflect what this directory is intended to store (i.e. not
just templates).
2024-11-30 22:50:27 -05:00
201321c929 feat(lib): backport safe-local-variable-directories
Necessary to silence safe-local-variable warnings/prompts for $EMACSDIR
and $DOOMDIR, later.
2024-11-30 22:50:27 -05:00
da08aa2d7d feat(lib): backport major-mode-remap{,-alist}
Will be necessary for treesit.el support coming to the :tools
tree-sitter module later.
2024-11-30 22:50:27 -05:00
3b6e46ef00 feat(lib): move backports to doom-compat.el
Moves backports to new doom-compat library.

Also rolls out defbackport! calls, because it's unnecessary boilerplate.
2024-11-30 22:49:35 -05:00
bdc35faff2 tweak(sh): auto-mode-alist: generalize /*rc rule 2024-11-26 16:38:26 -05:00
94d967490f fix(sh): don't set mode-name in sh-mode derivatives
Also capitalizes the name, as this is the convention for mode names in
most major modes.

Fix: #8178
2024-11-26 15:05:49 -05:00
bf9249d002 docs: don't recommend doom/reload
Many users seem to treat `doom/reload` like a 1-to-1 replacement for
`doom sync` + restart Emacs (which it is not), and are surprised when it
fails to properly "reload" their config. I'm considering removing
`doom/reload` altogether for this reason, or turning it into a light
wrapper around `restart-emacs`, but for now I'll settle for recommending
it less in documentation and comments. The references in docs/*.org will
be dealt with later.
2024-11-25 20:28:45 -05:00
bbbfb85393 fix: ignore profile load file extension
This shouldn't fail if the load file wasn't byte-compiled.
2024-11-25 17:10:11 -05:00
97387b89fb fix(lib): with-doom-module: nil -> empty doom-module-context
Would throw an "Invalid key: nil" error if KEY was `nil`.

Fix: #8176
Amend: 8cafbe4408
2024-11-25 17:10:10 -05:00
169540ad3b feat(lib): add doom-copy
For deep-copying. Necessary for coming changes.
2024-11-25 17:09:54 -05:00
9c8cfaadde fix(cli): doom sync: void-variable envvars error
For Windows users only.

Amend: 8cafbe4408
2024-11-23 08:34:34 -05:00
be4fb85dd9 bump: :ui
Alexander-Miller/treemacs@202d7f01d6 -> Alexander-Miller/treemacs@2fd7745f1b
dgutov/diff-hl@b80ff9b4a7 -> dgutov/diff-hl@9e39dfc666
dimitri/switch-window@71ef2f54c9 -> dimitri/switch-window@61e425e703
ema2159/centaur-tabs@063534bd00 -> ema2159/centaur-tabs@46fdeb359d
emacsorphanage/anzu@26fb50b429 -> emacsorphanage/anzu@21cb5ab229
jaypei/emacs-neotree@2b0cb82853 -> jaypei/emacs-neotree@599bd049a5
jdtsmith/indent-bars@c8376cf437 -> jdtsmith/indent-bars@f860825f24
joostkremers/writeroom-mode@f4d035e91d -> joostkremers/writeroom-mode@86965a56ed
minad/goggles@41d3669d7a -> minad/goggles@142d788e16
seagle0128/doom-modeline@9920ef5116 -> seagle0128/doom-modeline@e6ae2ecfea
2024-11-19 18:02:04 -05:00
b126c3857d bump: :lang
JuliaEditorSupport/julia-emacs@d360ad5285 -> JuliaEditorSupport/julia-emacs@2aca8cf585
ProofGeneral/PG@3a99da2755 -> ProofGeneral/PG@b30d65de80
abo-abo/org-download@19e166f0a8 -> abo-abo/org-download@c8be261178
agda/agda@4f82f9b90a -> agda/agda@819993172d
ananthakumaran/tide@b38dfc3f8f -> ananthakumaran/tide@6a35fe355f
babashka/neil@6728367eff -> babashka/neil@78ffab1868
beancount/beancount-mode@7b437abcf0 -> beancount/beancount-mode@452621fa1f
cdominik/cdlatex@33770dec73 -> cdominik/cdlatex@fac070f016
clojure-emacs/cider@8fdb53e8be -> clojure-emacs/cider@c228dec27d
davazp/graphql-mode@ef4aecaead -> davazp/graphql-mode@c3baca9280
diml/utop@384b3098c8 -> diml/utop@b490baca21
emacs-geiser/guile@5a856c2982 -> emacs-geiser/guile@a0f111f8de
emacs-geiser/mit@4e90e9ae81 -> emacs-geiser/mit@ddd2ba733e
emacs-jupyter/jupyter@f97f4b5d8c -> emacs-jupyter/jupyter@e966c5d3d6
emacs-lsp/lsp-dart@9ffbafb7dc -> emacs-lsp/lsp-dart@7e3d342941
emacs-lsp/lsp-haskell@ba49fa9822 -> emacs-lsp/lsp-haskell@6981f8d122
emacs-lsp/lsp-metals@0dc938be11 -> emacs-lsp/lsp-metals@b5139c9593
emacs-lsp/lsp-pyright@0c0d72aedd -> emacs-lsp/lsp-pyright@dd54b3ae7c
emacs-php/composer.el@791a7104be -> emacs-php/composer.el@6c7e19256f
emacs-php/php-mode@59814bd80c -> emacs-php/php-mode@31f702ee2d
emacs-rustic/rustic@d765680373 -> emacs-rustic/rustic@9fdf5c76b2
emacs-straight/auctex@08881d08ce -> emacs-straight/auctex@0de9730957
emacs-typescript/typescript.el@fc3a4f3b27 -> emacs-typescript/typescript.el@dd10f702d4
emacsmirror/org-contrib@ccd4212866 -> emacsmirror/org-contrib@f22bdd6a58
emacsmirror/paredit@037b9b8acb -> emacsmirror/paredit@af075775af
emacsorphanage/dart-mode@44beb628e5 -> emacsorphanage/dart-mode@02e919c1cf
emacsorphanage/macrostep@4939d88779 -> emacsorphanage/macrostep@419873665f
erlang/otp@c66bf53cde -> erlang/otp@094260aba7
flatwhatson/scheme-mode@51e586e5f1 -> flatwhatson/scheme-mode@a713b253d2
godotengine/emacs-gdscript-mode@32086df833 -> godotengine/emacs-gdscript-mode@bee7f99c6f
greghendershott/racket-mode@dba66c4536 -> greghendershott/racket-mode@c5bee6895b
hakimel/reveal.js@472535065c -> hakimel/reveal.js@0d02d8a303
haskell/haskell-mode@727f72a2a4 -> haskell/haskell-mode@1a285fc4c5
hniksic/emacs-htmlize@ed5e5b05fd -> hniksic/emacs-htmlize@8e3841c837
jimhourihan/glsl-mode@9b2e5f28e4 -> jimhourihan/glsl-mode@c5f2c2e7ed
jrblevin/markdown-mode@6102ac5b73 -> jrblevin/markdown-mode@b8637bae07
jwiegley/emacs-async@43f97d7e68 -> jwiegley/emacs-async@af47d6f930
kaushalmodi/ox-hugo@c4156d9d38 -> kaushalmodi/ox-hugo@98421a1298
ledger/ledger-mode@a6be7a2d79 -> ledger/ledger-mode@356d8049ed
necaris/conda.el@ce748a53f9 -> necaris/conda.el@05de0c8f0c
non-Jedi/eglot-jl@1d9cab6823 -> non-Jedi/eglot-jl@7c968cc61f
nonsequitur/inf-ruby@b234625c85 -> nonsequitur/inf-ruby@6399a36682
ocaml/dune@a7924e322e -> ocaml/dune@5ac095c7c0
ocaml/merlin@e016abfac6 -> ocaml/merlin@a36f42a5b1
org-noter/org-noter@6f292d7f1e -> org-noter/org-noter@691efc3ed4
org-roam/org-roam@0b9fcbc97b -> org-roam/org-roam@2a630476b3
purcell/flycheck-ledger@628e25ba66 -> purcell/flycheck-ledger@48bed9193c
purcell/flycheck-package@75efa098cf -> purcell/flycheck-package@a52e4e95f3
purcell/less-css-mode@c7fa3d56d8 -> purcell/less-css-mode@c78b88ff9a
purescript-emacs/purescript-mode@eacc61aaaf -> purescript-emacs/purescript-mode@d187b3d4bb
rust-lang/rust-mode@c87f6f82bd -> rust-lang/rust-mode@542f1755d8
seagle0128/grip-mode@9adac9c989 -> seagle0128/grip-mode@d6c7e33e40
senny/rbenv.el@588b817d51 -> senny/rbenv.el@4afe1dc6bd
swift-emacs/swift-mode@b06c97b909 -> swift-emacs/swift-mode@ab189d6e89
technomancy/fennel-mode@f4bd34e1c3 -> technomancy/fennel-mode@259470b297
tpapp/julia-repl@801d0fc3d8 -> tpapp/julia-repl@bb90cc1fce
wbolster/emacs-python-pytest@dcdaec6fe2 -> wbolster/emacs-python-pytest@25d9801562
yoshiki/yaml-mode@7b5ce294fb -> yoshiki/yaml-mode@d91f878729
ziglang/zig-mode@f55e42536a -> ziglang/zig-mode@f0b4a48753
2024-11-19 17:49:29 -05:00
a211332796 fix(python): invalid command for basedpyright
`lsp-pyright-langserver-command` does not recognize a full path, only
"pyright" or "basedpyright".

Fix: #8160
Close: #8161
2024-11-19 16:50:28 -05:00
7533707e00 fix(coq): file-missing generic/proof-site error
To work around shenanigans in proof-general's autoloads. Should be
reverted once ProofGeneral/PG#771 is resolved.

Fix: #8169
Ref: ProofGeneral/PG#771
2024-11-19 04:40:42 -05:00
9423f6bf95 fix(default): woman: ignore stderr from manpath
Fix: #8168
Co-authored-by: rcoacci <rcoacci@users.noreply.github.com>
2024-11-19 02:53:40 -05:00
2b0013db1c bump: emacsql
magit/emacsql@HEAD -> magit/emacsql@491105a01f

- Reverts to an older version of emacsql for Emacs <29 users, which is
  necessary until org-roam/org-roam#2485 is dealt with.

Ref: org-roam/org-roam#2485
Ref: 90ede31698
2024-11-19 01:04:41 -05:00
ef33cb3b63 bump: :config use-package
jwiegley/use-package@a6e856418d -> emacs-straight/use-package@fc8449bb59

- use-package was removed from MELPA (melpa/melpa@f008216) and
  jwiegley/use-package is no longer "maintained" (i.e. it's now bundled
  with Emacs). Straight now defaults to fetching it from
  emacs-straight/use-package, where no commit by a6e856418d2e exists, so
  I bump it to one that does (as the emacs-straight is the most
  up-to-date mirror).

Ref: melpa/melpa@f008216272
2024-11-19 00:46:41 -05:00
16543b6c2b bump: :tools debugger lsp
emacs-lsp/dap-mode@496dd3a60f -> emacs-lsp/dap-mode@605448b4fd
emacs-lsp/helm-lsp@c2c6974dad -> emacs-lsp/helm-lsp@e740efb2ab
emacs-lsp/lsp-mode@9b104105ad -> emacs-lsp/lsp-mode@32628135ef
mohkale/consult-eglot@64262e7245 -> mohkale/consult-eglot@c5f87d9244
2024-11-19 00:46:21 -05:00
90ede31698 fix(org): org-roam: remove emacsql-sqlite hacks
emacs-sqlite.el was removed upstream in magit/emacsql@8ebf559, and the
custom sqlite executable is no longer built as of magit/emacsql@7a79c2b,
which renders these two advice mostly unnecessary (plus they throw
void-function `emacsql-sqlite-ensure-binary` errors).

Fix: #8167
Ref: org-roam/org-roam#2485
Ref: magit/emacsql@8ebf559f58
Ref: magit/emacsql@7a79c2be3d
2024-11-19 00:42:34 -05:00
87a024ee90 fix: don't byte-compile profile init file
The performance benefit of doing so has always been questionable or, at
best, negligible, but has caused numerous issues over the years. The
latest one being #8162, where byte-compiling a profile init file with
too many package autoloads would consume more than 255 opcodes, causing
an overflow error.

For simplicity's sake, Doom will no longer byte-compile this file.

Fix: #8162
2024-11-19 00:40:57 -05:00
04c7cf51b4 tweak(emacs-lisp): imenu: rearrange groups & fix nested cl types
In order to make imenu in elisp buffers more useful:

- Sections are given the highest precedence, and should only show lines
  with more than two semicolons at the start of the line.
- Fixes an issue where cl-defstruct blocks with options in its NAME
  argument were missed by imenu. I.e. with (cl-defstruct (foo ...)),
  `foo` would not show up in imenu.
2024-11-16 06:57:02 -05:00
caab7f9263 nit: move obsolete aliases
To group together everything I plan to delete in v3.
2024-11-15 04:08:23 -05:00
2373511daf refactor(lib): deprecate doom-plist-get
It's redundant with cl-getf, and so will be removed in v3.0.
2024-11-15 04:08:23 -05:00
fa0a83ff2f feat(lib): add doom-plist-{map,map*} 2024-11-15 04:08:16 -05:00
7bc39f2c14 fix: restore noninteractive init settings
Accidentally removed in 8cafbe4, when it was supposed to be moved.

Amend: 8cafbe4408
2024-11-14 05:16:57 -05:00
1ee4a0a6ec tweak(cli): move doom {version,doctor,info} to top-level
These commands apply to all categories and so shouldn't have their
own (and should be displayed above the others) in 'doom help's command
listing.
2024-11-14 05:16:47 -05:00
87833005fd tweak(cli): remove 'doom i' alias
Freeing this up to use for a future command (doom init), and because
'doom install' ought to be used very rarely and deliberately, so it
shouldn't have a convenient alias anyway.
2024-11-13 17:21:32 -05:00
5e84709577 nit(cli): fix print-group! indentation 2024-11-13 17:10:09 -05:00
cb557319a9 fix(lib): silence deprecation notice from autoload.el
It's been replaced with loaddeffs-gen.el in >=30, but we can't switch to
it until we've dropped 29.x support.
2024-11-13 17:09:36 -05:00