]> git.eshelyaron.com Git - dotfiles.git/commitdiff
Add "Fresh installation section"
authorEshel Yaron <eshel@areionsec.com>
Fri, 6 May 2022 11:00:12 +0000 (14:00 +0300)
committerEshel Yaron <eshel@areionsec.com>
Fri, 6 May 2022 11:00:12 +0000 (14:00 +0300)
.emacs.d/esy.org
.emacs.d/init.el

index 49dd44829783ba9019b8be6eee1f9e574235ba18..f7c1c3f23ae09f1516ff205e88aba3f07c7a0674 100644 (file)
@@ -6,7 +6,29 @@
 
 * Emacs configuration
 
+** Fresh installation
+
+To bootstrap this configuration, clone the repository from [[https://git.sr.ht/~eshel/dotfiles][SourceHut]]
+and create a symlink from the =.emacs.d= subdirectory into your home
+directory, possibly using [[https://www.gnu.org/software/stow/][GNU Stow]].
+
+#+begin_src shell
+  $ git clone https://git.sr.ht/~eshel/dotfiles
+  $ cd dotfiles/.emacs.d
+  $ stow -t ~ .
+  $ emacs
+#+end_src
+
+After the first run of the provided =init.el=, modifications to
+=esy.org= will be made available automatically whenever Emacs
+restarts. See also [[#bootstrap][Literate config bootstrap]].
+
 ** Elisp Header
+:PROPERTIES:
+:CUSTOM_ID: header
+:END:
+
+For further information, see [[info:elisp#Library Headers][elisp#Library Headers]].
 
 #+begin_src emacs-lisp
   ;;; esy.el --- GNU Emacs configuration -*- lexical-binding: t -*-
@@ -50,7 +72,7 @@
           rainbow-delimiters rg smtpmail-multi tramp typit vterm vundo
           which-key whitespace-cleanup-mode hide-mode-line))
 
-  (package-initialize)
+  (package-install-selected-packages)
 #+end_src
 
 ** Suppressing native compilation warnings
 ** Org-mode settings                                                   :org:
 
 *** Literate config bootstrap
+:PROPERTIES:
+:CUSTOM_ID: bootstrap
+:END:
 
 #+begin_src emacs-lisp
   (defun esy/tangle-and-compile-config ()
     "Tangle literate configuration file."
+    (interactive)
     (require 'org)
     (require 'ob)
     (let ((source (locate-user-emacs-file "esy.org"))
 #+begin_src emacs-lisp
   (defun esy/customize-ctl-x-map ()
     "Configure the `C-x' keymap."
-    (require 'ialign)
+    (require 'ol)
  ;  (require 'magit)
     (require 'consult)
     (require 'ace-window)
     (keymap-set ctl-x-map "b" #'consult-buffer)
     (keymap-set ctl-x-4-map "b" #'consult-buffer-other-window)
     (keymap-set ctl-x-map "!" #'consult-flymake)
-    (keymap-set ctl-x-map "l" #'ialign)
+    (keymap-set ctl-x-map "l" #'org-store-link)
     (keymap-set ctl-x-map "g" #'magit-status)
     (keymap-set ctl-x-map "s" rg-global-map)
     (keymap-set ctl-x-map "c" #'org-capture)
index 535ce78bbd51099f220696aef4820e26824e1b6e..e30eabf54f1cd834c91ef769d2c96bfc3d812587 100644 (file)
@@ -6,7 +6,11 @@
 ;; (require 'benchmark-init)
 ;; (add-hook 'after-init-hook 'benchmark-init/deactivate)
 
-(load-file (locate-user-emacs-file "esy.el"))
+(let ((esy (expand-file-name (locate-user-emacs-file "esy"))))
+  (or (load esy t t nil t)
+      (progn
+        (require 'org)
+        (org-babel-load-file (concat esy ".org") t))))
 
 (provide 'init)
 ;;; init.el ends here