summary refs log tree commit diff stats
path: root/config.org
diff options
context:
space:
mode:
Diffstat (limited to 'config.org')
-rw-r--r--config.org401
1 files changed, 186 insertions, 215 deletions
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