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`.
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.
SPC h now maps to help-map to reduce redundancy. Some adjustments and
additions were made to this map so all users (evil and vanilla) can
benefit from Doom's extra help commands.
+ Add doom-switch-frame-hook
+ Replace doom-{enter,exit}-{buffer,window}-hook with
doom-switch-{buffer,window}-hook
+ New switch-buffer hooks run on buffer-list-update-hook rather than
in select-window advice.
+ Blank our buffer-list-update-hook in some places to reduce how many
times it gets triggered.
By removing the cl-flet call, we reduce the size of backtraces produced
during bin/doom commands by a whopping 80%. Noice.
Also renames doom-ansi-apply -> doom-color-apply
- Code reduction and refactor across the board (cull unneeded minor
advise, hooks and hacks or update them)
- Revise outdated comments and docstrings
- Reorganize core autoload libraries
- Remove large file check (Emacs already has a built-in one, which we
augment to be even more performant when it does kick in)
- helpful.el can now be disabled completely through package!
They've been removed from feature/workspaces and moved into
core/autoload/sessions, which falls back to desktop.el if persp-mode
isn't present. This also offers a substantial speed up to
restart+restoring and restoring sessions in general.
Also fixes#1210, where the newly spawned frame after doom/restart
wasn't focused.
Introduces the following commands:
- doom/restart
- doom/restart-and-restore
- doom/quickload-session
- doom/quicksave-session
- doom/load-session
- doom/save-session
- +workspace/restore-last-session (alias for doom/quickload-session)
And removes
- +workspace/load-session
- +workspace/save-session
- +workspace/load-last-session (renamed to +workspace/restore-last-session)
- +workspace/restart-emacs-then-restore (replaced by doom/restart-and-restore)
- :ss (ex command)
- :sl (ex command)
These weren't reliable, often times buggy or overzealous about killing
buffers and processes. Best to do it manually or come up with a better
solution.
- SPC f . -> counsel-file-jump or find-file
- SPC f > -> doom/browse-in-other-projects
- SPC f / -> projectile-find-file
- SPC f ? -> doom/find-file-in-other-project
- Moved doom/sudo-find-file to SPC f S
This change was made to accommodate the new
doom/browse-in-other-projects and doom/find-file-in-other-project
commands, which make it easy to jump to files in other known projects.
A minor optimization. assq is significantly faster than assoc (not that
it matters for this incredibly insignificant use-case, but yay for
premature optimization!)
projectile-project-root no longer returns `default-directory` if not in
a project (it returns nil). As such, doom-project-* functions (and their
uses) have been refactored.
+ doom-project-p & doom-project-root are aliases for
projectile-project-p & projectile-project-root.
+ doom-project-{p,root,name,expand} now has a DIR argument (for
consistency, since projectile-project-name and
projectile-project-expand do not).
+ The nocache parameter is no longer necessary, as projectile's caching
behavior is now more sane.
+ Removed some projectile advice/hacks that are no longer necessary.
+ Updated unit tests
This is experimental. I'd eventually like users to be able to management
Doom from inside Emacs, if they desire. This may be the only way to have
a decent user experience on Windows, for that matter.
Also adds a popup rule for it.
This should fix an issue where a package A, which uses macros from a
package B, is installed before package B, causing void-function errors.
The currently known and affected packages are neotree, parinfer, and
evil-collection.
It is easier to spot real problems if the code is warning-free.
Replacing `gensym` with `make-symbol` is an idea taken from here:
b44c08dd45
In defer-until!:
core-lib.el:150:19:Warning: function ‘gensym’ from cl package called at
runtime
In add-transient-hook!:
core-lib.el:216:16:Warning: function ‘gensym’ from cl package called at
runtime
In toplevel form:
autoload/message.el:35:1:Warning: Unused lexical variable ‘spec’
In toplevel form:
autoload/line-numbers.el:31:1:Warning: defcustom for
‘display-line-numbers-type’ fails to specify containing group
autoload/line-numbers.el:31:1:Warning: defcustom for
‘display-line-numbers-type’ fails to specify containing group
autoload/line-numbers.el:39:1:Warning: defcustom for
‘display-line-numbers-grow-only’ fails to specify containing group
autoload/line-numbers.el:39:1:Warning: defcustom for
‘display-line-numbers-grow-only’ fails to specify containing group
autoload/line-numbers.el:44:1:Warning: defcustom for
‘display-line-numbers-width-start’ fails to specify containing group
autoload/line-numbers.el:44:1:Warning: defcustom for
‘display-line-numbers-width-start’ fails to specify containing group
In toplevel form:
cli/autoloads.el:137:1:Warning: Unused lexical variable ‘type’
Preserve name of unused lexical var _type
Makes it obvious what is stored there.
+ Associates enh-ruby-mode with :lang ruby for doom/describe-module
+ Enables editorconfig to detect extension-less or file-less ruby
files (from shebang lines or file local variables).
Color let-functions no longer take format string arguments. e.g.
(format! (red "Hello %s" "world"))
Becomes
(format! (red "Hello %s") "world")
The same goes for print!. Also, doom-ansi-apply now takes two arguments
instead of three.
Also merges doom-message-{fg,bg,fx} into doom-ansi-alist, and reduces
backtrace noise when errors originate from inside these macros.
Also fixes an issue where doom install wouldn't catch missing
dependnecies of desired packages.
If :dep is non-nil, doom-get-packages will include package dependencies
in the resulting package list.
Checking for the 'display-line-numbers symbol property is clumsy and
checking for boundp is pointless now that we have a Emacs 25 polyfill
for display-line-numbers-mode.
This prevents absolute paths appearing in many find-in/browse commands,
like +default/find-in-emacsd, +default/find-in-config, or
+default/browse-project.
+ Remove doom/switch-theme (replaced with an advice for load-theme)
+ Reorganize core-ui
+ Fix Emacs 26+ hl-line hack being applied for Emacs 25 users
+ Rename doom|show-whitespace-maybe to doom|highlight-non-default-indentation
+ Disable tool-bar, menu-bar and vertical-scroll-bars via
default-frame-alist; this is a little faster than using the minor
modes.
ws-butler only strips trailing spaces on lines that have been modified.
+ ws-butler is disabled if editorconfig enables
trim_trailing_whitespace, which resorts to delete-trailing-whitespace
instead.
+ Updates doom|(enable|disable)-delete-trailing-whitespace hooks to use
ws-butler-mode.
Also adds doom|disable-delete-trailing-whitespace hook, which can be
used to disable this behavior on a per-buffer basis. If you want to turn
off this global behavior:
(remove-hook 'write-file-functions #'delete-trailing-whitespace)
If HOME is a repo, projectile resolves all project roots to HOME. This
fixes any commands that rely on this project resolution by explicitly
telling them what project they're in instead.
This removes the various doom-line-number* variables and replaces it
with the Emacs 26 display-line-numbers API, which I've ported to Emacs
25.x (however, it uses nlinum under the hood, and not all of
display-line-numbers options are supported).
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.
load-theme doesn't disable previously enabled themes before switching.
doom/switch-theme does.
This remaps any keys bound to load-theme to doom/switch-theme.