summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--README.md62
-rw-r--r--config.org401
2 files changed, 235 insertions, 228 deletions
diff --git a/README.md b/README.md index b4e10ba..f725e84 100644 --- a/README.md +++ b/README.md
@@ -80,6 +80,7 @@ when it errors.
80 '(use-package-custom-update 80 '(use-package-custom-update
81 :host github 81 :host github
82 :repo "a13/use-package-custom-update")) 82 :repo "a13/use-package-custom-update"))
83
83 (require 'use-package-custom-update) 84 (require 'use-package-custom-update)
84 85
85 86
@@ -146,6 +147,7 @@ when it errors.
146 (cuss default-frame-alist 147 (cuss default-frame-alist
147 '((tool-bar-lines . 0) 148 '((tool-bar-lines . 0)
148 (menu-bar-lines . 0))) 149 (menu-bar-lines . 0)))
150
149 (menu-bar-mode -1) 151 (menu-bar-mode -1)
150 (tool-bar-mode -1) 152 (tool-bar-mode -1)
151 153
@@ -154,6 +156,7 @@ when it errors.
154 156
155 (add-to-list 'default-frame-alist '(vertical-scroll-bars . nil)) 157 (add-to-list 'default-frame-alist '(vertical-scroll-bars . nil))
156 (scroll-bar-mode -1) 158 (scroll-bar-mode -1)
159
157 (add-to-list 'default-frame-alist '(horizontal-scroll-bars . nil)) 160 (add-to-list 'default-frame-alist '(horizontal-scroll-bars . nil))
158 (horizontal-scroll-bar-mode -1) 161 (horizontal-scroll-bar-mode -1)
159 162
@@ -171,6 +174,7 @@ when it errors.
171### Remove the bell 174### Remove the bell
172 175
173 (cuss visible-bell (not (string= (system-name) "larry"))) 176 (cuss visible-bell (not (string= (system-name) "larry")))
177
174 (defun acdw/ring-bell-function () 178 (defun acdw/ring-bell-function ()
175 "Custom bell-ringing function." 179 "Custom bell-ringing function."
176 (let ((orig-face (face-foreground 'mode-line))) 180 (let ((orig-face (face-foreground 'mode-line)))
@@ -180,6 +184,7 @@ when it errors.
180 (lambda (fg) 184 (lambda (fg)
181 (set-face-foreground 'mode-line fg)) 185 (set-face-foreground 'mode-line fg))
182 orig-face))) 186 orig-face)))
187
183 (cuss ring-bell-function #'acdw/ring-bell-function) 188 (cuss ring-bell-function #'acdw/ring-bell-function)
184 189
185 190
@@ -206,6 +211,7 @@ when it errors.
206 '((width . 80) 211 '((width . 80)
207 (height . 2) 212 (height . 2)
208 (vertical-scrollbars . nil))) 213 (vertical-scrollbars . nil)))
214
209 (set-window-scroll-bars (minibuffer-window) nil nil) 215 (set-window-scroll-bars (minibuffer-window) nil nil)
210 216
2112. Keep the cursor from going into the prompt 2172. Keep the cursor from going into the prompt
@@ -247,6 +253,7 @@ when it errors.
247 '((up . right) 253 '((up . right)
248 (down . right) 254 (down . right)
249 (t . nil))) 255 (t . nil)))
256
250 (cuss indicate-empty-lines t) 257 (cuss indicate-empty-lines t)
251 258
252 259
@@ -411,6 +418,7 @@ from [link0ff](https://github.com/link0ff/emacs-init).
411 :height 100) 418 :height 100)
412 ("Consolas" 419 ("Consolas"
413 :height 100))) 420 :height 100)))
421
414 (set-face-from-alternatives 'fixed-pitch 422 (set-face-from-alternatives 'fixed-pitch
415 '(("Libertinus Mono" 423 '(("Libertinus Mono"
416 :height 110) 424 :height 110)
@@ -420,6 +428,7 @@ from [link0ff](https://github.com/link0ff/emacs-init).
420 :height 100) 428 :height 100)
421 ("Consolas" 429 ("Consolas"
422 :height 100))) 430 :height 100)))
431
423 (set-face-from-alternatives 'variable-pitch 432 (set-face-from-alternatives 'variable-pitch
424 '(("Libertinus Serif" 433 '(("Libertinus Serif"
425 :height 120) 434 :height 120)
@@ -427,6 +436,7 @@ from [link0ff](https://github.com/link0ff/emacs-init).
427 :height 120) 436 :height 120)
428 ("Georgia" 437 ("Georgia"
429 :height 110))) 438 :height 110)))
439
430 (remove-function after-focus-change-function #'acdw/setup-fonts))) 440 (remove-function after-focus-change-function #'acdw/setup-fonts)))
431 441
432 (add-function :before after-focus-change-function #'acdw/setup-fonts) 442 (add-function :before after-focus-change-function #'acdw/setup-fonts)
@@ -454,6 +464,7 @@ from [link0ff](https://github.com/link0ff/emacs-init).
454 (straight-use-package 'async) 464 (straight-use-package 'async)
455 (autoload 'dired-async-mode "dired-async.el" nil t) 465 (autoload 'dired-async-mode "dired-async.el" nil t)
456 (dired-async-mode +1) 466 (dired-async-mode +1)
467
457 (async-bytecomp-package-mode +1) 468 (async-bytecomp-package-mode +1)
458 469
459 470
@@ -511,6 +522,7 @@ from [link0ff](https://github.com/link0ff/emacs-init).
511 ("<help> a" . consult-apropos)) 522 ("<help> a" . consult-apropos))
512 :init 523 :init
513 (fset 'multi-occur #'consult-multi-occur)) 524 (fset 'multi-occur #'consult-multi-occur))
525
514 (use-package consult-selectrum 526 (use-package consult-selectrum
515 :straight (consult-selectrum 527 :straight (consult-selectrum
516 :host github 528 :host github
@@ -620,8 +632,11 @@ Also from link0ff. See the above for a link.
620 '(kill-ring 632 '(kill-ring
621 search-ring 633 search-ring
622 regexp-search-ring)) 634 regexp-search-ring))
635
623 (cuss savehist-save-minibuffer-history t) 636 (cuss savehist-save-minibuffer-history t)
637
624 (cuss history-length t) 638 (cuss history-length t)
639
625 (cuss history-delete-duplicates t) 640 (cuss history-delete-duplicates t)
626 641
627 (savehist-mode +1) 642 (savehist-mode +1)
@@ -643,6 +658,7 @@ Also from link0ff. See the above for a link.
643 658
644 (cuss recentf-max-menu-items 100) 659 (cuss recentf-max-menu-items 100)
645 (cuss recentf-max-saved-items 100) 660 (cuss recentf-max-saved-items 100)
661
646 (with-eval-after-load 'no-littering 662 (with-eval-after-load 'no-littering
647 (add-to-list 'recentf-exclude no-littering-var-directory) 663 (add-to-list 'recentf-exclude no-littering-var-directory)
648 (add-to-list 'recentf-exclude no-littering-etc-directory)) 664 (add-to-list 'recentf-exclude no-littering-etc-directory))
@@ -762,10 +778,10 @@ Also from link0ff. See the above for a link.
762from [Emacs Wiki](https://www.emacswiki.org/emacs/EndOfLineTips). 778from [Emacs Wiki](https://www.emacswiki.org/emacs/EndOfLineTips).
763 779
764 (defun ewiki/no-junk-please-were-unixish () 780 (defun ewiki/no-junk-please-were-unixish ()
765 "Convert line endings to UNIX, dammit." 781 "Convert line endings to UNIX, dammit."
766 (let ((coding-str (symbol-name buffer-file-coding-system))) 782 (let ((coding-str (symbol-name buffer-file-coding-system)))
767 (when (string-match "-\\(?:dos\\|mac\\)$" coding-str) 783 (when (string-match "-\\(?:dos\\|mac\\)$" coding-str)
768 (set-buffer-file-coding-system 'unix)))) 784 (set-buffer-file-coding-system 'unix))))
769 785
770I add it to the `find-file-hook` *and* `before-save-hook` because I don't want to ever work with anything other than UNIX line endings ever again. I just don't care. Even Microsoft Notepad can handle UNIX line endings, so I don't want to hear it. 786I add it to the `find-file-hook` *and* `before-save-hook` because I don't want to ever work with anything other than UNIX line endings ever again. I just don't care. Even Microsoft Notepad can handle UNIX line endings, so I don't want to hear it.
771 787
@@ -845,23 +861,30 @@ I add it to the `find-file-hook` *and* `before-save-hook` because I don't want t
845 :custom 861 :custom
846 (company-idle-delay 0.1) 862 (company-idle-delay 0.1)
847 (company-minimum-prefix-length 3) 863 (company-minimum-prefix-length 3)
864
848 :init 865 :init
849 (defun acdw/company-complete-common-or-cycle+1 () 866 (defun acdw/company-complete-common-or-cycle+1 ()
850 (interactive) 867 (interactive)
851 (company-complete-common-or-cycle +1)) 868 (company-complete-common-or-cycle +1))
869
852 (defun acdw/company-complete-common-or-cycle-1 () 870 (defun acdw/company-complete-common-or-cycle-1 ()
853 (interactive) 871 (interactive)
854 (company-complete-common-or-cycle -1)) 872 (company-complete-common-or-cycle -1))
873
855 :bind 874 :bind
856 (:map company-active-map 875 (:map company-active-map
857 ("C-n" . acdw/company-complete-common-or-cycle+1) 876 ("C-n" . acdw/company-complete-common-or-cycle+1)
858 ("C-p" . acdw/company-complete-common-or-cycle-1)) 877 ("C-p" . acdw/company-complete-common-or-cycle-1))
878
859 :hook 879 :hook
860 (prog-mode-hook . company-mode)) 880 (prog-mode-hook . company-mode))
881
861 (use-package company-prescient 882 (use-package company-prescient
862 :hook 883 :hook
863 (company-mode-hook . company-prescient-mode)) 884 (company-mode-hook . company-prescient-mode))
885
864 ;; this comes with company-quickhelp, so.... 886 ;; this comes with company-quickhelp, so....
887
865 (use-package company-posframe 888 (use-package company-posframe
866 :after (company) 889 :after (company)
867 :config 890 :config
@@ -962,6 +985,7 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
962### Org Agenda 985### Org Agenda
963 986
964 (cuss org-agenda-files (no-littering-expand-etc-file-name "agenda-files")) 987 (cuss org-agenda-files (no-littering-expand-etc-file-name "agenda-files"))
988
965 (if (and (stringp org-agenda-files) 989 (if (and (stringp org-agenda-files)
966 (not (file-exists-p org-agenda-files))) 990 (not (file-exists-p org-agenda-files)))
967 (with-temp-buffer (write-file org-agenda-files))) 991 (with-temp-buffer (write-file org-agenda-files)))
@@ -981,6 +1005,7 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
981### [A better return in Org mode](http://kitchingroup.cheme.cmu.edu/blog/2017/04/09/A-better-return-in-org-mode/) 1005### [A better return in Org mode](http://kitchingroup.cheme.cmu.edu/blog/2017/04/09/A-better-return-in-org-mode/)
982 1006
983 (require 'org-inlinetask) 1007 (require 'org-inlinetask)
1008
984 (defun scimax/org-return (&optional ignore) 1009 (defun scimax/org-return (&optional ignore)
985 "Add new list item, heading or table row with RET. 1010 "Add new list item, heading or table row with RET.
986 A double return on an empty element deletes it. 1011 A double return on an empty element deletes it.
@@ -989,20 +1014,25 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
989 (if ignore 1014 (if ignore
990 (org-return) 1015 (org-return)
991 (cond 1016 (cond
1017
992 ((eq 'line-break (car (org-element-context))) 1018 ((eq 'line-break (car (org-element-context)))
993 (org-return t)) 1019 (org-return t))
1020
994 ;; Open links like usual, unless point is at the end of a line. 1021 ;; Open links like usual, unless point is at the end of a line.
995 ;; and if at beginning of line, just press enter. 1022 ;; and if at beginning of line, just press enter.
996 ((or (and (eq 'link (car (org-element-context))) (not (eolp))) 1023 ((or (and (eq 'link (car (org-element-context))) (not (eolp)))
997 (bolp)) 1024 (bolp))
998 (org-return)) 1025 (org-return))
1026
999 ;; It doesn't make sense to add headings in inline tasks. Thanks Anders 1027 ;; It doesn't make sense to add headings in inline tasks. Thanks Anders
1000 ;; Johansson! 1028 ;; Johansson!
1001 ((org-inlinetask-in-task-p) 1029 ((org-inlinetask-in-task-p)
1002 (org-return)) 1030 (org-return))
1031
1003 ;; checkboxes too 1032 ;; checkboxes too
1004 ((org-at-item-checkbox-p) 1033 ((org-at-item-checkbox-p)
1005 (org-insert-todo-heading nil)) 1034 (org-insert-todo-heading nil))
1035
1006 ;; lists end with two blank lines, so we need to make sure we are also not 1036 ;; lists end with two blank lines, so we need to make sure we are also not
1007 ;; at the beginning of a line to avoid a loop where a new entry gets 1037 ;; at the beginning of a line to avoid a loop where a new entry gets
1008 ;; created with only one blank line. 1038 ;; created with only one blank line.
@@ -1012,6 +1042,7 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
1012 (beginning-of-line) 1042 (beginning-of-line)
1013 (delete-region (line-beginning-position) (line-end-position)) 1043 (delete-region (line-beginning-position) (line-end-position))
1014 (org-return))) 1044 (org-return)))
1045
1015 ;; org-heading 1046 ;; org-heading
1016 ((org-at-heading-p) 1047 ((org-at-heading-p)
1017 (if (not (string= "" (org-element-property :title (org-element-context)))) 1048 (if (not (string= "" (org-element-property :title (org-element-context))))
@@ -1021,6 +1052,7 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
1021 (beginning-of-line) 1052 (beginning-of-line)
1022 (setf (buffer-substring 1053 (setf (buffer-substring
1023 (line-beginning-position) (line-end-position)) ""))) 1054 (line-beginning-position) (line-end-position)) "")))
1055
1024 ;; tables 1056 ;; tables
1025 ((org-at-table-p) 1057 ((org-at-table-p)
1026 (if (-any? 1058 (if (-any?
@@ -1034,9 +1066,12 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
1034 (setf (buffer-substring 1066 (setf (buffer-substring
1035 (line-beginning-position) (line-end-position)) "") 1067 (line-beginning-position) (line-end-position)) "")
1036 (org-return))) 1068 (org-return)))
1069
1037 ;; fall-through case 1070 ;; fall-through case
1038 (t 1071 (t
1039 (org-return))))) 1072 (org-return)))))
1073
1074
1040 (define-key org-mode-map (kbd "RET") 1075 (define-key org-mode-map (kbd "RET")
1041 'scimax/org-return) 1076 'scimax/org-return)
1042 1077
@@ -1087,16 +1122,10 @@ from [unpackaged.el](https://github.com/alphapapa/unpackaged.el#ensure-blank-lin
1087 (when (eq major-mode 'org-mode) 1122 (when (eq major-mode 'org-mode)
1088 (let ((current-prefix-arg 4)) ; Emulate C-u 1123 (let ((current-prefix-arg 4)) ; Emulate C-u
1089 (call-interactively 'unpackaged/org-fix-blank-lines)))) 1124 (call-interactively 'unpackaged/org-fix-blank-lines))))
1125
1090 (add-hook 'before-save-hook #'cribbed/org-mode-fix-blank-lines) 1126 (add-hook 'before-save-hook #'cribbed/org-mode-fix-blank-lines)
1091 1127
1092 1128
1093### Agenda
1094
1095 (bind-key "C-a" #'org-agenda 'acdw/map)
1096 (cuss org-agenda-files
1097 '("~/todo.org"))
1098
1099
1100## Elpher 1129## Elpher
1101 1130
1102 (use-package elpher 1131 (use-package elpher
@@ -1210,10 +1239,12 @@ from [unpackaged.el](https://github.com/alphapapa/unpackaged.el#ensure-blank-lin
1210from [karthinks](https://karthinks.com/software/more-batteries-included-with-emacs/#regexp-builder--m-x-re-builder). 1239from [karthinks](https://karthinks.com/software/more-batteries-included-with-emacs/#regexp-builder--m-x-re-builder).
1211 1240
1212 (require 'browse-url) 1241 (require 'browse-url)
1242
1213 (when (executable-find "mpv") 1243 (when (executable-find "mpv")
1214 (defun browse-url-mpv (url &optional single) 1244 (defun browse-url-mpv (url &optional single)
1215 (start-process "mpv" nil (if single "mpv" "umpv") 1245 (start-process "mpv" nil (if single "mpv" "umpv")
1216 (shell-quote-wildcard-pattern url))) 1246 (shell-quote-wildcard-pattern url)))
1247
1217 (defun browse-url-at-point-mpv (&optional single) 1248 (defun browse-url-at-point-mpv (&optional single)
1218 "Open a link in mpv." 1249 "Open a link in mpv."
1219 (interactive "P") 1250 (interactive "P")
@@ -1224,6 +1255,7 @@ from [karthinks](https://karthinks.com/software/more-batteries-included-with-ema
1224 (browse-url-mpv url t)) 1255 (browse-url-mpv url t))
1225 #'browse-url-mpv))) 1256 #'browse-url-mpv)))
1226 (browse-url-at-point))) 1257 (browse-url-at-point)))
1258
1227 (cuss browse-url-browser-function 1259 (cuss browse-url-browser-function
1228 '(("https?:\\/\\/www\\.youtu\\.*be." . browse-url-mpv) 1260 '(("https?:\\/\\/www\\.youtu\\.*be." . browse-url-mpv)
1229 ("." . browse-url-generic)))) 1261 ("." . browse-url-generic))))
@@ -1300,8 +1332,8 @@ from [karthinks](https://karthinks.com/software/more-batteries-included-with-ema
1300 1332
1301 ;; early-init.el -*- lexical-binding: t; no-byte-compile: t; -*- 1333 ;; early-init.el -*- lexical-binding: t; no-byte-compile: t; -*-
1302 1334
1303 (setq load-prefer-newer t) 1335 (setq load-prefer-newer t)
1304 (setq frame-inhibit-implied-resize t) 1336 (setq frame-inhibit-implied-resize t)
1305 1337
1306 1338
1307## Ease tangling and loading of Emacs' init 1339## Ease tangling and loading of Emacs' init
@@ -1336,6 +1368,7 @@ from [karthinks](https://karthinks.com/software/more-batteries-included-with-ema
1336 1368
1337 (defun acdw/refresh-emacs-no-load () 1369 (defun acdw/refresh-emacs-no-load ()
1338 (refresh-emacs 'disable-load)) 1370 (refresh-emacs 'disable-load))
1371
1339 (add-hook 'kill-emacs-hook #'acdw/refresh-emacs-no-load) 1372 (add-hook 'kill-emacs-hook #'acdw/refresh-emacs-no-load)
1340 1373
1341 1374
@@ -1355,6 +1388,7 @@ Here’s a wrapper script that’ll start `emacs –daemon` if there isn’t one
1355## License 1388## License
1356 1389
1357Copyright © 2020 Case Duckworth <acdw@acdw.net> 1390Copyright © 2020 Case Duckworth <acdw@acdw.net>
1391
1358This work is free. You can redistribute it and/or modify it under the 1392This work is free. You can redistribute it and/or modify it under the
1359terms of the Do What the Fuck You Want To Public License, Version 2, 1393terms of the Do What the Fuck You Want To Public License, Version 2,
1360as published by Sam Hocevar. See the `LICENSE` file, tangled from the 1394as published by Sam Hocevar. See the `LICENSE` file, tangled from the
@@ -1370,6 +1404,7 @@ following source block, for details.
1370 this license document, and changing it is allowed as long as the name is changed. 1404 this license document, and changing it is allowed as long as the name is changed.
1371 1405
1372 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 1406 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
1407
1373 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 1408 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1374 1409
1375 0. You just DO WHAT THE FUCK YOU WANT TO. 1410 0. You just DO WHAT THE FUCK YOU WANT TO.
@@ -1379,5 +1414,6 @@ following source block, for details.
1379 1414
1380It's highly likely that the WTFPL is completely incompatible with the 1415It's highly likely that the WTFPL is completely incompatible with the
1381GPL, for what should be fairly obvious reasons. To that, I say: 1416GPL, for what should be fairly obvious reasons. To that, I say:
1417
1382**SUE ME, RMS!** 1418**SUE ME, RMS!**
1383 1419
diff --git a/config.org b/config.org index 5cb5ee2..27cfb10 100644 --- a/config.org +++ b/config.org
@@ -4,7 +4,7 @@
4#+EXPORT_FILE_NAME: README.md 4#+EXPORT_FILE_NAME: README.md
5#+OPTIONS: toc:nil 5#+OPTIONS: toc:nil
6#+BANKRUPTCY_COUNT: 3 6#+BANKRUPTCY_COUNT: 3
7#+Time-stamp: <2020-12-22 20:48:48 acdw> 7#+Time-stamp: <2020-12-23 20:27:53 acdw>
8 8
9Let’s configure Emacs using Org mode, they said. It’ll be fun, they said. 9Let’s configure Emacs using Org mode, they said. It’ll be fun, they said.
10 10
@@ -72,27 +72,6 @@ when it errors.
72 (acdw/bootstrap-straight)) 72 (acdw/bootstrap-straight))
73 #+end_src 73 #+end_src
74 74
75*** Use-package
76
77 #+begin_src emacs-lisp
78 (setq straight-use-package-by-default t)
79 (setq use-package-hook-name-suffix nil)
80 (straight-use-package 'use-package)
81 #+end_src
82
83*** Extra use-package keywords
84
85**** :custom-update
86
87#+begin_src emacs-lisp
88 (straight-use-package
89 '(use-package-custom-update
90 :host github
91 :repo "a13/use-package-custom-update"))
92
93 (require 'use-package-custom-update)
94#+end_src
95
96** Customize variables 75** Customize variables
97 76
98*** Put customizations in a separate file 77*** Put customizations in a separate file
@@ -554,37 +533,29 @@ Since this /comes/ with smart mode line, I’m just going to use it, instead of
554 (with-eval-after-load 'prescient 533 (with-eval-after-load 'prescient
555 (with-eval-after-load 'selectrum 534 (with-eval-after-load 'selectrum
556 (selectrum-prescient-mode +1))) 535 (selectrum-prescient-mode +1)))
557
558 (straight-use-package 'company-prescient)
559
560 (with-eval-after-load 'prescient
561 (with-eval-after-load 'company
562 (company-prescient-mode +1)))
563 #+end_src 536 #+end_src
564 537
565*** Consult 538*** Consult
566 539
567 #+begin_src emacs-lisp 540 #+begin_src emacs-lisp
568 (use-package consult 541 (straight-use-package '(consult
569 :after (selectrum) 542 :host github
570 :straight (consult 543 :repo "minad/consult"))
571 :host github 544 (require 'consult)
572 :repo "minad/consult") 545
573 :bind 546 (define-key ctl-x-map "b" #'consult-buffer)
574 (("C-x b" . consult-buffer) 547 (define-key ctl-x-map "4b" #'consult-buffer-other-window)
575 ("C-x 4 b" . consult-buffer-other-window) 548 (define-key ctl-x-map "5b" #'consult-buffer-other-frame)
576 ("C-x 5 b" . consult-buffer-other-frame) 549 (define-key goto-map "o" #'consult-outline)
577 ("M-g o" . consult-outline) 550 (define-key goto-map "l" #'consult-line)
578 ("M-g l" . consult-line) 551 (global-set-key (kbd "M-y") #'consult-yank-pop)
579 ("M-y" . consult-yank-pop) 552 (define-key help-map "a" #'consult-apropos)
580 ("<help> a" . consult-apropos)) 553
581 :init 554 (fset 'multi-occur #'consult-multi-occur)
582 (fset 'multi-occur #'consult-multi-occur)) 555
583 556 (straight-use-package '(consult-selectrum
584 (use-package consult-selectrum 557 :host github
585 :straight (consult-selectrum 558 :repo "minad/consult"))
586 :host github
587 :repo "minad/consult"))
588 #+end_src 559 #+end_src
589 560
590*** Marginalia 561*** Marginalia
@@ -596,11 +567,11 @@ Since this /comes/ with smart mode line, I’m just going to use it, instead of
596 :branch "main")) 567 :branch "main"))
597 568
598 (cuss marginalia-annotators 569 (cuss marginalia-annotators
599 (if (eq system-type 'windows-nt) 570 (if (eq system-type 'windows-nt)
600 '(marginalia-annotators-light 571 '(marginalia-annotators-light
601 marginalia-annotators-heavy) 572 marginalia-annotators-heavy)
602 '(marginalia-annotators-heavy 573 '(marginalia-annotators-heavy
603 marginalia-annotators-light))) 574 marginalia-annotators-light)))
604 575
605 (marginalia-mode +1) 576 (marginalia-mode +1)
606 #+end_src 577 #+end_src
@@ -616,16 +587,31 @@ Since this /comes/ with smart mode line, I’m just going to use it, instead of
616** Search 587** Search
617 588
618#+begin_src emacs-lisp 589#+begin_src emacs-lisp
619 (use-package ctrlf 590 (straight-use-package 'ctrlf)
620 :custom 591 (require 'ctrlf)
621 (ctrlf-show-match-count-at-eol nil) 592
622 :bind 593 (cuss ctrlf-show-match-count-at-eol nil)
623 ("C-s" . ctrlf-forward-regexp) 594
624 ("C-r" . ctrlf-backward-regexp) 595 (cuss ctrlf-mode-bindings
625 ("C-M-s" . ctrlf-forward-literal) 596 '(("C-s" . ctrlf-forward-regexp)
626 ("C-M-r" . ctrlf-backward-literal) 597 ("C-r" . ctrlf-backward-regexp)
627 :config 598 ("C-M-s" . ctrlf-forward-literal)
628 (ctrlf-mode +1)) 599 ("C-M-r" . ctrlf-backward-literal)
600 ("M-s _" . ctrlf-forward-symbol)
601 ("M-s ." . ctrlf-forward-symbol-at-point)))
602
603 (ctrlf-mode +1)
604#+end_src
605
606** Replace
607
608#+begin_src emacs-lisp
609 (straight-use-package 'anzu)
610 (global-anzu-mode +1)
611
612 (cuss anzu-replace-to-string-separator " → ")
613 (global-set-key (kbd "M-%") #'anzu-query-replace-regexp)
614 (global-set-key (kbd "M-C-%") #'anzu-query-replace)
629#+end_src 615#+end_src
630 616
631** Mouse 617** Mouse
@@ -639,7 +625,7 @@ This is not /quite/ correct yet. For example, scrolling in the margins with a t
639 [right-margin wheel-down] 625 [right-margin wheel-down]
640 [left-margin wheel-up] 626 [left-margin wheel-up]
641 [right-margin wheel-up])) 627 [right-margin wheel-up]))
642 (bind-key vec #'mwheel-scroll)) 628 (global-set-key vec #'mwheel-scroll))
643#+end_src 629#+end_src
644 630
645** Keyboard 631** Keyboard
@@ -650,7 +636,7 @@ From [[https://github.com/link0ff/emacs-init][link0ff]]. I thought they made a
650 636
651#+begin_src emacs-lisp 637#+begin_src emacs-lisp
652 (when window-system 638 (when window-system
653 (define-key global-map [escape] 'keyboard-escape-quit) 639 (global-set-key [escape] 'keyboard-escape-quit)
654 (define-key isearch-mode-map [escape] 'isearch-cancel)) 640 (define-key isearch-mode-map [escape] 'isearch-cancel))
655#+end_src 641#+end_src
656 642
@@ -682,7 +668,7 @@ Also from link0ff. See the above for a link.
682**** Switch to another window 668**** Switch to another window
683 669
684#+begin_src emacs-lisp 670#+begin_src emacs-lisp
685 (bind-key "M-o" #'other-window) 671 (global-set-key (kbd "M-o") #'other-window)
686#+end_src 672#+end_src
687 673
688* Persistence 674* Persistence
@@ -748,18 +734,21 @@ Also from link0ff. See the above for a link.
748** Undo 734** Undo
749 735
750#+begin_src emacs-lisp 736#+begin_src emacs-lisp
751 (use-package undo-fu 737 (straight-use-package 'undo-fu)
752 :bind 738 (require 'undo-fu)
753 ("C-/" . undo-fu-only-undo) 739
754 ("C-?" . undo-fu-only-redo)) 740 (global-set-key (kbd "C-/") #'undo-fu-only-undo)
741 (global-set-key (kbd "C-?") #'undo-fu-only-redo)
755 742
756 (straight-use-package 'undo-fu-session) 743 (straight-use-package 'undo-fu-session)
744 (require 'undo-fu-session)
757 745
758 (cuss undo-fu-session-incompatible-files 746 (cuss undo-fu-session-incompatible-files
759 '("/COMMIT_EDITMSG\\'" 747 '("/COMMIT_EDITMSG\\'"
760 "/git-rebase-todo\\'")) 748 "/git-rebase-todo\\'"))
761 749
762 (global-undo-fu-session-mode +1) 750 (global-undo-fu-session-mode +1)
751
763#+end_src 752#+end_src
764 753
765* Editing 754* Editing
@@ -806,20 +795,20 @@ Also from link0ff. See the above for a link.
806** Multiple cursors 795** Multiple cursors
807 796
808#+begin_src emacs-lisp 797#+begin_src emacs-lisp
809 (use-package multiple-cursors 798 (straight-use-package 'multiple-cursors)
810 :bind 799
811 ("C->" . mc/mark-next-like-this) 800 (global-set-key (kbd "C->") #'mc/mark-next-like-this)
812 ("C-<" . mc/mark-previous-like-this) 801 (global-set-key (kbd "C-<") #'mc/mark-previous-like-this)
813 ("C-c C-<" . mc/mark-all-like-this)) 802 (global-set-key (kbd "C-c C-<") #'mc/mark-all-like-this)
814#+end_src 803#+end_src
815 804
816** Expand region 805** Expand region
817 806
818#+begin_src emacs-lisp 807#+begin_src emacs-lisp
819 (use-package expand-region 808 (straight-use-package 'expand-region)
820 :bind 809
821 (("C-=" . er/expand-region) 810 (global-set-key (kbd "C-=") #'er/expand-region)
822 ("C-+" . er/contract-region))) 811 (global-set-key (kbd "C-+") #'er/contract-region)
823#+end_src 812#+end_src
824 813
825** Highlight modified regions 814** Highlight modified regions
@@ -958,38 +947,28 @@ Also from link0ff. See the above for a link.
958** Completion 947** Completion
959 948
960#+begin_src emacs-lisp 949#+begin_src emacs-lisp
961 (use-package company 950 (unless (eq system-type 'windows-nt)
962 :custom 951 (straight-use-package 'company)
963 (company-idle-delay 0.1) 952 (cuss company-idle-delay 0.1)
964 (company-minimum-prefix-length 3) 953 (cuss company-minimum-prefix-length 2)
965
966 :init
967 (defun acdw/company-complete-common-or-cycle+1 ()
968 (interactive)
969 (company-complete-common-or-cycle +1))
970
971 (defun acdw/company-complete-common-or-cycle-1 ()
972 (interactive)
973 (company-complete-common-or-cycle -1))
974 954
975 :bind 955 (add-hook 'prog-mode-hook #'company-mode)
976 (:map company-active-map
977 ("C-n" . acdw/company-complete-common-or-cycle+1)
978 ("C-p" . acdw/company-complete-common-or-cycle-1))
979 956
980 :hook 957 (straight-use-package 'company-prescient)
981 (prog-mode-hook . company-mode)) 958 (add-hook 'company-mode-hook #'company-prescient-mode)
982 959
983 (use-package company-prescient 960 (straight-use-package 'company-posframe)
984 :hook
985 (company-mode-hook . company-prescient-mode))
986 961
987 ;; this comes with company-quickhelp, so.... 962 (with-eval-after-load 'company
988 963 (company-posframe-mode +1)
989 (use-package company-posframe 964 (define-key company-active-map (kbd "C-n")
990 :after (company) 965 (lambda ()
991 :config 966 (interactive)
992 (company-posframe-mode +1)) 967 (company-complete-common-or-cycle +1)))
968 (define-key company-active-map (kbd "C-p")
969 (lambda ()
970 (interactive)
971 (company-complete-common-or-cycle -1)))))
993#+end_src 972#+end_src
994 973
995** Languages 974** Languages
@@ -997,16 +976,16 @@ Also from link0ff. See the above for a link.
997*** Lua 976*** Lua
998 977
999#+begin_src emacs-lisp 978#+begin_src emacs-lisp
1000 (use-package lua-mode 979 (straight-use-package 'lua-mode)
1001 :mode "\\.lua\\'" 980 (add-to-list 'auto-mode-alist '("\\.lua\\'" . lua-mode))
1002 :interpreter "lua") 981 (add-to-list 'interpreter-mode-alist '("lua" . lua-mode))
1003#+end_src 982#+end_src
1004 983
1005*** Fennel 984*** Fennel
1006 985
1007#+begin_src emacs-lisp 986#+begin_src emacs-lisp
1008 (use-package fennel-mode 987 (straight-use-package 'fennel-mode)
1009 :mode "\\.fnl\\'") 988 (add-to-list 'auto-mode-alist '("\\.fnl\\'" . fennel-mode))
1010#+end_src 989#+end_src
1011 990
1012*** Emacs lisp 991*** Emacs lisp
@@ -1068,16 +1047,14 @@ from [[https://stackoverflow.com/questions/23659909/reverse-evaluation-order-of-
1068 1047
1069#+begin_src emacs-lisp 1048#+begin_src emacs-lisp
1070 (straight-use-package 'typo) 1049 (straight-use-package 'typo)
1071
1072 (add-hook 'text-mode-hook #'typo-mode) 1050 (add-hook 'text-mode-hook #'typo-mode)
1073#+end_src 1051#+end_src
1074 1052
1075** Insert /kaomoji/ 1053** Insert /kaomoji/
1076 1054
1077#+begin_src emacs-lisp 1055#+begin_src emacs-lisp
1078 (use-package insert-kaomoji 1056 (straight-use-package 'insert-kaomoji)
1079 :bind 1057 (global-set-key (kbd "C-x 8 k") #'insert-kaomoji)
1080 ("C-x 8 k" . insert-kaomoji))
1081#+end_src 1058#+end_src
1082 1059
1083* Applications 1060* Applications
@@ -1085,9 +1062,9 @@ from [[https://stackoverflow.com/questions/23659909/reverse-evaluation-order-of-
1085** Magit 1062** Magit
1086 1063
1087#+begin_src emacs-lisp 1064#+begin_src emacs-lisp
1088 (use-package magit 1065 (straight-use-package 'magit)
1089 :bind 1066
1090 ("C-z g" . magit-status)) 1067 (define-key acdw/map "g" #'magit-status)
1091#+end_src 1068#+end_src
1092 1069
1093** Org mode 1070** Org mode
@@ -1100,8 +1077,8 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
1100 (with-eval-after-load 'org 1077 (with-eval-after-load 'org
1101 (require 'org-tempo) 1078 (require 'org-tempo)
1102 (require 'ox-md) 1079 (require 'ox-md)
1103 (bind-key "M-n" #'outline-next-visible-heading 'org-mode-map) 1080 (define-key org-mode-map (kbd "M-n") #'outline-next-visible-heading)
1104 (bind-key "M-p" #'outline-previous-visible-heading 'org-mode-map)) 1081 (define-key org-mode-map (kbd "M-p") #'outline-previous-visible-heading))
1105 1082
1106 (cuss org-hide-emphasis-markers t) 1083 (cuss org-hide-emphasis-markers t)
1107 (cuss org-fontify-done-headline t) 1084 (cuss org-fontify-done-headline t)
@@ -1124,9 +1101,11 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
1124 (if (and (stringp org-agenda-files) 1101 (if (and (stringp org-agenda-files)
1125 (not (file-exists-p org-agenda-files))) 1102 (not (file-exists-p org-agenda-files)))
1126 (with-temp-buffer (write-file org-agenda-files))) 1103 (with-temp-buffer (write-file org-agenda-files)))
1104
1105 (define-key acdw/map (kbd "C-a") #'org-agenda)
1127#+end_src 1106#+end_src
1128 1107
1129*** Make bullets look like bullets 1108*** COMMENT Make bullets look like bullets
1130 1109
1131#+begin_src emacs-lisp 1110#+begin_src emacs-lisp
1132 (font-lock-add-keywords 1111 (font-lock-add-keywords
@@ -1266,86 +1245,79 @@ from [[https://github.com/alphapapa/unpackaged.el#ensure-blank-lines-between-hea
1266 (add-hook 'before-save-hook #'cribbed/org-mode-fix-blank-lines) 1245 (add-hook 'before-save-hook #'cribbed/org-mode-fix-blank-lines)
1267#+end_src 1246#+end_src
1268 1247
1269
1270** Elpher 1248** Elpher
1271 1249
1272#+begin_src emacs-lisp 1250#+begin_src emacs-lisp
1273 (use-package elpher 1251 (straight-use-package '(elpher
1274 :straight (elpher 1252 :repo "git://thelambdalab.xyz/elpher.git"
1275 :repo "git://thelambdalab.xyz/elpher.git" 1253 :branch "patch_multiple_buffers"))
1276 :branch "patch_multiple_buffers") 1254
1277 1255 (cuss elpher-ipv4-always t)
1278 :custom 1256
1279 (elpher-ipv4-always t) 1257 (custom-set-faces
1280 1258 `(elpher-gemini-heading1
1281 :custom-face 1259 ((t (:inherit (modus-theme-heading1)))))
1282 (elpher-gemini-heading1 1260 `(elpher-gemini-heading2
1283 ((t (:inherit (modus-theme-heading-1))))) 1261 ((t (:inherit (modus-theme-heading2)))))
1284 (elpher-gemini-heading2 1262 `(elpher-gemini-heading3
1285 ((t (:inherit (modus-theme-heading-2))))) 1263 ((t (:inherit (modus-theme-heading3))))))
1286 (elpher-gemini-heading3 1264
1287 ((t (:inherit (modus-theme-heading-3))))) 1265 (defun elpher:eww-browse-url (original url &optional new-window)
1288 1266 "Handle gemini/gopher links with eww."
1289 :config 1267 (cond ((string-match-p "\\`\\(gemini\\|gopher\\)://" url)
1290 (defun elpher:eww-browse-url (original url &optional new-window) 1268 (require 'elpher)
1291 "Handle gemini/gopher links with eww." 1269 (elpher-go url))
1292 (cond ((string-match-p "\\`\\(gemini\\|gopher\\)://" url) 1270 (t (funcall original url new-window))))
1293 (require 'elpher) 1271
1294 (elpher-go url)) 1272 (advice-add 'eww-browse-url :around 'elpher:eww-browse-url)
1295 (t (funcall original url new-window)))) 1273
1296 (advice-add 'eww-browse-url :around 'elpher:eww-browse-url) 1274 (unless (fboundp 'elpher-bookmarks)
1297 1275 (autoload #'elpher-bookmarks "elpher" nil t))
1298 :bind (:map elpher-mode-map 1276
1299 ("n" . elpher-next-link) 1277 (define-key acdw/map "e" #'elpher-bookmarks)
1300 ("p" . elpher-prev-link) 1278
1301 ("o" . elpher-follow-current-link) 1279 (with-eval-after-load 'elpher
1302 ("G" . elpher-go-current)) 1280 (dolist (key '(("n" . elpher-next-link)
1303 1281 ("p" . elpher-prev-link)
1304 :hook 1282 ("o" . elpher-follow-current-link)
1305 (elpher-mode-hook . visual-fill-column-mode)) 1283 ("G" . elpher-go-current)))
1284 (define-key elpher-mode-map (car key) (cdr key))))
1285
1286 (add-hook 'elpher-mode-hook #'visual-fill-column-mode)
1306#+end_src 1287#+end_src
1307 1288
1308*** Gemini mode 1289*** Gemini mode
1309 1290
1310#+begin_src emacs-lisp 1291#+begin_src emacs-lisp
1311 (use-package gemini-mode 1292 (straight-use-package
1312 :straight (gemini-mode 1293 '(gemini-mode
1313 :repo "https://git.carcosa.net/jmcbray/gemini.el.git") 1294 :repo "https://git.carcosa.net/jmcbray/gemini.el.git"))
1314 1295
1315 :mode "\\.\\(gemini|gmi\\)\\'" 1296 (add-to-list 'auto-mode-alist
1316 1297 '("\\.\\(gemini\\|gmi\\)\\'" . gemini-mode))
1317 :custom-face 1298
1318 (gemini-heading-face-1 1299 (defun acdw/setup-gemini-mode ()
1319 ((t (:inherit (elpher-gemini-heading1))))) 1300 (visual-fill-column-mode +1)
1320 (gemini-heading-face2 1301 (variable-pitch-mode -1))
1321 ((t (:inherit (elpher-gemini-heading2))))) 1302
1322 (gemini-heading-face3 1303 (add-hook 'gemini-mode-hook #'acdw/setup-gemini-mode)
1323 ((t (:inherit (elpher-gemini-heading3)))))
1324
1325 :init
1326 (defun acdw/setup-gemini-mode ()
1327 (visual-fill-column-mode 1)
1328 (variable-pitch-mode -1))
1329
1330 :hook
1331 (gemini-mode-hook . acdw/setup-gemini-mode))
1332#+end_src 1304#+end_src
1333 1305
1334*** Gemini write 1306*** Gemini write
1335 1307
1336#+begin_src emacs-lisp 1308#+begin_src emacs-lisp
1337 (use-package gemini-write 1309 (straight-use-package
1338 :straight (gemini-write 1310 '(gemini-write
1339 :repo "https://alexschroeder.ch/cgit/gemini-write")) 1311 :repo "https://alexschroeder.ch/cgit/gemini-write"))
1340#+end_src 1312#+end_src
1341 1313
1342*** Ox-gemini 1314*** Ox-gemini
1343 1315
1344#+begin_src emacs-lisp 1316#+begin_src emacs-lisp
1345 (use-package ox-gemini 1317 (straight-use-package
1346 :straight (ox-gemini 1318 '(ox-gemini
1347 :repo "https://git.sr.ht/~abrahms/ox-gemini" 1319 :repo "https://git.sr.ht/~abrahms/ox-gemini"
1348 :branch "main")) 1320 :branch "main"))
1349#+end_src 1321#+end_src
1350 1322
1351** Pastebin 1323** Pastebin
@@ -1359,23 +1331,21 @@ from [[https://github.com/alphapapa/unpackaged.el#ensure-blank-lines-between-hea
1359** RSS 1331** RSS
1360 1332
1361#+begin_src emacs-lisp 1333#+begin_src emacs-lisp
1362 (use-package newsticker 1334 (cuss newsticker-url-list
1363 :custom 1335 ;; LABEL URL [START-TIME] [INERVAL] [WGET-ARGUMENTS]
1364 (newsticker-url-list 1336 '(("wsinatra" "http://lambdacreate.com/static/feed.rss")
1365 ;; LABEL URL [START-TIME] [INERVAL] [WGET-ARGUMENTS] 1337 ("elioat" "https://eli.li/feed.rss")
1366 '(("wsinatra" "http://lambdacreate.com/static/feed.rss") 1338 ("ACDW" "https://www.acdw.net/atom.xml")
1367 ("elioat" "https://eli.li/feed.rss") 1339 ("june" "https://text.causal.agency/feed.atom")
1368 ("ACDW" "https://www.acdw.net/atom.xml") 1340 ("kylie - notes" "https://www.somas.is/notes.atom")
1369 ("june" "https://text.causal.agency/feed.atom") 1341 ("kylie - rhizome" "https://www.somas.is/rhizome.atom")
1370 ("kylie - notes" "https://www.somas.is/notes.atom") 1342 ("brennan" "https://p1k3.com/all.xml")
1371 ("kylie - rhizome" "https://www.somas.is/rhizome.atom") 1343 ("Planet Emacs" "https://planet.emacslife.com/atom.xml")
1372 ("brennan" "https://p1k3.com/all.xml") 1344 ("nullprogram, Chris Wellons" "https://nullprogram.com/feed/")
1373 ("Planet Emacs" "https://planet.emacslife.com/atom.xml") 1345 ("Malleable Systems" "https://malleable.systems/blog/index.xml"))
1374 ("nullprogram, Chris Wellons" "https://nullprogram.com/feed/") 1346 )
1375 ("Malleable Systems" "https://malleable.systems/blog/index.xml")) 1347
1376 ) 1348 (add-hook 'newsticker-treeview-item-mode-hook #'visual-fill-column-mode)
1377 :hook
1378 (newsticker-treeview-item-mode-hook . visual-fill-column-mode))
1379#+end_src 1349#+end_src
1380 1350
1381** Web browsing 1351** Web browsing
@@ -1411,18 +1381,19 @@ from [[https://karthinks.com/software/more-batteries-included-with-emacs/#regexp
1411** Reading e-books 1381** Reading e-books
1412 1382
1413#+begin_src emacs-lisp 1383#+begin_src emacs-lisp
1414 (use-package nov 1384 (straight-use-package 'nov)
1415 :mode ("\\.epub\\'" . nov-mode) 1385
1416 :init 1386 (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
1417 (defun acdw/setup-nov-mode () 1387
1418 (visual-line-mode +1) 1388 (defun acdw/setup-nov-mode ()
1419 (visual-fill-column-mode +1) 1389 (visual-line-mode +1)
1420 (variable-pitch-mode +1) 1390 (visual-fill-column-mode +1)
1421 (setq cursor-type nil)) 1391 (variable-pitch-mode +1)
1422 :config 1392 (setq cursor-type nil))
1423 (cuss nov-text-width t) 1393
1424 :hook 1394 (cuss nov-text-width t)
1425 (nov-mode-hook . acdw/setup-nov-mode)) 1395
1396 (add-hook 'nov-mode-hook #'acdw/setup-nov-mode)
1426#+end_src 1397#+end_src
1427 1398
1428** Eshell 1399** Eshell