It takes one argument in later versions of Emacs. This file really
shouldn't be visible to Emacs 25.x and earlier, but there has been one
case of it being indexed by Doom's autoload scanner.
Also marks the library with the new DEPRECATED tag. It will be removed
once Doom removes 25.x support.
Prior to this change, scratch buffers were saved only when Emacs is
killed. In cases where Emacs doesn't die properly, you'd lose your
scratch contents. Now, they are persisted as soon as you close them.
The former is more reliable (and faster, with the fd/rg hack in the next
commit).
Also (hopefully) fixes the "cl-no-applicable-method: No applicable
method: project-roots" error emitted when project-find-file-in fails to
identify the target as a project root.
Because it's not loaded for some reason.
Also, require is not a big problem IMO: if you run this interactively, the
require cost probably doesn't matter much already.
Fixes#1618.
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.
Also changes def-package-hook! -> use-package-hook!
The old macros are now marked obsolete and will be removed when straight
integration is merged.
- Eager-load all core autoloaded libraries if autoloads file isn't
present.
- Renames functions to be more descriptive of their true purpose:
- doom-initialize-autoloads -> doom-load-autoloads-file
- doom-load-env-vars -> doom-load-envvars-file
- Use doom-module-p instead of featurep! for backend use (the latter is
mainly syntax sugar for module use, and evaluates at compile/expansion
time, which may cause hash-table-p errors early in the startup
process).
- Reorder plist library to prevent load order race condition with the
functions using the macros that haven't been defined yet.
Init extra fonts within doom-init-fonts-h. This was moved because I used
to believe that set-fontset-font (according to its documentation) could
only change the frame-local fontset. It turns out that the exception
when you pass t for its first argument, which targets the default (i.e.
global) fontset.
There are a few kinks to iron out, but for the most part it's done. Doom
Emacs, powered by straight. Goodbye gnutls and elpa/quelpa issues.
This update doesn't come with rollback or lockfile support yet, but I
will eventually include one with Doom, and packages will be (by default,
anyway) updated in sync with Doom.
Relevant threads: #1577#1566#1473
- file! replaces FILE!
- dir! replaces DIR!
- doom-{glob,path,dir} have the power to construct paths out of the
segment pieces provided to it.
- Move doom-files-in to core-lib and refactor to use the above.
Adds new convenience macros like print! and insert!, and adds classes;
which are helper functions that can be called inline within format!,
print! et co, e.g.
(format! "%s" (filename "/tmp/some/file")) ; => file
(format! "%s" (relpath "/tmp/some/file" "/tmp")) ; => some/file
(format! "%s" (dirname "/tmp/some/file")) ; => /tmp/some
Check out doom-format-class-alist for more.
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:
1. Replace the bar | to indicate a hook function with a -h suffix, e.g.
doom|init-ui -> doom-init-ui-h
doom|run-local-var-hooks -> doom-run-local-var-hooks-h
2. And add a -fn suffix for functions meant to be set on variables,
e.g.
(setq magit-display-buffer-function #'+magit-display-buffer-fn)
See ccf327f8 for the reasoning behind these changes.
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.
In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.
doom*shut-up -> doom-shut-up-a
doom*recenter -> doom-recenter-a
+evil*static-reindent -> +evil--static-reindent-a
The rationale behind this change is:
1. Elisp's own formatting/indenting tools would occasionally struggle
with | and * (particularly pp and cl-prettyprint). They have no
problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
github markdown) struggle with it, sometimes refusing to highlight
code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
on haphazardly way back when Doom was simply "my private config".
Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.
Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
macro. The old pair weren't as useful. The new def-advice! saves on a
lot of space.
- Removed "stage" assertions to make sure you were using the right
macros in the right place. Turned out to not be necessary, we'll
employ better checks later.
This would cause ~/.doom.d/init.el to exist before `doom quickstart` can
copy ~/.emacs.d/init.example.el into it, causing some newcomers to
experience a wrong-type-argument: hash-table-p error at startup (and no
modules being enabled).
Sets out to solve a number of issues with the package management
process. Namely:
- To-be-removed packages that are simply being removed are no longer
incorrectly labeled "quelpa->elpa", but "removed" instead.
- A backend (elpa vs quelpa) column was added to the package listing
confirmation when running `doom update`.
- Doom now correctly recognizes that packages installed with a psuedonym
are installed, and will not endlessly attempt to uninstall and
reinstall them on every `doom refresh`.
- Packages declared with :built-in will no longer lose their built-in
marking if said package is not actually present in Emacs' site load
paths. i.e. if you say it's built in, Doom won't question it.
- package!'s :ignore property is now treated as a form whose evaluated
result will be used as its value.
For non-evil users:
<leader> x doom/open-scratch-buffer
<leader> X doom/switch-to-scratch-buffer
<leader> p s doom/open-project-scratch-buffer
<leader> p S doom/switch-to-project-scratch-buffer
For evil users:
<leader> x doom/open-scratch-buffer
<leader> b s doom/open-scratch-buffer
<leader> b S doom/switch-to-scratch-buffer
<leader> p s doom/open-project-scratch-buffer
<leader> p S doom/switch-to-project-scratch-buffer
Adds the following keybinds:
SPC n . Browses org-directory
SPC n / Text search in org-directory
SPC n * Text search in org-directory with symbol at point
SPC n h Jump to org headline in org-agenda-files
The help buffer for Doom packages now display:
- locations of (and links to) where a package is configured in Doom
- limited documentation for site packages (like elisp-mode)
Concurrency doesn't speed this up enough to justify its problems. It
swallows errors emitted from the child processes and a child process can
block indefinitely.
- Renamed doom/open-vanilla-sandbox to doom/sandbox (because it's not
just for vanilla testing anymore)
- Renamed doom/open-bug-report to doom/report-bug (for consistency with
`report-emacs-bug`; makes it easier to discover)
- Add SPC h d b for doom/report-bug
- Add SPC h d s for doom/sandbox
Adds the following commands:
- doom/help (opens the Doom manual)
- doom/help-search (for searching through org headlines in Doom's
documentation)
- doom/help-faq (for searching the FAQ)
- doom/help-news (for browsing the Doom newsletters)
- doom/help-autodefs (renamed from doom/describe-autodef -- for looking
up documentation on autodef function/macros, like
`set-lookup-handler!`)
- doom/help-modules (renamed from doom/describe-module, for jumping to a
Doom module's documentation)
- doom/help-packages (renamed from doom/describe-package and recently
fixed -- looks up information about installed packages, including what
Doom module(s) install it and where it is configured)
- doom/help-package-config (for searching and jumping to any block where
a package is configured in Doom Emacs)
Also adds the SPC h d (or C-h d) prefix for Doom-specific help commands.
SPC h D will invoke doom/help.
However, the documentation itself hasn't been committed yet, so some of
these commands may be useless atm. Sorry!
- Use message library instead of reinventing the wheel
- Fix -d/--debug support for `bin/doom doctor`
- Add indent and autofill support to print! and format!
- Add doom-message-backend for forcing format! to use a specific backend
- Phase out anaphoric when! macro in doctor scripts, it was hardly used
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:
- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces
More potential changes in the future:
- A new :term category for terminal emulation modules (eshell, term and
vterm).
- A new :os category for modules dedicated to os-specific functionality.
The :tools macos module would fit here, but so would modules for nixos
and arch.
- A new :services category for web-service integration, like wakatime,
twitter, elfeed, gist and pastebin services.
- If DIR is not in a valid project, index it as normal and do
projectile-find-file from current directory (but do not cache).
- If DIR is a valid project, but not the project root, fall back to
different mechanism for exploring it (project-find-file,
counsel-file-jump, or find-file).
- If DIR is a valid project AND is the project root, use
projectile-find-file as normal.
This is to make doom-project-find-file more do-what-I-mean.
- Adds doom/open-project-scratch-buffer (persistent project scratch
buffers)
- Prefix arg = open scratch buffer in current window, for both
doom/open-scratch-buffer and doom/open-project-scratch-buffer.
- Rename doom/delete-scratch-files ->
doom/delete-persistent-scratch-file
- Remove doom-scratch-buffer-display-fn
- Rename doom-scratch-files-dir -> doom-scratch-dir
- Add SPC p s keybind to open project scratch buffer
- Will now warn you if both .doom.d and .config/doom exists.
- Include branch and last commit date in doctor/info, next to Doom
version.
- Issues in Doom core are now indented.
Improves correctness of projectile project state. Namely, prevents
projectile-project-root from poisoning the return value of
doom-project-root or doom-project-p, which may be causing an elusive bug
where doom-project-find-file is searching the wrong directory.
Prompts for an open project and kills all its buffers. This is useful
for closing `.emacs.d` in an effort to get some *billable* work done.
Added `doom-fixup-windows` and `doom-kill-buffer(s)-fixup-windows`
helper functions for leaving affected windows on a real buffer or the
fallback buffer.
Fixed `doom/kill-this-buffer-in-all-windows` to properly "fixup"
windows.
This command would no-op if used in major modes with "fake" comments.
i.e. modes where "comments" are merely highlighted as comments, but have
no comment entry in its syntax table. e.g. text-mode + git-commit-mode.
IMPORTANT: This is a breaking update for Mac users, as your shell
environment will no longer be inherited correctly (with the removal of
exec-path-from-shell). The quick fix is: 'bin/doom env refresh'. Also,
the set-env! autodef now does nothing (and is deprecated), be sure to
remove calls to it in your config.
Smaller changes:
+ This update also adds --no-* switches to doom quickstart
+ Includes general improvements to the documentation of several bin/doom
commands.
+ Moves doom/reload* commands to core/autoload/config.el
+ doom/reload-project has been removed (it didn't actually do anything)
The breaking change:
This update adds an "envvar file" to Doom Emacs. This file is generated
by `doom env refresh`, populated with variables scraped from your shell
environment (from both non-interactive and interactive sessions). This
file is then (inexpensively) loaded at startup, if it exists.
+ The file is manually generated with `doom env refresh`.
+ It can be regenerated automatically whenever `doom refresh` is run by
running `doom env enable` (`doom env clear` will reverse this and
delete the env file).
+ `doom quickstart` will ask if you want to auto-generate this envvar
file. You won't need it if you're confident Emacs will always be
started from the correct environment, however.
+ Your env file can be reloaded from a running Emacs session with `M-x
doom/reload-env`. Note: this won't work if the Emacs session you're
running it in doesn't have a correct SHELL set. i.e. don't use this to
create your first env file!
The idea isn't mine -- it's borrowed from Spacemacs -- and was
introduced to me in #1053 by @yurimx. I was impressed with it. Prior to
this, I was unhappy with exec-path-from-shell (no hate to the dev, I
understand its necessity), and 'doom patch-macos' wasn't ideal for mac
users (needed to be reapplied every time you update Emacs). What's more,
many users (even Linux users) had to install exec-path-from-shell
anyway.
This solution suffers from none of their shortcomings. More reliable
than patch-macos, more performant and complete than
exec-path-from-shell, and easily handled by bin/doom.
helm-projectile-find-file misbehaves as a workspace project-switch
handler (likely because it runs asynchronously and misses the lexical
value of `default-directory`), so we avoid it and use
projectile-find-file directly (which still uses helm, just not the
helm-projectile package).
This was erroring when run inside a popup (eg. `M-x ielm` `C-x k`) due
to a missing check for `window-live-p`. We don't need to do anything if
the window has already gone away.
The real vs unreal check was backwards; we should only try
`previous-buffer` if the current buffer is *not* real.
Patch the apropos button types so they call helpful instead of the
built-in describe functions. Also add some bindings to apropos-mode-map
so it behaves like other help modes.
Add `doom/describe-symbol` function, which shows documentation for
callable and variable symbols. If a symbol is both a variable and a
callable, it dispatches to apropos. This gives a better workflow than
`helpful-symbol`, which annoyingly prompts the user.
Remap `describe-symbol` to `doom/describe-symbol`, and update
`+emacs-lisp-lookup-documentation` to call it also.
Previously this would error due to undefined `doom-debug-on-error`
variable. Now behaves like a minor-mode function to toggle both
`doom-debug-mode` and `debug-on-error`.