From 93f9fac6b4fec1f1575e0fc7b15d42cd23bc1281 Mon Sep 17 00:00:00 2001 From: Gerard Vermeulen Date: Wed, 8 Dec 2021 05:00:15 +0100 Subject: [PATCH] Move the optional packages into package-selected-packages --- README.org | 82 +++++++++++++++++++----------------------------------- 1 file changed, 29 insertions(+), 53 deletions(-) diff --git a/README.org b/README.org index 7fd9483..401c147 100644 --- a/README.org +++ b/README.org @@ -187,25 +187,50 @@ not load the ~custom-file~ as [[info:emacs#Saving Customizations][saving customi `(package-selected-packages `( ,@(when (version< emacs-version "28.0") - '(org)) ; plain text thought organizer + '( + org ; plain text thought organizer + modus-themes ; high foreground/background contrast themes + )) anaconda-mode ; strangles python-mode + async ; asynchroneous processing auctex ; Aalborg University Center TeX blacken ; Black Python-code formatter client citar ; bibliography handling citeproc ; bibliography handling + company ; complete anything company-anaconda ; complete anything in anaconda-mode consult ; consult completing-read eglot ; Emacs polyGLOT LSP client + electric-operator ; automatic spacing around operators + elfeed ; web feed reader embark ; act on any buffer selection + emms ; Emacs Multi-Media System htmlize ; convert buffer contents to HTML + iedit ; simultaneous multi-entity editing + laas ; LaTeX Auto-Activating Snippets leuven-theme ; beautiful color theme + magit ; Git Text-based User Interface marginalia ; minibuffer margin notes + markdown-mode ; markdown text mode + no-littering ; keep `user-emacs-directory' clean + nov ; EPUB reader orderless ; Emacs completion style pdf-tools ; interactive docview replacement pdf-view-restore ; add view history to pdf-tools pyenv-mode ; Python environment selector quelpa ; install Emacs packages from source - vertico)) ; VERTical Interactive Completion + rainbow-mode ; set background color to color string + smartparens ; smart editing of character pairs + toml-mode ; Tom's Obvious Minimal Language mode + vertico ; VERTical Interactive Completion + wgrep ; open a writable grep buffer + which-key ; on the fly key-binding help + wordnut ; WordNet lexical database + writegood-mode ; bullshit and weasel-word detector + ws-butler ; remove trailing whitespace + xr ; undo rx to grok regular expressions + yasnippet ; code or text template expansion + )) '(python-indent-guess-indent-offset nil) '(recentf-mode t) '(save-place-mode t) @@ -251,24 +276,18 @@ archives: Finally, 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 order of the next two package-bootstrapping blocks matters -because first block prepares Emacs for the second block. - The code assumes that the package system is in a *virgin* state in case the package [[https://github.com/emacscollective/no-littering][no-littering]] is not present. 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]]. -You have to refresh the list of available packages yourself before updating -the installed packages. - The call src_emacs-lisp[:exports code]{(package-install-selected-packages)} checks the installation status of all packages in src_emacs-lisp[:exports code]{package-selected-packages} and installs the missing packages after the user has agreed to its prompt. -Finally, ~my-install-packages~ facilitates installation of all packages in a -list of packages. +After package bootstrapping, you have to refresh the list of available packages +yourself before updating the installed packages. #+attr_latex: :options bgcolor=LightGoldenrodYellow #+begin_src emacs-lisp @@ -280,49 +299,6 @@ list of packages. (unless noninteractive (package-install-selected-packages)) - - (defun my-install-packages (packages) - "Ensure installation of all packages in PACKAGES." - (dolist (package packages) - (unless (package-installed-p package) - (package-install package)))) -#+end_src - -The next source code block facilitates installlation of the optional package, -The user can run src_emacs-lisp[:exports code]{(my-install-optional-packages)} -to install all optional packages, or he can install each package one by one. - -#+attr_latex: :options bgcolor=LightGoldenrodYellow -#+begin_src emacs-lisp - ;; The is the 2nd package bootstrapping block. - (defvar my-optional-packages - `( - ,@(when (version< emacs-version "28.0") - '(modus-themes)) ; high foreground/background contrast themes - async ; asynchroneous processing - company ; complete anything - electric-operator ; automatic spacing around operators - elfeed ; web feed reader - emms ; Emacs Multi-Media System - iedit ; simultaneous multi-entity editing - laas ; LaTeX Auto-Activating Snippets - magit ; Git Text-based User Interface - markdown-mode ; markdown text mode - nov ; EPUB reader - rainbow-mode ; set background color to color string - smartparens ; smart editing of character pairs - toml-mode ; Tom's Obvious Minimal Language mode - wgrep ; open a writable grep buffer - which-key ; on the fly key-binding help - wordnut ; WordNet lexical database - writegood-mode ; bullshit and weasel-word detector - ws-butler ; remove trailing whitespace - xr ; undo rx to grok regular expressions - yasnippet)) ; code or text template expansion - - (defun my-install-optional-packages () - (interactive) - (my-install-packages my-optional-packages)) #+end_src * [[info:emacs#Emacs Server][Using Emacs as a server (info)]]