diff options
Diffstat (limited to 'emacs.org')
-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 |