Recently, org-mode made a non-standard tab-width an error state.
Unfortunately, it's way too easy for users to accidentally change
it (e.g. with editorconfig, indiscriminate setter hooks, or other
packages), and since there is zero reason to ever want a non-standard
tab-width in org-mode, I not only exclude it from dtrt-indent as a
global default (i.e. not only as part of :lang org), but I add a late
org-mode-hook hook to reset tab-width, just in case.
Due to our inhibit-redisplay hack, a missing font could lead to a blank
Emacs after startup. This change fixes that so that not only is an error
emitted when Emacs can't find your font, but the error will be a little
more readable.
This is a stopgap solution until I finish a better one I'm preparing for
v3.
Fix: #7055
Changes what major modes we exclude from dtrt-indent's auto-detection.
Any mode in doom-detect-indentation-excluded-modes, plus derived modes,
will be excluded instead of only the parent modes.
This indirectly fixes an issue where org-mode derivatives (like
org-journal-mode) have their tab-width changed (#7670), causing the
`org-current-text-column` macro to throw the following error:
Tab width in Org files must be 8, not N. Please adjust your
`tab-width' settings for Org mode.
I opted for this solution instead rather than adding all possibly
derivatives to `doom-detect-indentation-excluded-modes`.
Fix: #7670
Ref: 38dd882685/lisp/org-macs.el (L1154)
It's possible for the user to type shell variables (something like
`$MYVAR/dir/filename`) as part of the filepath, so we need to call
`expand-file-name`.
When +vertico/find-file-in was replaced in 60e22fd with
+vertico/consult-fd-or-find, it changed a key behavior for
doom-project-find-file for Vertico users: instead of displaying an
initial list of all files under the target directory, it would display
nothing until the user entered in N * `consult-async-min-input`
characters, causing confusion (see linked comment).
Since Vertico integration modifies project-find-file-in's interface
appropriately, I leave it to that command instead.
Ref: https://github.com/doomemacs/doomemacs/issues/7312#issuecomment-1933404444
Amend: 60e22fd2eb
If $DOOMPATH is malformed or set to a value that does not contain a
valid path to Doom's CLI library in $EMACSDIR/lisp/cli (see #7608),
bin/doom no longer functions, emitting "a subcommand is required"
errors.
This change ensures that the CLI library is always the last (implicit)
element in doom-cli-load-path, and ensures $DOOMPATH is never written to
the user's envvar file (in case they try to use bin/doom from inside a
terminal within a Doom Emacs session), which should ensure users -- at
least -- never find themselves stranded without the Doom CLI.
Fix: #7608
Co-authored-by: bpizzi <bpizzi@users.noreply.github.com>
I began phasing out all-the-icons in 9787022. Now that Doom has
no (first order) dependencies that depend on it (and enough time has
passed), it's time to remove it.
Ref: 9787022b83
- Move Doom core elisp API demos out of docs/examples.org into lisp/demos.org.
- Recognize and search demos.org file in modules for additional
demos (including $DOOMDIR/demos.org).
- Refactor emacs-lisp module to use new elisp-demos-user-files variable
instead of an advice. This way, elisp-demo's commands (such as
`elisp-demos-find-demo` and `elisp-demos-add-demo`) will include
Doom's demos.
- Rename doom--empty-module-context to doom-module--empty-context.
- Nest doom-module-context symbol plist in its 'keys' property. (By
convention, Doom uses keywords as keys in most places. Let's be
consistent)
- Updates all uses of doom-module--context-field and
doom-module-context-get.
This renames doom-modules-dirs to doom-module-load-path, which dictates
where Doom searches for module trees or single modules, in preparation
for more sophisticated module lookups in v3.
This also deprecates doom-modules-dirs, which will be fully removed in
the v3 release.
BREAKING CHANGE: This deprecates the IS-(MAC|WINDOWS|LINUX|BSD) family
of global constants in favor of a native `featurep` check:
IS-MAC -> (featurep :system 'macos)
IS-WINDOWS -> (featurep :system 'windows)
IS-LINUX -> (featurep :system 'linux)
IS-BSD -> (featurep :system 'bsd)
The constants will stick around until the v3 release so folks can still
use it -- and there are still some modules that use it, but I'll phase
those uses out gradually.
Fix: #7479
Ensures that lexical contexts are never taken into account, in the case
where Doom's core is loaded in an isolated environment (e.g. the
sandbox). Also improves my startup time by 10%? I'll take it.
doom-file-write's :mode parameter now accepts a cons cell, whose CDR
will determine the file mode for directories that get implicitly created
by the function.
Silences some byte-compiler warnings about:
- 'nreverse on constant list' on add-hook! calls.
- inhibit-changing-match-data deprecation warning.
- unescaped quotes in docstring in some doom-*-dir variables.
- Variable non-essential should be quoted (though it isn't referring to
a variable).
- CONTEXT -> CONTEXTS to match argument name.
The old check was a bug fix to work around noisy values that somehow
made it into diff checks. The `package!` symbol is never actually
present in the list of values yielded by the search in `read-package`,
so this commit alters the lookup to respect what is actually present,
thus guaranteeing that `destructuring-bind` succeeds and bump diffs are
actually detected.
Package autoloads should be assembled in the order they're
installed/built, so that dependencies between them (such as the case
where geiser-* packages call geiser-activate-implementation, which is
defined in geiser.el's autoloads file -- see #7472) don't throw errors.
Fix: #7472
Amend: 87f6f7ab91
317cea5 assumed Emacs 28, but Doom still tries to support 27.
Attempting to use the undefined emoji script on 27 results in an error.
Prior to 28, emoji are part of the symbol script, which the following
`set-fontset-font` call already handles.
Amend: 317cea5eef
Ref: #7448Fix: #7505
helpful-set-variable-function defaults to setopt if it's available, setq
otherwise. `setopt` is superior for this use case because it uses
custom.el's mechanism for setting variables (thus respecting custom.el's
setters and type checks), however, it is unavailable in Emacs 28 and
earlier (`setopt` was introduced in 29).
Doom defines `setq!`, which is a drop-in replacement for setopt, and is
functional in Emacs 28, so it is the better option here.
Ref: #7527
These are undocumented internal variables for basic platform-specific
fallbacks. Now that doom-symbol-font and doom-emoji-font exist, make
them constant.
No font supports all of Unicode or anywhere near it. It’s not even
really possible with current font formats. Therefore, rename
`doom-unicode-font` to `doom-symbol-font`. Only set it as a fallback for
characters in the `symbol` and `mathematical` scripts.
Nerd Fonts assign icons to code points in these Unicode Private Use
Areas. `doom-unicode-font` is now available again as a user-defined
fallback of last resort for non-PUA Unicode code points.
Ref: f12c615e4d (overview)
I'm using Emacs30 and on my version,
doom-apply-ansi-color-to-compilation-buffer-h does not colorize all the
escape sequences. Using ansi-color-compilation-filter instead fixes this
for me.