diff --git a/config/defaults.org b/config/defaults.org index 9a4a9da..ce371ca 100644 --- a/config/defaults.org +++ b/config/defaults.org @@ -80,17 +80,6 @@ (recentf-max-saved-items 2048)) #+end_src -* package-archive with priorities -#+begin_src emacs-lisp :results output silent - (when (require 'package nil :noerror) - (add-to-list 'package-archives '("stable" . "https://stable.melpa.org/packages/")) - (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) - - (setq package-archive-priorities '(("gnu" . 99) - ("nongnu" . 80) - ("stable" . 70) - ("melpa" . 0)))) -#+end_src * diminish modes #+begin_src emacs-lisp (use-package diminish :ensure t) diff --git a/init.el b/init.el index 629616d..b59de93 100644 --- a/init.el +++ b/init.el @@ -8,11 +8,24 @@ ;; Stop popups for warning messages, keep in log buffer (setopt warning-minimum-level :error) -(defvar my/config-files () "List of literate config files to load.") +;; Configure packages archives with priority +(when (require 'package nil :noerror) + (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) + (add-to-list 'package-archives '("stable" . "https://stable.melpa.org/packages/")) -(setq my/config-files (directory-files (locate-user-emacs-file "config") t ".org")) + (setopt package-archive-priorities '(("melpa" . 10) + ("stable" . 5) + ("nongnu" . 5) + ("gnu" . 0))) + (package-initialize)) -(dolist (fname my/config-files) (org-babel-load-file fname)) +(defvar my/config-files + (directory-files (locate-user-emacs-file "config") t ".org") + "List of literate config files to load.") + +(dolist (fname my/config-files) + (unless (string-match-p (regexp-quote "#") fname) + (org-babel-load-file fname))) (provide 'init) ;;; init.el ends here