Group 'doom refresh' with maintenance commands
This commit is contained in:
parent
1c402950af
commit
e3f8674297
1 changed files with 31 additions and 31 deletions
|
@ -219,10 +219,12 @@ BODY will be run when this dispatcher is called."
|
|||
(load! "cli/help")
|
||||
(load! "cli/install")
|
||||
|
||||
(defcli! (refresh re sync)
|
||||
(defcligroup! "Maintenance"
|
||||
"For managing your config and packages"
|
||||
(defcli! (refresh re sync)
|
||||
((if-necessary-p ["-n" "--if-necessary"] "Only regenerate autoloads files if necessary")
|
||||
(purge-p ["-p" "--purge"] "Also purge orphaned repos and ELPA packages"))
|
||||
"Ensure Doom is properly set up.
|
||||
"Ensure Doom is properly set up.
|
||||
|
||||
This is the equivalent of running autoremove, install, autoloads, then
|
||||
recompile. Run this whenever you:
|
||||
|
@ -235,30 +237,35 @@ recompile. Run this whenever you:
|
|||
It will ensure that unneeded packages are removed, all needed packages are
|
||||
installed, autoloads files are up-to-date and no byte-compiled files have gone
|
||||
stale."
|
||||
:bare t
|
||||
(print! (green "Initiating a refresh of Doom Emacs...\n"))
|
||||
(let (success)
|
||||
(when (file-exists-p doom-env-file)
|
||||
(doom-cli-reload-env-file 'force))
|
||||
:bare t
|
||||
(print! (green "Initiating a refresh of Doom Emacs...\n"))
|
||||
(let (success)
|
||||
(when (file-exists-p doom-env-file)
|
||||
(doom-cli-reload-env-file 'force))
|
||||
|
||||
(mapc #'doom--cli-delete-autoloads-file
|
||||
(list doom-autoload-file
|
||||
doom-package-autoload-file))
|
||||
(mapc #'doom--cli-delete-autoloads-file
|
||||
(list doom-autoload-file
|
||||
doom-package-autoload-file))
|
||||
|
||||
(doom-initialize 'force 'noerror)
|
||||
(doom-initialize-modules)
|
||||
(doom-cli-reload-core-autoloads (not if-necessary-p))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(and (doom-cli-packages-install)
|
||||
(setq success t))
|
||||
(and (doom-cli-packages-build)
|
||||
(setq success t))
|
||||
(and (doom-cli-packages-purge purge-p 'builds-p purge-p)
|
||||
(setq success t)))
|
||||
(doom-cli-reload-package-autoloads (or success (not if-necessary-p)))
|
||||
(doom-cli-byte-compile nil 'recompile))
|
||||
t))
|
||||
(doom-initialize 'force 'noerror)
|
||||
(doom-initialize-modules)
|
||||
(doom-cli-reload-core-autoloads (not if-necessary-p))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(and (doom-cli-packages-install)
|
||||
(setq success t))
|
||||
(and (doom-cli-packages-build)
|
||||
(setq success t))
|
||||
(and (doom-cli-packages-purge purge-p 'builds-p purge-p)
|
||||
(setq success t)))
|
||||
(doom-cli-reload-package-autoloads (or success (not if-necessary-p)))
|
||||
(doom-cli-byte-compile nil 'recompile))
|
||||
t))
|
||||
|
||||
(load! "cli/env")
|
||||
(load! "cli/upgrade")
|
||||
(load! "cli/packages")
|
||||
(load! "cli/autoloads"))
|
||||
|
||||
(defcligroup! "Diagnostics"
|
||||
"For troubleshooting and diagnostics"
|
||||
|
@ -266,13 +273,6 @@ stale."
|
|||
(load! "cli/debug")
|
||||
(load! "cli/test"))
|
||||
|
||||
(defcligroup! "Maintenance"
|
||||
"For managing your config and packages"
|
||||
(load! "cli/env")
|
||||
(load! "cli/upgrade")
|
||||
(load! "cli/packages")
|
||||
(load! "cli/autoloads"))
|
||||
|
||||
(defcligroup! "Compilation"
|
||||
"For compiling Doom and your config"
|
||||
(load! "cli/byte-compile"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue