Fixes an edge case where --profile, --doomdir, --emacsdir, and --debug
were ignored if used in a nested bin/doom call. Now possible thanks to
49d3f1e.
Ref: 49d3f1e96c
A list of arguments to omit can now be passed to (exit! :restart). For
example, `(exit! :restart "-c" :omit "--foo=" "--bar" "--baz=2")` will
restart the current script with a new switch (-c) and three switches
removed (--foo + one argument, --bar, --baz + two arguments).
- Fixes Doom's former inability to (trivially) juggle multiple profiles
based on the same EMACSDIR (see #6593).
- Adds '--profile NAME' switch to bin/doom (also recognized
$DOOMPROFILE).
- Adds new doom-profile* variables. These will eventually replace
doom-{local,etc,cache}-dir and doom-{autoloads,env}-file.
This is intentionally messy to ensure backwards compatibility for a
little while longer. This will be fixed over the next couple weeks.
Ref: #6593
Formerly, profiles.el and $EMACSDIR/profiles/* were mutually exclusive.
I.e. if the file existed, it'd never check the directory. Now, it will
check the directory if the requested profile isn't in profiles.el, or
the file didn't exist.
Amend: 5b6b204bcb
To reserve the name, and to signal to posterity how future (static)
profiles will look. Someday, this profile will play "failsafe" if Doom
fails to load the requested one.
- Ignore generated profiles
- Ignore /{init,config,packages}.el, in case the user wants to use
$EMACSDIR and their $DOOMDIR.
- Cast a wider net for auto-generated files (usually made when launching
sandboxes, but this will happen less as the sandbox develops).
This allows users to use Doom core to switch between Emacs configs (they
don't have to be Doom configs either). Taking after Chemacs, these
configs (called "profiles") can be declared in $EMACSDIR/profiles.el or
implicitly as directories under $EMACSDIR/profiles/ (symlinks work too).
Launch a profile with `emacs --profile foo` or by setting $DOOMPROFILE:
`DOOMPROFILE=foo emacs`.
An example profiles.el looks like this:
((doomemacs (user-emacs-directory . "~/.config/emacs")
(env ("DOOMDIR" . "~/.config/doom")))
(spacemacs (user-emacs-directory . "~/.config/spacemacs"))
(prelude (user-emacs-directory . "~/.config/prelude"))
(altdoom (user-emacs-directory . "~/.config/doomemacs")
(env ("DOOMDIR" . "~/.config/doomprivate1")))
(altdoom2 (user-emacs-directory . "~/.config/doomemacs")
(env ("DOOMDIR" . "~/.config/doomprivate2"))))
Chemacs users will find the format of this file familiar; the biggest
differences are:
- Keys are symbols, not strings
- There is no, special "default" profile. The fallback profile is the
Doom Emacs config doing the bootloading, living in ~/.config/emacs or
~/.emacs.d. If you don't like that, set $DOOMPROFILE in your dotfiles
to the name of another profile.
WARNING: bin/doom does not understand --profile or $DOOMPROFILE yet. To
sync a particular profile, you'll have to run its bin/doom directly,
e.g.
To sync the "global" doom:
~/.config/emacs/bin/doom sync
To sync your "altdoom" (and "altdoom2") profiles:
~/.config/doomemacs/bin/doom sync
--init-directory was added in Emacs 29. This backports it for 27/28
users, so users can trivially load an Emacs config living in another
directory (will be necessary for future versions of Doom's sandbox).
However, for this to work, Doom needs to live in ~/.emacs.d or
~/.config/emacs.
Ref: emacs-mirror/emacs@8eaf04de83
Moved add-hook calls (for tree-sitter initialization) into their
respective modes' config blocks, or nearby, to be consistent with how
other, similar tools (like lsp!) are initialized, and does so at
runtime, rather than at expansion/compile time, which eval-when! caused.
This exposes Doom's stdlib to the sub-process that tangles your literate
config, so that src blocks therein (or their header arguments) can call
upon them or reference its variables (like IS-LINUX et co).
Fix: #6588
+notmuch/update would create an additional window that outlasts the
update process. Instead, delete the window and bury the buffer, so that
it may be read later.
- Pass was launched in emacs-state because evil-collection didn't
support pass when the module was written, but it does now.
- It also removes stale code relative to the PASSWORD_STORE_DIR
environment variable, since the password store path is not hardcoded in
pass.el anymore.
Thanks to some combination of ignorance and obstinance, mu4e has thrown
compatibility to the wind and completely ignored the exitance of
define-obsolete-function-alias. Coupled with the inconsistent/partial
function renaming, this has made the mu4e 1.6⟶1.8 change particularly
annoying to deal with.
By suffering the pain of doing the mu4e author's work for them, we can
use defalias to give backwards compatibility a good shot for about 60
functions. Some mu4e~x functions are now mu4e--x, others are unchanged,
and then you've got a few odd changes like mu4e~proc -> mu4e--server and
mu4e-search-rerun. The form of message :from entries has also changed,
and a new (mu4e) entrypoint added supplanting mu4e~start.
Fix: #6511Close: #6549
Co-authored-by: Rahguzar <aikrahguzar@gmail.com>