# HG changeset patch # User Oleksandr Gavenko # Date 1609620144 -7200 # Node ID 3f69332472cb5c4218b375082d49d4d2fb4ceafe # Parent bedbd1cd366d2a4cfbe968a86d6d2d92467ce13b Added Make target to preinstall packages from ELPA. diff -r bedbd1cd366d -r 3f69332472cb .emacs-defs --- a/.emacs-defs Sat Jan 02 22:41:10 2021 +0200 +++ b/.emacs-defs Sat Jan 02 22:42:24 2021 +0200 @@ -28,6 +28,39 @@ (setq bookmark-default-file (concat user-emacs-directory "bookmarks")) (setq ido-save-directory-list-file (concat user-emacs-directory ".ido.last")) +(setq + package-archives + '(("gnu" . "http://elpa.gnu.org/packages/") + ;; ("marmalade" . "http://marmalade-repo.org/packages/") + ("melpa-stbl" . "https://stable.melpa.org/packages/") + ("melpa" . "http://melpa.org/packages/")) + package-archive-priorities + '(("gnu" . 10) + ("melpa-stbl" . 5) + ("melpa" . 0)) ) + +(setq + package-selected-packages + '(adoc-mode + apache-mode + dockerfile-mode + groovy-mode + markdown-mode + terraform-mode + web-mode + yaml-mode + expand-region + helm + )) + +(defun my-lisp--install-external-packages () + ;; (package-initialize) + ;; Update `package-archive-contents'. + (advice-add #'y-or-n-p :override (lambda (prompt) t)) + (package-refresh-contents) + ;; (package-install 'yaml-mode) + (package-install-selected-packages)) + (defun my-lisp--load-pre () (mapc (lambda (f) (when (file-exists-p f) diff -r bedbd1cd366d -r 3f69332472cb .emacs-my --- a/.emacs-my Sat Jan 02 22:41:10 2021 +0200 +++ b/.emacs-my Sat Jan 02 22:42:24 2021 +0200 @@ -340,26 +340,6 @@ (setq w32-apps-modifier 'super)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(message "package, elpa") - -(eval-when 'compile (require 'package nil t)) - -;; (setq package-enable-at-startup t) -(when (fboundp 'package-initialize) - (package-initialize)) - -(setq - package-archives - '(("gnu" . "http://elpa.gnu.org/packages/") - ;; ("marmalade" . "http://marmalade-repo.org/packages/") - ("melpa-stbl" . "https://stable.melpa.org/packages/") - ("melpa" . "http://melpa.org/packages/")) - package-archive-priorities - '(("gnu" . 10) - ("melpa-stbl" . 5) - ("melpa" . 0)) ) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (message "appearance") ;; To maximize frame on full screen, not work with Windows Emacs 21.4. diff -r bedbd1cd366d -r 3f69332472cb Makefile --- a/Makefile Sat Jan 02 22:41:10 2021 +0200 +++ b/Makefile Sat Jan 02 22:42:24 2021 +0200 @@ -135,6 +135,10 @@ install-all: install install -m 0644 -t $(emacsdir) .emacs-pre .emacs-post +.PHONY: install-packages +install-packages: + $(EMACS) --batch -l "$(curdir)/.emacs-defs" -f my-lisp--install-external-packages + .PHONY: install install: upgrade rm -rf $(mylispdir) diff -r bedbd1cd366d -r 3f69332472cb README.rst --- a/README.rst Sat Jan 02 22:41:10 2021 +0200 +++ b/README.rst Sat Jan 02 22:42:24 2021 +0200 @@ -7,8 +7,19 @@ :Author: Oleksandr Gavenko -Config files structure. -======================= +Installation +=== + +To install:: + + make install + +To download external packages:: + + mymake install-packages + +Config files structure +=== I use ``~/.emacs.d/init.d`` as main entry point for customisation. Tha file load anoth files in such order: diff -r bedbd1cd366d -r 3f69332472cb init.el --- a/init.el Sat Jan 02 22:41:10 2021 +0200 +++ b/init.el Sat Jan 02 22:42:24 2021 +0200 @@ -6,14 +6,23 @@ ;; ;; For load order see README. -;; ====================================================================== -;; Load path. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(message "load-path") (load "~/.emacs.d/.emacs-defs") + +(load custom-file t) +(load my-lisp-autogen t) +(load my-lisp-auth t) +(load my-lisp-pre) + (my-lisp--load-usr-home) -(mapc - (lambda (fname) (if (>= emacs-major-version 23) - (load fname t) - (load fname t nil t))) - (list custom-file my-lisp-autogen my-lisp-auth my-lisp-pre my-lisp-autoload my-lisp-dotemacs my-lisp-post)) +;; (setq package-enable-at-startup t) +(when (fboundp 'package-initialize) + (package-initialize)) + +(load my-lisp-autoload t) +(load my-lisp-dotemacs t) +(load my-lisp-post t) +