summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-06-03 06:54:21 +0300
committerThanos Apollo <[email protected]>2023-06-03 06:54:21 +0300
commit7cdefdfd1b95b47481ea4b4ba5aac1e75968a94f (patch)
tree436f1d3093e5a27216891b7a40e375c94dc286ef
parent4bb6680c9f0e4c7056bf586aa5f805a18a8009ac (diff)
emacs: redo package installation
Simple use package.el
-rwxr-xr-xemacs.org28
1 files changed, 8 insertions, 20 deletions
diff --git a/emacs.org b/emacs.org
index 1ff3ee0..b8d171e 100755
--- a/emacs.org
+++ b/emacs.org
@@ -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