diff options
author | Thanos Apollo <[email protected]> | 2023-06-03 06:54:21 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-06-03 06:54:21 +0300 |
commit | 7cdefdfd1b95b47481ea4b4ba5aac1e75968a94f (patch) | |
tree | 436f1d3093e5a27216891b7a40e375c94dc286ef | |
parent | 4bb6680c9f0e4c7056bf586aa5f805a18a8009ac (diff) |
emacs: redo package installation
Simple use package.el
-rwxr-xr-x | emacs.org | 28 |
1 files changed, 8 insertions, 20 deletions
@@ -87,31 +87,19 @@ Set ~package-archives~, and install packages ("org" . "https://orgmode.org/elpa/") ("elpa" . "https://elpa.gnu.org/packages/") ("jcs-elpa" . "https://jcs-emacs.github.io/jcs-elpa/packages/"))) + ; Activate all the packages (package-initialize) + + ; Fetch the list of packages available (unless package-archive-contents (package-refresh-contents)) - (defvar my-missing-packages '() - "List populated at each startup. - Contains the list of packages that need to be installed.") - - (dolist (p my-package-list) - (when (not (package-installed-p p)) - (add-to-list 'my-missing-packages p))) - - (when my-missing-packages - (message "Emacs is now refreshing its package database...") - (package-refresh-contents) - ;; Install the missing packages - (dolist (p my-missing-packages) - (message "Installing `%s' .." p) - (package-install p)) - (setq my-missing-packages '())) - - (unless (package-installed-p 'use-package) - (package-install 'use-package)) + ; Install the missing packages + (dolist (package my-package-list) + (unless (package-installed-p package) + (package-install package))) - ;; set and load custom.el + ;; Set and load custom.el (setq custom-file (concat user-emacs-directory "custom.el")) (load custom-file 'noerror) #+end_src |