summaryrefslogtreecommitdiffhomepage
path: root/readme.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-02-02 05:18:42 +0000
committerjao <jao@gnu.org>2021-02-02 05:18:42 +0000
commit8b6a44f89550665cce3ec7c7ffab7a9cecf59a4f (patch)
tree36ef996ec166813b39b119f51318a16bb475092e /readme.org
parent771abb84830678455de4625ac7f082d8100f0ea0 (diff)
downloadelibs-8b6a44f89550665cce3ec7c7ffab7a9cecf59a4f.tar.gz
elibs-8b6a44f89550665cce3ec7c7ffab7a9cecf59a4f.tar.bz2
configuration orgs
Diffstat (limited to 'readme.org')
-rw-r--r--readme.org68
1 files changed, 68 insertions, 0 deletions
diff --git a/readme.org b/readme.org
new file mode 100644
index 0000000..2e067f7
--- /dev/null
+++ b/readme.org
@@ -0,0 +1,68 @@
+#+PROPERTY: header-args :tangle ~/.emacs.d/init.el :comments yes :results silent
+
+* Bootstrap
+ This is the emacs standard init file, which will load (maybe
+ tangled) [[./init.org][init.org]] the file, checking first whether a fresh tangle is
+ needed. Note that the rest of elisp tangling in init.org goes to a
+ different file (namely, the one that is loaded by
+ =~/.emacs.d/init.el=). However, also note that if [[https://github.com/jingtaozf/literate-elisp/blob/master/literate-elisp.org][literate-elisp]] is
+ installed, we load instead directly the org file. It's because of
+ that that we start by setting up packages.
+
+ Here's the directory where a checkout of this repo live:
+
+ #+begin_src emacs-lisp
+ (defvar jao-emacs-dir (expand-file-name "~/etc/emacs"))
+ #+end_src
+
+ followed by package.el's initialisation:
+
+ #+begin_src emacs-lisp
+ (setq package-user-dir
+ (expand-file-name (format "~/.emacs.d/elpa.%s" emacs-major-version))
+ package-check-signature 'allow-unsigned)
+
+ (require 'package)
+ (dolist (a '(("melpa" . "https://melpa.org/packages/")
+ ("org" . "https://orgmode.org/elpa/")))
+ (add-to-list 'package-archives a t))
+
+ (package-initialize)
+ #+end_src
+
+ and a tangling helper:
+
+ #+BEGIN_SRC emacs-lisp
+ (defun jao-maybe-tangle (basename)
+ (let ((el (expand-file-name (format "%s.el" basename) jao-emacs-dir))
+ (org (expand-file-name (format "%s.org" basename) jao-emacs-dir)))
+ (when (file-newer-than-file-p org el)
+ (require 'ob-tangle)
+ (org-babel-tangle-file org el))
+ el))
+ #+end_src
+
+ Finally, we load either init.org or its tangled version from
+ ~jao-emacs-dir~:
+
+ #+begin_src emacs-lisp
+ (if (require 'literate-elisp nil t)
+ (literate-elisp-load-file (expand-file-name "init.org" jao-emacs-dir))
+ (load-file (jao-maybe-tangle "init")))
+ #+end_src
+
+ You can tangle this readme to generate the minimal init.el file above.
+
+* Emacs configuration as a set of literate files
+
+- [[./init.org][init.org]]: main configuration as a literate org file; it uses
+ (besides lots of packages), many of my libraries in [[./libs][libs]], and loads
+ on demand the other org files below.
+- [[./org.org][org.org]] org mode configuration.
+- [[./consult.org][consult.org]]: completion setup using selectrum, consult and friends.
+- [[./counsel.org][counsel.org]]: completion setup using ivy, counsel and friends.
+- [[./blog.org][blog.org]]: blogging using org-static-blog.
+- [[./gnus.org][gnus.org]]: tangled to gnus.el automatically by init.org, so that it's
+ ready for loading by Gnus.
+- [[./exwm.org][exwm.org]]: configuration for exwm, loaded when ~jao-exwmn-enable~ is
+ called.