Improve interactive package management support
This commit is contained in:
parent
595109209a
commit
e7a1e0b4a2
1 changed files with 115 additions and 109 deletions
|
@ -335,6 +335,8 @@ package.el as appropriate."
|
||||||
(defun doom//packages-install ()
|
(defun doom//packages-install ()
|
||||||
"Interactive command for installing missing packages."
|
"Interactive command for installing missing packages."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
(if (not noninteractive)
|
||||||
|
(doom-packages--async-run 'doom//packages-install)
|
||||||
(message! "Looking for packages to install...")
|
(message! "Looking for packages to install...")
|
||||||
(let ((packages (reverse (doom-get-missing-packages))))
|
(let ((packages (reverse (doom-get-missing-packages))))
|
||||||
(cond ((not packages)
|
(cond ((not packages)
|
||||||
|
@ -381,12 +383,14 @@ package.el as appropriate."
|
||||||
""))))
|
""))))
|
||||||
|
|
||||||
(message! (bold (green "Finished!")))
|
(message! (bold (green "Finished!")))
|
||||||
(doom//reload-load-path)))))
|
(doom//reload-load-path))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom//packages-update ()
|
(defun doom//packages-update ()
|
||||||
"Interactive command for updating packages."
|
"Interactive command for updating packages."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
(if (not noninteractive)
|
||||||
|
(doom-packages--async-run 'doom//packages-update)
|
||||||
(message! "Looking for outdated packages...")
|
(message! "Looking for outdated packages...")
|
||||||
(doom-refresh-packages-maybe doom-debug-mode)
|
(doom-refresh-packages-maybe doom-debug-mode)
|
||||||
(let ((packages (sort (doom-get-outdated-packages) #'doom--sort-alpha)))
|
(let ((packages (sort (doom-get-outdated-packages) #'doom--sort-alpha)))
|
||||||
|
@ -421,12 +425,14 @@ package.el as appropriate."
|
||||||
(if result "✓ DONE" "✕ FAILED"))))))
|
(if result "✓ DONE" "✕ FAILED"))))))
|
||||||
|
|
||||||
(message! (bold (green "Finished!")))
|
(message! (bold (green "Finished!")))
|
||||||
(doom//reload-load-path)))))
|
(doom//reload-load-path))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom//packages-autoremove ()
|
(defun doom//packages-autoremove ()
|
||||||
"Interactive command for auto-removing orphaned packages."
|
"Interactive command for auto-removing orphaned packages."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
(if (not noninteractive)
|
||||||
|
(doom-packages--async-run 'doom//packages-autoremove)
|
||||||
(message! "Looking for orphaned packages...")
|
(message! "Looking for orphaned packages...")
|
||||||
(let ((packages (doom-get-orphaned-packages)))
|
(let ((packages (doom-get-orphaned-packages)))
|
||||||
(cond ((not packages)
|
(cond ((not packages)
|
||||||
|
@ -462,7 +468,7 @@ package.el as appropriate."
|
||||||
pkg)))))
|
pkg)))))
|
||||||
|
|
||||||
(message! (bold (green "Finished!")))
|
(message! (bold (green "Finished!")))
|
||||||
(doom//reload-load-path)))))
|
(doom//reload-load-path))))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue