Commit graph

575 commits

Author SHA1 Message Date
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
6025e141aa
perf(lib): minor optimizations
To reduce allocations in hot loops.
2024-09-07 19:04:37 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
2981aec4dd
fix(lib): doom/{reload,upgrade}: double-escaped %s in command
Amend: f644c4fa6c
2024-09-07 13:51:21 -04:00
Henrik Lissner
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
Henrik Lissner
4c7aec35ba
fix(cli): envvar injection into bin/doom post-script 2024-09-07 02:42:34 -04:00
Henrik Lissner
f644c4fa6c
feat: add basic android support 2024-09-07 01:06:33 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
5c7f6f5c41
fix(cli): don't native-comp site-files without --aot
Amend: e3fdfee1c5
Ref: #6811
2024-09-03 04:04:22 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
d6db88162e
refactor(lib): doom-load 2024-09-01 14:45:52 -04:00
Henrik Lissner
8475d29f3c
refactor: remove redundant set-default-toplevel-value call 2024-09-01 14:45:52 -04:00
Henrik Lissner
515f61295b
nit(cli): revise comments wrt site-run-file loading 2024-09-01 14:45:52 -04:00
Henrik Lissner
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
Henrik Lissner
086aed32b2
release(modules): 24.10.0-dev
Ref: 2b39e41368
2024-08-31 22:08:56 -04:00
Henrik Lissner
069ea9e02f
fix(cli): straight: highlight 'Reset "*" to "*"' option 2024-08-31 21:50:08 -04:00
Henrik Lissner
8c6ee0ed4b
fix: associate .doom(project|module|profile) w/ lisp-data-mode
Same as .dir-locals.el
2024-08-31 15:09:57 -04:00
Henrik Lissner
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
Henrik Lissner
538ddf5e66
fix: C-i in KKP supported terminals
"C-i" and "TAB" are equivalent to Emacs. In GUI Emacs, we can bind to
[tab] instead of "TAB", permitted users to treat the two keys
differently. However, [tab] is unavailable in TTY frames, so there was
no avoiding sacrificing C-i keybinds there. With KKP support, though,
that's no longer the case.
2024-08-30 22:08:16 -04:00
Henrik Lissner
79910fba42
fix(cli): wrong-number-of-args error from mapconcat
On Emacs <=28.2, mapconcat's third argument isn't optional.

Amend: 7f175ab6d9
Ref: #8024
2024-08-30 04:57:29 -04:00
Henrik Lissner
7197ee65c7
fix: help(ful) reporting symbol's source as init.*.el
Fix: #7958
2024-08-30 02:27:03 -04:00
Henrik Lissner
6671adc687
refactor!: move helpful from :core to :lang emacs-lisp
BREAKING CHANGE: This moves helpful.el out of core into :lang
emacs-lisp. Since most (all) people have this module enabled, this
shouldn't make a difference for most people, but if you're one of the
few that don't have :lang emacs-lisp enabled, Doom will revert to using
Emacs' built-in help.el and describe-* commands.

Others can also disable helpful with (package! helpful :disable t) if
they prefer Emacs' built-in help system, which wasn't possible before,
because it was a core package.

This was done as part of an ongoing effort to slim down Doom's core in
preparation for v3.
2024-08-30 02:26:41 -04:00
Henrik Lissner
bf9e619533
refactor: remove redundant projectile-track-known-projects hook
With the `doom-switch-buffer-hook` hook in 83fedf1, this hook isn't
needed anymore.

Amend: 83fedf1fff
2024-08-30 01:02:33 -04:00
Henrik Lissner
7f175ab6d9
fix(cli): inconsistent system hash between sessions
sxhash doesn't guarantee hashes are consistent across Emacs sessions, so
use md5 instead. Also simplifies what's getting hashed;
`system-configuration` is a sufficient substitute for both `system-type`
and what I wanted to glean from changes in
`system-configuration-features`.

Amend: 80e9263b85
Close: #8030
Ref: #8024
Co-authored-by: yaaama <yaaama@users.noreply.github.com>
2024-08-29 15:44:29 -04:00
Henrik Lissner
83fedf1fff
fix: recursive load errors on lib/projects.el
A change upstream was causing recursive load errors. I'm not too clear
how it happens, as I can't reproduce it, but
bbatsov/projectile@3c92d28c05 is the common thread (bumped in
c1b5f48).

Rather than revert the bump, I've just undone the hook and used a saner
hook for the same task. It is a stopgap solution until I eventually
replace projectile with project.el.

Ref: bbatsov/projectile@3c92d28c05
Amend: c1b5f48f07
2024-08-29 06:56:57 -04:00
Henrik Lissner
c1b5f48f07
bump: :core
Fuco1/smartparens@ab475c7891 -> Fuco1/smartparens@c7519a1b69
bbatsov/projectile@0163b335a1 -> bbatsov/projectile@8cc2ee8937
emacs-compat/compat@09dce8a193 -> emacs-compat/compat@e9203e1649
emacs-straight/project@093f42a1b6 -> emacs-straight/project@5c77d78936
hlissner/emacs-hide-mode-line@bc5d293576 -> hlissner/emacs-hide-mode-line@ddd154f1e0
jscheid/dtrt-indent@339755e4fb -> jscheid/dtrt-indent@a8aa356684
rainstormstudio/nerd-icons.el@4322290303 -> rainstormstudio/nerd-icons.el@c3d641d8e1
2024-08-29 02:47:21 -04:00
Henrik Lissner
c53f63b96e
fix: trigger doom-first-{file,buffer}-hook at startup
Should fix issues where modes/hooks weren't triggered for
files/directories opened early (e.g. from the command-line or
programmatically from the user's config).
2024-08-28 17:55:25 -04:00
Henrik Lissner
c352bd0dcd
refactor: remove redundant doom-bin{,-dir} decls
Amend: a8ba8feecb
Amend: a5039c4333
2024-08-28 04:58:11 -04:00
Henrik Lissner
a5039c4333
fix(lib): doom/{reload,upgrade}: expand path to bin/doom
A user's shell config might destructively alter the shell's $PATH (also
common on MacOS, which destructively sets $PATH with its system dotfiles
for ZSH). This prevents the sub-shell spawned from `doom/reload` and
`doom/upgrade` from inheriting emacs' `$PATH`, which Doom adds
$EMACSDIR/bin to. Without this entry, these commands would fail to find
the Doom script.

Fix: #8027
Amend: a8ba8feecb
2024-08-27 03:24:58 -04:00
Henrik Lissner
6077b6f0d8
fix: correct version string in obsoletion calls 2024-08-26 18:07:47 -04:00
Henrik Lissner
80e9263b85
fix(cli): doom sync: heuristic for total rebuilds
Fix: #8024
2024-08-26 02:16:03 -04:00
Henrik Lissner
ea97adf9c7
fix: set jump points on more kill-buffer functions
Close: #7643
Co-authored-by: LemonBreezes <LemonBreezes@users.noreply.github.com>
2024-08-25 17:44:29 -04:00
Henrik Lissner
fac979c6d8
fix: package!: unpinning with :pin nil 2024-08-25 17:44:29 -04:00
Henrik Lissner
9c6a5e9323
fix(lib): doom/{reload,upgrade}: ensure env matches session 2024-08-25 17:44:29 -04:00
Henrik Lissner
a8ba8feecb
refactor(lib): doom/{reload,upgrade}: customizable commands
Ref: #8024
2024-08-25 17:44:28 -04:00
Henrik Lissner
e21e01d4c2
fix(cli): doom env: blacklist $WAYLAND_DISPLAY 2024-08-23 02:50:19 -04:00
Henrik Lissner
c901f5806e
fix(cli): straight ignoring native-comp-jit-compilation-deny-list
Turns out native-comp doesn't respect
`native-comp-jit-compilation-deny-list` if called explicitly (instead of
from deferred compilation).

Fix: #5592
Fix: #6283
Fix: #3655
2024-08-23 02:50:19 -04:00
Henrik Lissner
ba01418652
revert: fix: straight-built-in-pseudo-packages: add seq
Magit requires a newer version of seq than what's available on 28.x or
older or it spews out warnings.

Revert: bc634eaca0
2024-08-23 01:27:54 -04:00
Henrik Lissner
bc634eaca0
fix: straight-built-in-pseudo-packages: add seq
Avoid installing a newer (or older) and possibly incompatible copy of
seq.

Also, seq would get installed along with its unit tests, and Emacs will
hang trying to natively compile them, so...
2024-08-22 20:09:03 -04:00
Henrik Lissner
9913acbdc4
fix: opening tramp paths from command line args
Eventually, Emacs will process any files passed to it via the command
line, and will do so *really* early in the startup process. These might
contain special file paths like TRAMP paths (e.g.
/sudo://etc/ssh/ssh_config), so restore `file-name-handler-alist' just
for this small portion of startup.
2024-08-18 16:12:42 -04:00