Add documentation

This commit is contained in:
Gerard Vermeulen 2021-12-07 05:39:02 +01:00
parent d664aa9de1
commit 8bcb321bbc

View File

@ -101,10 +101,9 @@ Here follows a list of interesting Emacs configurations:
that she is a very practical person trying to achieve her goals by the most that she is a very practical person trying to achieve her goals by the most
efficient means. I have stolen her idea of using [[https://github.com/quelpa/quelpa][quelpa]] to install packages efficient means. I have stolen her idea of using [[https://github.com/quelpa/quelpa][quelpa]] to install packages
from any source. from any source.
5. [[https://github.com/purcell/emacs.d][Steve Purcell's configuration]] is well organized and a show-case of readable 5. [[https://github.com/purcell/emacs.d][Steve Purcell's configuration]] is well organized, a showcase of readable code,
[[info:elisp#Top][Emacs lisp (info)]] code. I have stolen his idea of versioning the as well helpful commit and issue histories. See for instance the discussion
~package-user-dir~ variable to prevent clashes between the byte-compiler on [[https://github.com/purcell/emacs.d/issues/778][the correctness of order of company candidates in Emacs lisp mode]].
output of different Emacs versions.
6. [[https://github.com/tecosaur/emacs-config][Timothy E. Chapman's configuration]] 6. [[https://github.com/tecosaur/emacs-config][Timothy E. Chapman's configuration]]
* [[info:emacs#Early Init File][Early Init File (info)]] * [[info:emacs#Early Init File][Early Init File (info)]]
@ -112,8 +111,6 @@ Here follows a list of interesting Emacs configurations:
:CUSTOM_ID: sec:early-init-file :CUSTOM_ID: sec:early-init-file
:END: :END:
Note: src_emacs-lisp[:exports code]{(find-function #'hack-local-variables)}
#+attr_latex: :options bgcolor=LightGoldenrodYellow #+attr_latex: :options bgcolor=LightGoldenrodYellow
#+begin_src emacs-lisp :tangle early-init.el #+begin_src emacs-lisp :tangle early-init.el
;;; early-init.el --- user early-init file -*- lexical-binding: t -*- ;;; early-init.el --- user early-init file -*- lexical-binding: t -*-
@ -132,6 +129,16 @@ Note: src_emacs-lisp[:exports code]{(find-function #'hack-local-variables)}
;;; earl-init.el ends here ;;; earl-init.el ends here
#+end_src #+end_src
In order to get help in understanding the code block above in a buffer showing
the original [[info:org#Top][Org]] source file, move point (or cursor) to one of the items of the
list the and type =C-c C-c=:
1. src_emacs-lisp[:exports code]{(describe-variable #'load-prefer-newer t)}
2. src_emacs-lisp[:exports code]{(apropos-library "no-littering")}
3. src_emacs-lisp[:exports code]{(find-function #'hack-local-variables)}
to execute the code between the curly braces for access to help.
This shows why *Emacs is a self-documenting editor.*
* [[info:emacs#Init File][Init File (info)]] header * [[info:emacs#Init File][Init File (info)]] header
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: sec:init-file-header :CUSTOM_ID: sec:init-file-header
@ -252,6 +259,11 @@ any packages, hence also [[https://github.com/emacscollective/no-littering][no-l
You have to refresh the list of available packages yourself before updating You have to refresh the list of available packages yourself before updating
the installed packages. 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 Finally, ~my-install-packages~ facilitates installation of all packages in a
list of packages. list of packages.
@ -273,7 +285,9 @@ list of packages.
(package-install package)))) (package-install package))))
#+end_src #+end_src
Facilitate installlation of the optional packages. 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 #+attr_latex: :options bgcolor=LightGoldenrodYellow
#+begin_src emacs-lisp #+begin_src emacs-lisp