about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2020-12-04 23:03:18 -0600
committerCase Duckworth2020-12-04 23:03:18 -0600
commitb6ac8e8ff8edf1463345e86e979b4247cdfee496 (patch)
treebcc5551a455ebe4b956c992f4aa68a87ea11be9f
parentAdd docstring for acdw/load-init. (diff)
downloademacs-b6ac8e8ff8edf1463345e86e979b4247cdfee496.tar.gz
emacs-b6ac8e8ff8edf1463345e86e979b4247cdfee496.zip
Tangle in properties and fix other stuff
-rw-r--r--config.org48
1 files changed, 34 insertions, 14 deletions
diff --git a/config.org b/config.org index 3f3dd00..bfa7490 100644 --- a/config.org +++ b/config.org
@@ -142,12 +142,15 @@ While this is like, the /dumbest/ way to do this, it's what I'm doing right now.
142#+end_src 142#+end_src
143 143
144* Early initiation 144* Early initiation
145:PROPERTIES:
146:header-args: :tangle early-init.el
147:END:
145 148
146Starting with version 27.1, Emacs loads =early-init.el= /before/ =init.el=, setting up early stuff like package management, etc. Since I use an alternative package manager, I have to bootstrap it here. 149Starting with version 27.1, Emacs loads =early-init.el= /before/ =init.el=, setting up early stuff like package management, etc. Since I use an alternative package manager, I have to bootstrap it here.
147 150
148Of course, I also want to set some really early-on settings here too, like =load-prefer-newer= -- why not? 151Of course, I also want to set some really early-on settings here too, like =load-prefer-newer= -- why not?
149 152
150#+begin_src emacs-lisp :tangle early-init.el :comments no 153#+begin_src emacs-lisp :comments no
151;; early-init.el -*- lexical-binding: t; no-byte-compile: t -*- 154;; early-init.el -*- lexical-binding: t; no-byte-compile: t -*-
152 (setq load-prefer-newer t) 155 (setq load-prefer-newer t)
153#+end_src 156#+end_src
@@ -156,7 +159,7 @@ Of course, I also want to set some really early-on settings here too, like =load
156 159
157Let's try to speed startup times by increasing the garbage collector's threshold while running init. Note the hook afterwards that restores it to a reasonable default. 160Let's try to speed startup times by increasing the garbage collector's threshold while running init. Note the hook afterwards that restores it to a reasonable default.
158 161
159#+begin_src emacs-lisp :tangle early-init.el 162#+begin_src emacs-lisp
160 (setq gc-cons-threshold (* 100 100 1000)) 163 (setq gc-cons-threshold (* 100 100 1000))
161 164
162 (add-hook 'after-init-hook 165 (add-hook 'after-init-hook
@@ -170,7 +173,7 @@ Let's try to speed startup times by increasing the garbage collector's threshold
170 173
171When using Windows (at work), I need to use the PortableGit installation I've downloaded, since I don't have Admin privileges. 174When using Windows (at work), I need to use the PortableGit installation I've downloaded, since I don't have Admin privileges.
172 175
173#+begin_src emacs-lisp :tangle early-init.el 176#+begin_src emacs-lisp
174 (when (eq system-type 'windows-nt) 177 (when (eq system-type 'windows-nt)
175 (dolist (path '("c:/Users/aduckworth/Downloads/emacs/bin" 178 (dolist (path '("c:/Users/aduckworth/Downloads/emacs/bin"
176 "C:/Users/aduckworth/Downloads/PortableGit/bin" 179 "C:/Users/aduckworth/Downloads/PortableGit/bin"
@@ -180,7 +183,7 @@ When using Windows (at work), I need to use the PortableGit installation I've do
180 183
181Elsewhere, I want to add a few more paths to the =exec-path= as well, since I store scripts in a couple of places at ~. 184Elsewhere, I want to add a few more paths to the =exec-path= as well, since I store scripts in a couple of places at ~.
182 185
183#+begin_src emacs-lisp :tangle early-init.el 186#+begin_src emacs-lisp
184 (dolist (path `(,(expand-file-name "bin" 187 (dolist (path `(,(expand-file-name "bin"
185 user-emacs-directory) 188 user-emacs-directory)
186 ,(expand-file-name "~/bin") 189 ,(expand-file-name "~/bin")
@@ -196,7 +199,7 @@ So far, this is the best package manager I've used. It allows for /truly/ decla
196The one annoying thing is that this bootstrap code doesn't work on Windows for some reason. I'm too lazy to really try and figure out why, so when I need to bootstrap on Windows (pretty rare, TBH), I just [[https://github.com/raxod502/straight.el/archive/master.zip][download the master-branch zip file]] and extract it to =~/.emacs.d/straight/repos/=. 199The one annoying thing is that this bootstrap code doesn't work on Windows for some reason. I'm too lazy to really try and figure out why, so when I need to bootstrap on Windows (pretty rare, TBH), I just [[https://github.com/raxod502/straight.el/archive/master.zip][download the master-branch zip file]] and extract it to =~/.emacs.d/straight/repos/=.
197 200
198#+NAME: straight-bootstrap 201#+NAME: straight-bootstrap
199#+begin_src emacs-lisp :tangle no 202#+begin_src emacs-lisp
200 (defvar bootstrap-version) 203 (defvar bootstrap-version)
201 (let ((bootstrap-file 204 (let ((bootstrap-file
202 (expand-file-name "straight/repos/straight.el/bootstrap.el" 205 (expand-file-name "straight/repos/straight.el/bootstrap.el"
@@ -216,7 +219,7 @@ The one annoying thing is that this bootstrap code doesn't work on Windows for s
216 219
217For the KeePassXC bits later, I need the =develop= branch of straight, so I can pass a =:build= keyword. I can do this, but I have to override the recipe for =straight.el= itself. I do that here. For more information, see [[https://github.com/raxod502/straight.el#overriding-recipes][the README]]. 220For the KeePassXC bits later, I need the =develop= branch of straight, so I can pass a =:build= keyword. I can do this, but I have to override the recipe for =straight.el= itself. I do that here. For more information, see [[https://github.com/raxod502/straight.el#overriding-recipes][the README]].
218 221
219#+begin_src emacs-lisp :tangle early-init.el :noweb yes 222#+begin_src emacs-lisp :noweb yes :tangle no
220 (setq straight-repository-branch "develop") 223 (setq straight-repository-branch "develop")
221 224
222 <<straight-bootstrap>> 225 <<straight-bootstrap>>
@@ -226,7 +229,7 @@ For the KeePassXC bits later, I need the =develop= branch of straight, so I can
226 229
227Like I said, =straight.el= hooks into =use-package= easily. These two lines get the latter to use the former by default. 230Like I said, =straight.el= hooks into =use-package= easily. These two lines get the latter to use the former by default.
228 231
229#+begin_src emacs-lisp :tangle early-init.el 232#+begin_src emacs-lisp
230 (setq straight-use-package-by-default t) 233 (setq straight-use-package-by-default t)
231 (straight-use-package 'use-package) 234 (straight-use-package 'use-package)
232#+end_src 235#+end_src
@@ -273,7 +276,7 @@ It's not ... perfect, but it's kind of nice.
273 276
274I thought this was included in Emacs at first, but it's not -- so we need to install and require it. 277I thought this was included in Emacs at first, but it's not -- so we need to install and require it.
275 278
276#+begin_src emacs-lisp :tangle early-init.el 279#+begin_src emacs-lisp
277 (straight-use-package 'async) 280 (straight-use-package 'async)
278 (require 'async) 281 (require 'async)
279#+end_src 282#+end_src
@@ -619,11 +622,28 @@ By the way, the [[https://www.reddit.com/r/emacs/comments/k3c0u7][Reddit announc
619 ("M-y" . consult-yank-pop) 622 ("M-y" . consult-yank-pop)
620 ("<help> a" . consult-apropos)) 623 ("<help> a" . consult-apropos))
621 :init 624 :init
622 (fset 'multi-occur #'consult-multi-occur) 625 (fset 'multi-occur #'consult-multi-occur))
623 (consult-annotate-mode) 626#+end_src
624 :config 627
625 (setf (alist-get 'execute-extended-command consult-annotate-alist) 628*** [[https://github.com/minad/marginalia/][Marginalia]]
626 #'consult-annotate-command-full)) 629
630These provide /marginalia/ in the minibuffer. Until like, December 4, 2020, they were part of =consult=. So let's try them out.
631
632#+begin_src emacs-lisp
633 (use-package marginalia
634 :straight (marginalia
635 :host github
636 :repo "minad/marginalia"
637 :branch "main")
638 :init
639 (marginalia-mode)
640 ;; Enable richer annotations for M-x.
641 ;; Only keybindings are shown by default, in order to reduce noise for this very common command.
642 ;; * marginalia-annotate-symbol: Annotate with the documentation string
643 ;; * marginalia-annotate-command-binding (default): Annotate only with the keybinding
644 ;; * marginalia-annotate-command-full: Annotate with the keybinding and the documentation string
645 (setf (alist-get 'command marginalia-annotator-alist)
646 #'marginalia-annotate-command-full))
627#+end_src 647#+end_src
628 648
629*** Ignore case 649*** Ignore case
@@ -1721,7 +1741,7 @@ I've just recently started (again) using mu4e. We'll see how it goes.
1721 1741
1722I use KeePassXC, and I'd /like/ to use KeePassXC to get passwords and stuff at home. So I'm trying this library out, since the secret-tool integration isn't built into the KeePassXC on Void. If this doesn't work, looks like I'll have to become a packager 😜 1742I use KeePassXC, and I'd /like/ to use KeePassXC to get passwords and stuff at home. So I'm trying this library out, since the secret-tool integration isn't built into the KeePassXC on Void. If this doesn't work, looks like I'll have to become a packager 😜
1723 1743
1724#+begin_src emacs-lisp :noweb yes 1744#+begin_src emacs-lisp :noweb yes :tangle no
1725 (when (eq system-type 'gnu/linux) 1745 (when (eq system-type 'gnu/linux)
1726 <<use-package-sodium>> 1746 <<use-package-sodium>>
1727 (use-package keepassxc 1747 (use-package keepassxc