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.
- 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
- 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.
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.
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`.
Can now launch four different sessions:
1. Vanilla Emacs
2. Vanilla Doom (only Doom core)
3. Doom core + modules - private config
4. A full Doom session (load everything)
- Packages are initialized once, when package.el is first loaded, and
must be updated manually via doom/reload-packages.
- Package->module association is now stored in the package's PLIST under
:modules. This is an internal property and cannot be explicitly set
through `package!'
- Add doom-package-list function
- Rename doom-get-packages to doom-find-packages
- Updated doom-find-packages' docstring
- Added the :core filter to doom-find-packages
- Simplified doom-initialize-packages
- doom/reload calls doom/reload-packages if necessary.
- Fix redundant properties in doom-packages
- Remove tracking of after!, def-package! and def-package-hook! blocks.
Replaced with doom-package-list being able to see all packages, even
in disabled modules.
- Add :built-in property to package! for dummy packages. This is
important so that doom/describe-package can see built-in packages.
This adds the option to run elisp in an environment where doom core &
modules are loaded, but not your private modules or config.
Also updates the vanilla sandbox text template.
Fixes issues where:
+ package!'s :disable property was ignored and def-package! wouldn't
ignore disabled packages.
+ Certain quelpa packages were being removed/reinstalled infinitely
+ Improved flexibility of doom-get-packages (its docstring needs to be
updated!)
Removes doom-module-table; which was inflexible (though more stable). It
prevented you from putting your doom! block in anywhere but
~/.doom.d/init.el.
It is replaced (somewhat) by (doom-modules).
+ Fix#446, where the .local/packages.el cache was generated with
a faulty load-path.
+ Entries in the doom-modules hash table are now plists, containing
:flags and :path, at least.
+ Add doom-initialize-modules for loading module config.el files.
+ Add doom-module-get for accessing this plist, e.g.
(doom-module-get :some module) ; returns plist
(doom-module-get :some module :flags) ; return specific property
+ Replace doom-module-enable with doom-module-set, e.g.
(doom-module-set :some module :flags '(+a +b +c))
+ Remove doom-module-flags (use doom-module-get instead)
+ Rename doom-module-enabled-p with doom-module-p
+ Replace doom-module-path with doom-module-find-path and
doom-module-expand-file. The former will search for an existing module
or file in doom-modules-dirs. The latter will expand the path from
whatever path is stored in doom-modules.
+ Replace doom-module-paths with doom-module-load-path
+ Changed doom! to allow for nested doom! calls by delaying the loading
of module config.el files until as late as possible.
+ Refactor doom-initialize-packages to only ihitialize package state
(i.e. doom-packages, package-alist, and quelpa-cache), rather than its
previous behavior of loading all Doom files (and sometimes all module
files). This is faster and more predictable.
~/.doom.d/modules is now a full module tree, like ~/.emacs.d/modules.
Symlinks are no longer involved.
Private modules can now shadow Doom modules. e.g.
~/.doom.d/modules/lang/org will take precendence over
~/.emacs.d/modules/lang/org.
Also, made doom--*-load-path variables public (e.g. doom--site-load-path
=> doom-site-load-path), and rearranged the load-path for a 10-15%
startup boost.