From cd2f934bcbf5a077553ae326ad27d5a2e2a2e823 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Wed, 29 Dec 2021 10:03:44 +0100 Subject: [PATCH] Tweak installation of selected packages --- README.org | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index cf76cda..c86d2e3 100644 --- a/README.org +++ b/README.org @@ -276,7 +276,11 @@ the ~custom-file~ as [[info:emacs#Saving Customizations][saving customizations ( '(kill-ring-max 300) '(package-archives '(("gnu" . "https://elpa.gnu.org/packages/") ("nongnu" . "https://elpa.nongnu.org/nongnu/") - ("melpa" . "https://melpa.org/packages/")))) + ("melpa" . "https://melpa.org/packages/"))) + ;; Pin those packages to GNU ELPA to get the info documentation. + '(package-pinned-packages '((consult . "gnu") + (marginalia . "gnu") + (vertico . "gnu")))) #+end_src #+caption[Customize the second set of Emacs variables]: @@ -318,6 +322,7 @@ the ~custom-file~ as [[info:emacs#Saving Customizations][saving customizations ( rainbow-mode ; set background color to color string smartparens ; smart editing of character pairs toml-mode ; Tom's Obvious Minimal Language mode + undo-tree ; more advanced yet simpler undo system vertico ; VERTical Interactive Completion wgrep ; open a writable grep buffer which-key ; on the fly key-binding help @@ -366,7 +371,7 @@ archives: 1. The [[https://elpa.gnu.org/][GNU Emacs Lisp Package Archive]] 2. The [[https://elpa.nongnu.org/][NonGNU Emacs Lisp Package Archive]]. 3. The [[https://melpa.org/#/][Milkypostman’s Emacs Lisp Package Archive (MELPA)]]. -Finally, the [[https://github.com/quelpa/quelpa][quelpa]] tool allows to fetch code from any source and build a +In addition, the [[https://github.com/quelpa/quelpa][quelpa]] tool allows to fetch code from any source and build a package on your computer before installation. The code in listing [[lst:install-selected-packages]] assumes that the package @@ -374,7 +379,10 @@ system is in a *virgin* state in case the package [[https://github.com/emacscoll Refreshing the contents of available packages at least once is a requirement in order to be able to install and load any packages, hence also [[https://github.com/emacscollective/no-littering][no-littering]]. -The call src_emacs-lisp{(package-install-selected-packages)} checks the +Then, it ensures installation of [[https://github.com/quelpa/quelpa][quelpa]] before ensuring installation of +[[https://www.reddit.com/r/emacs/comments/l6rcqh/undotree_repositorys_new_home_gitlab/][undo-tree]]. + +Finally, the call src_emacs-lisp{(package-install-selected-packages)} checks the installation status of all packages in src_emacs-lisp{package-selected-packages} and installs the missing packages after the user has agreed to its prompt. In case of normal Emacs usage, src_emacs-lisp{(package-list-packages)} refreshes @@ -389,6 +397,13 @@ the contents of packages and allows to update packages to the latest version. (package-install 'no-littering) (require 'no-littering)) + (unless (package-installed-p 'quelpa) + (package-install 'quelpa)) + + (unless (package-installed-p 'undo-tree) + ;; Neither GNU ELPA, nor MELPA have the latest version. + (quelpa '(undo-tree :repo "tsc25/undo-tree" :fetcher gitlab))) + (unless noninteractive (package-install-selected-packages)) #+end_src