summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
authorCase Duckworth2023-05-05 09:58:21 -0500
committerCase Duckworth2023-05-05 09:58:21 -0500
commit989171268461a0069ecd53a49e6098ce08638102 (patch)
treeb88889d371152458f674c0a608222bf1192f3980 /init.el
parentremove bad fiels (diff)
downloademacs-989171268461a0069ecd53a49e6098ce08638102.tar.gz
emacs-989171268461a0069ecd53a49e6098ce08638102.zip
changes use-package
Diffstat (limited to 'init.el')
-rw-r--r--init.el617
1 files changed, 302 insertions, 315 deletions
diff --git a/init.el b/init.el index d6363ea..707125e 100644 --- a/init.el +++ b/init.el
@@ -21,52 +21,52 @@
21 21
22(use-package emacs ; Misc. config 22(use-package emacs ; Misc. config
23 :config 23 :config
24 (setopt recenter-positions '(top middle bottom) 24 (setq recenter-positions '(top middle bottom)
25 initial-major-mode 'lisp-interaction-mode 25 initial-major-mode 'lisp-interaction-mode
26 initial-scratch-message ";; Emacs!\n\n" 26 initial-scratch-message ";; Emacs!\n\n"
27 ;; (format "%s\n\n" 27 ;; (format "%s\n\n"
28 ;; (mapconcat (lambda (s) (format ";; %s" s)) 28 ;; (mapconcat (lambda (s) (format ";; %s" s))
29 ;; (process-lines "fortune" "-s") 29 ;; (process-lines "fortune" "-s")
30 ;; "\n")) 30 ;; "\n"))
31 eval-expression-print-level nil 31 eval-expression-print-level nil
32 eval-expression-print-length nil 32 eval-expression-print-length nil
33 x-select-enable-clipboard-manager nil) 33 x-select-enable-clipboard-manager nil)
34 ;; TODO: move this ... elsewhere 34 ;; TODO: move this ... elsewhere
35 (setopt mode-line-format 35 (setq mode-line-format
36 '("%e" 36 '("%e"
37 mode-line-front-space 37 mode-line-front-space
38 ;; (:propertize ("" mode-line-mule-info 38 ;; (:propertize ("" mode-line-mule-info
39 ;; mode-line-client 39 ;; mode-line-client
40 ;; mode-line-modified 40 ;; mode-line-modified
41 ;; mode-line-remote) 41 ;; mode-line-remote)
42 ;; display (min-width (5.0))) 42 ;; display (min-width (5.0)))
43 ("" mode-line-mule-info 43 ("" mode-line-mule-info
44 mode-line-client 44 mode-line-client
45 mode-line-modified 45 mode-line-modified
46 mode-line-remote) 46 mode-line-remote)
47 mode-line-frame-identification 47 mode-line-frame-identification
48 mode-line-buffer-identification 48 mode-line-buffer-identification
49 " " 49 " "
50 mode-line-position 50 mode-line-position
51 (vc-mode vc-mode) 51 (vc-mode vc-mode)
52 " " 52 " "
53 minions-mode-line-modes 53 minions-mode-line-modes
54 mode-line-misc-info 54 mode-line-misc-info
55 mode-line-end-spaces)) 55 mode-line-end-spaces))
56 (keymap-global-unset "C-\\") 56 (keymap-global-unset "C-\\")
57 (keymap-global-unset "<f2>") 57 (keymap-global-unset "<f2>")
58 (setf (alist-get "\\*Compile-Log\\*" display-buffer-alist nil nil #'equal) 58 (setf (alist-get "\\*Compile-Log\\*" display-buffer-alist nil nil #'equal)
59 '(display-buffer-no-window)) 59 '(display-buffer-no-window))
60 (add-hook 'after-init-hook 60 ;; (add-hook 'after-init-hook
61 (defun global-mode-string@setup () 61 ;; (defun global-mode-string@setup ()
62 (defvar jabber-activity-mode-string) 62 ;; (defvar jabber-activity-mode-string)
63 (defvar org-mode-line-string) 63 ;; (defvar org-mode-line-string)
64 (defvar display-time-mode) 64 ;; (defvar display-time-mode)
65 (defvar display-time-string) 65 ;; (defvar display-time-string)
66 (setf global-mode-string 66 ;; (setf global-mode-string
67 '((t jabber-activity-mode-string) 67 ;; '((t jabber-activity-mode-string)
68 org-mode-line-string 68 ;; org-mode-line-string
69 (display-time-mode display-time-string))))) 69 ;; (display-time-mode display-time-string)))))
70 (keymap-global-set "C-c t" 70 (keymap-global-set "C-c t"
71 (define-keymap 71 (define-keymap
72 :prefix 'toggle-map 72 :prefix 'toggle-map
@@ -87,23 +87,22 @@
87 "Recursive Mono Casual Static" 87 "Recursive Mono Casual Static"
88 "Comic Code" 88 "Comic Code"
89 "DejaVu Sans Mono") 89 "DejaVu Sans Mono")
90 :height 100))) 90 :height 110)))
91 (face-spec-set 'fixed-pitch 91 (face-spec-set 'fixed-pitch
92 `((t :family ,(find-font 92 `((t :family ,(find-font
93 "Recursive Mono Casual Static" 93 "Recursive Mono Linear Static"
94 "Comic Code" 94 "Comic Code"
95 "DejaVu Sans Mono") 95 "DejaVu Sans Mono")
96 :height 1.0))) 96 :height 1.0)))
97 (face-spec-set 'variable-pitch 97 (face-spec-set 'variable-pitch
98 `((t :family ,(find-font 98 `((t :family ,(find-font
99 "Recursive Sans Linear Static" 99 "Recursive Sans Casual Static"
100 "Atkinson Hyperlegible" 100 "Atkinson Hyperlegible"
101 "DejaVu Serif") 101 "DejaVu Serif")
102 :height 1.0))) 102 :height 1.0)))
103 (face-spec-set 'font-lock-comment-face 103 (face-spec-set 'font-lock-comment-face
104 `((t :inherit variable-pitch))) 104 `((t :slant italic
105 (face-spec-set 'font-lock-string-face 105 :inherit variable-pitch)))
106 `((t :inherit variable-pitch)))
107 ;; Emojis 106 ;; Emojis
108 (cl-loop with ffl = (font-family-list) 107 (cl-loop with ffl = (font-family-list)
109 for font in '("Noto Emoji" "Noto Color Emoji" 108 for font in '("Noto Emoji" "Noto Color Emoji"
@@ -147,8 +146,11 @@
147 146
148(use-package prog-mode 147(use-package prog-mode
149 :config 148 :config
150 (setopt tab-width 8 149 ;;; TABS
151 sh-indentation tab-width) 150 (setq tab-width 8
151 sh-indentation tab-width
152 )
153 ;;; Hooks
152 (add-hook 'prog-mode-hook #'auto-fill-mode) 154 (add-hook 'prog-mode-hook #'auto-fill-mode)
153 (add-hook 'prog-mode-hook 155 (add-hook 'prog-mode-hook
154 (defun prog@indent-tabs-maybe () 156 (defun prog@indent-tabs-maybe ()
@@ -158,11 +160,12 @@
158 'scheme-mode 160 'scheme-mode
159 'python-mode 161 'python-mode
160 'haskell-mode) 162 'haskell-mode)
161 -1 1))))) 163 -1 1))))
164 (global-prettify-symbols-mode))
162 165
163(use-package auth-source 166(use-package auth-source
164 :config 167 :config
165 (setopt auth-sources '(default "secrets:passwords")) 168 (setq auth-sources '(default "secrets:passwords"))
166 (add-hook 'auth-info-hook #'truncate-lines-local-mode)) 169 (add-hook 'auth-info-hook #'truncate-lines-local-mode))
167 170
168(use-package fringe 171(use-package fringe
@@ -171,7 +174,7 @@
171 174
172(use-package ispell 175(use-package ispell
173 :config 176 :config
174 (setopt ispell-program-name (choose-executable "aspell" "ispell")) 177 (setq ispell-program-name (choose-executable "aspell" "ispell"))
175 ;; (add-hook 'before-save-hook 178 ;; (add-hook 'before-save-hook
176 ;; #'+ispell-move-buffer-words-to-dir-locals-hook) 179 ;; #'+ispell-move-buffer-words-to-dir-locals-hook)
177 (put 'ispell-buffer-session-localwords 'safe-local-variable 180 (put 'ispell-buffer-session-localwords 'safe-local-variable
@@ -185,23 +188,23 @@
185 ("<backspace>" . dired-up-directory)) 188 ("<backspace>" . dired-up-directory))
186 :config 189 :config
187 (require 'dired-x) 190 (require 'dired-x)
188 (setopt dired-recursive-copies 'always 191 (setq dired-recursive-copies 'always
189 dired-recursive-deletes 'always 192 dired-recursive-deletes 'always
190 dired-create-destination-dirs 'always 193 dired-create-destination-dirs 'always
191 dired-do-revert-buffer t 194 dired-do-revert-buffer t
192 dired-hide-details-hide-symlink-targets nil 195 dired-hide-details-hide-symlink-targets nil
193 dired-isearch-filenames 'dwim 196 dired-isearch-filenames 'dwim
194 delete-by-moving-to-trash t 197 delete-by-moving-to-trash t
195 dired-auto-revert-buffer t 198 dired-auto-revert-buffer t
196 dired-listing-switches "-AlFhv --group-directories-first" 199 dired-listing-switches "-AlFhv --group-directories-first"
197 ls-lisp-dirs-first t 200 ls-lisp-dirs-first t
198 dired-ls-F-marks-symlinks t 201 dired-ls-F-marks-symlinks t
199 dired-clean-confirm-killing-deleted-buffers nil 202 dired-clean-confirm-killing-deleted-buffers nil
200 dired-no-confirm '(byte-compile 203 dired-no-confirm '(byte-compile
201 load chgrp chmod chown 204 load chgrp chmod chown
202 copy move hardlink symlink 205 copy move hardlink symlink
203 shell touch) 206 shell touch)
204 dired-dwim-target t) 207 dired-dwim-target t)
205 (add-hook 'dired-mode-hook #'dired-hide-details-mode) 208 (add-hook 'dired-mode-hook #'dired-hide-details-mode)
206 (add-hook 'dired-mode-hook #'hl-line-mode) 209 (add-hook 'dired-mode-hook #'hl-line-mode)
207 (add-hook 'dired-mode-hook #'truncate-lines-local-mode)) 210 (add-hook 'dired-mode-hook #'truncate-lines-local-mode))
@@ -226,43 +229,68 @@
226 229
227(use-package mouse 230(use-package mouse
228 :config 231 :config
229 (setopt context-menu-functions '(context-menu-undo 232 (setq context-menu-functions '(context-menu-undo
230 context-menu-region 233 context-menu-region
231 context-menu-middle-separator 234 context-menu-middle-separator
232 context-menu-local 235 context-menu-local
233 context-menu-minor)) 236 context-menu-minor))
234 (context-menu-mode)) 237 (context-menu-mode))
235 238
236(use-package password-cache 239(use-package password-cache
237 :config 240 :config
238 (setopt password-cache t 241 (setq password-cache t
239 password-cache-expiry 3600)) 242 password-cache-expiry 3600))
240 243
241(use-package time 244(use-package time
242 :config 245 :config
243 (setopt display-time-format " %H:%M" 246 (setq display-time-format " %H:%M"
244 display-time-interval 60 247 display-time-interval 60
245 display-time-use-mail-icon t 248 display-time-use-mail-icon t
246 display-time-mail-function 249 display-time-mail-function
247 (defun +notmuch-new-mail-p () 250 (defun +notmuch-new-mail-p ()
248 (plist-get (cl-find "inbox+unread" 251 (plist-get (cl-find "inbox+unread"
249 (ignore-errors 252 (ignore-errors
250 (notmuch-hello-query-counts notmuch-saved-searches)) 253 (notmuch-hello-query-counts notmuch-saved-searches))
251 :key (lambda (l) (plist-get l :name)) 254 :key (lambda (l) (plist-get l :name))
252 :test #'equal) 255 :test #'equal)
253 :count)) 256 :count))
254 display-time-default-load-average nil) 257 display-time-default-load-average nil)
255 (with-eval-after-load 'notmuch 258 (with-eval-after-load 'notmuch
256 (add-hook 'notmuch-after-tag-hook #'display-time-update)) 259 (add-hook 'notmuch-after-tag-hook #'display-time-update))
257 (display-time-mode)) 260 ;; (display-time-mode)
261 )
258 262
259(use-package tab-bar 263(use-package tab-bar
260 :config 264 :config
261 (setopt tab-bar-show t 265 (setq tab-bar-show t
262 tab-bar-close-button-show t) 266 tab-bar-close-button-show t)
263 ;; (add-to-list 'tab-bar-format 'tab-bar-format-menu-bar) 267 (setopt tab-bar-format
264 (add-to-list 'tab-bar-format 'tab-bar-format-align-right :append) 268 `(tab-bar-format-history
265 (add-to-list 'tab-bar-format 'tab-bar-format-global :append) 269 tab-bar-format-tabs
270 tab-bar-separator
271 tab-bar-format-add-tab
272 tab-bar-format-align-right
273 ,(defun tab-bar-extra-info ()
274 `((global menu-item
275 ,(format-mode-line
276 '((jabber-activity-mode jabber-activity-mode-string)
277 (:eval (when (and (fboundp 'org-clocking-p)
278 (org-clocking-p))
279 (format " %s"
280 (truncate-string-to-width
281 org-mode-line-string
282 16
283 nil
284 nil
285 (truncate-string-ellipsis)))))
286 (:eval (tmr-mode-line))
287 (display-time-mode
288 (:eval (format " %s" (string-trim display-time-string))))
289 ("" " ")))
290 ignore))))
291 mode-line-misc-info (cl-delete-if (lambda (x)
292 (eq (car x) 'global-mode-string))
293 mode-line-misc-info))
266 (if (daemonp) 294 (if (daemonp)
267 (add-hook 'server-after-make-frame-hook 295 (add-hook 'server-after-make-frame-hook
268 (defun after-frame@tab-bar () 296 (defun after-frame@tab-bar ()
@@ -306,7 +334,7 @@
306 334
307(use-package eldoc 335(use-package eldoc
308 :config 336 :config
309 (setopt eldoc-documentation-strategy #'eldoc-documentation-compose-eagerly) 337 (setq eldoc-documentation-strategy #'eldoc-documentation-compose-eagerly)
310 (setf (alist-get "^\\*eldoc for" display-buffer-alist nil nil #'equal) 338 (setf (alist-get "^\\*eldoc for" display-buffer-alist nil nil #'equal)
311 '(display-buffer-at-bottom 339 '(display-buffer-at-bottom
312 (window-height . 4))) 340 (window-height . 4)))
@@ -314,15 +342,15 @@
314 342
315(use-package pulse 343(use-package pulse
316 :config 344 :config
317 (setopt pulse-flag nil 345 (setq pulse-flag nil
318 pulse-delay 1 346 pulse-delay 1
319 pulse-iterations 1)) 347 pulse-iterations 1))
320 348
321(use-package flyspell 349(use-package flyspell
322 :hook (org-mode-hook)) 350 :hook (org-mode-hook))
323 351
324(use-package display-fill-column-indicator 352;; (use-package display-fill-column-indicator
325 :hook (prog-mode-hook)) 353;; :hook (prog-mode-hook))
326 354
327(use-package package 355(use-package package
328 :config 356 :config
@@ -382,6 +410,23 @@ See `inferior-emacs-lisp-mode' for details."
382 (add-hook 'ielm-mode-hook #'+ielm-init-history) 410 (add-hook 'ielm-mode-hook #'+ielm-init-history)
383 (advice-add 'ielm-send-input :after #'+ielm-write-history)) 411 (advice-add 'ielm-send-input :after #'+ielm-write-history))
384 412
413(use-package elec-pair
414 :config
415 (setopt electric-pair-skip-whitespace 'chomp)
416 (electric-pair-mode))
417
418(use-package bookmark
419 :config
420 (setopt bookmark-save-flag 1))
421
422(use-package sh-script
423 :config
424 (sh-electric-here-document-mode -1))
425
426(use-package cc-mode
427 :config
428 (setopt c-basic-offset 8))
429
385 430
386;;; Applications 431;;; Applications
387 432
@@ -413,7 +458,7 @@ See `inferior-emacs-lisp-mode' for details."
413(use-package +scratch 458(use-package +scratch
414 :load-path "lisp/" 459 :load-path "lisp/"
415 :config 460 :config
416 (setopt +scratch-save-dir (sync/ "emacs/scratch.d/" t)) 461 (setq +scratch-save-dir (sync/ "emacs/scratch.d/" t))
417 (add-hook 'kill-buffer-query-functions #'+scratch@immortal) 462 (add-hook 'kill-buffer-query-functions #'+scratch@immortal)
418 (add-hook 'kill-emacs-hook #'+scratch-save-on-exit) 463 (add-hook 'kill-emacs-hook #'+scratch-save-on-exit)
419 (with-current-buffer (get-scratch-buffer-create) 464 (with-current-buffer (get-scratch-buffer-create)
@@ -424,21 +469,14 @@ See `inferior-emacs-lisp-mode' for details."
424 (run-at-time t (* 60 60 24) #'+scratch-clean)) 469 (run-at-time t (* 60 60 24) #'+scratch-clean))
425 470
426(use-package pulse-location 471(use-package pulse-location
427 :load-path "~/src/emacs/pulse-location/" 472 :load-path "~/src/pulse-location.el/"
428 :config 473 :config
429 (pulse-location-mode)) 474 (pulse-location-mode))
430 475
431(use-package dawn 476(use-package emacs ; `modus-themes' isn't a package ...
432 :load-path "~/src/emacs/dawn/"
433 :after custom-allowed
434 :config 477 :config
435 (add-hook 'custom-allowed-after-load-hook
436 (defun dawn-modus ()
437 (dawn-schedule-themes 'modus-operandi
438 'modus-vivendi)))
439 (setopt modus-themes-mixed-fonts t) 478 (setopt modus-themes-mixed-fonts t)
440 (load-theme 'modus-vivendi t) 479 (add-hook 'modus-themes-after-load-theme-hook
441 (add-hook 'dawn-after-load-theme-hook
442 (defun +reset-faces () 480 (defun +reset-faces ()
443 (dolist (face '(font-lock-regexp-face 481 (dolist (face '(font-lock-regexp-face
444 font-lock-variable-name-face 482 font-lock-variable-name-face
@@ -469,23 +507,28 @@ See `inferior-emacs-lisp-mode' for details."
469 :weight bold))) 507 :weight bold)))
470 (face-spec-set 'font-lock-doc-face 508 (face-spec-set 'font-lock-doc-face
471 '((t :slant italic))))) 509 '((t :slant italic)))))
472 (+reset-faces)) 510 (add-hook 'after-init-hook
511 (defun modus@load ()
512 (+reset-faces)
513 (pcase (string-trim (shell-command-to-string "darkman get"))
514 ("light" (load-theme 'modus-operandi t))
515 ("dark" (load-theme 'modus-vivendi t))))))
473 516
474(use-package electric-cursor 517(use-package electric-cursor
475 :load-path "~/src/emacs/electric-cursor/" 518 :load-path "~/src/electric-cursor.el/"
476 :config 519 :config
477 (setopt electric-cursor-alist '((overwrite-mode . box) 520 (setq electric-cursor-alist '((overwrite-mode . box)
478 (t . bar))) 521 (t . bar)))
479 (electric-cursor-mode)) 522 (electric-cursor-mode))
480 523
481(use-package mode-line-bell 524(use-package mode-line-bell
482 :load-path "~/src/emacs/mode-line-bell/" 525 :load-path "~/src/mode-line-bell.el/"
483 :config 526 :config
484 (setopt mode-line-bell-flash-time 0.25) 527 (setq mode-line-bell-flash-time 0.25)
485 (mode-line-bell-mode)) 528 (mode-line-bell-mode))
486 529
487(use-package titlecase 530(use-package titlecase
488 :load-path "~/src/emacs/titlecase.el/" 531 :load-path "~/src/titlecase.el/"
489 :preface 532 :preface
490 (defun +titlecase-sentence-style-dwim (&optional arg) 533 (defun +titlecase-sentence-style-dwim (&optional arg)
491 "Titlecase a sentence. 534 "Titlecase a sentence.
@@ -515,7 +558,7 @@ With prefix ARG, toggle the value of
515 (keymap-set scule-map "M-t" #'titlecase-dwim))) 558 (keymap-set scule-map "M-t" #'titlecase-dwim)))
516 559
517(use-package scule 560(use-package scule
518 :load-path "~/src/emacs/scule/" 561 :load-path "~/src/scule.el/"
519 :bind-keymap ("M-c" . scule-map) 562 :bind-keymap ("M-c" . scule-map)
520 :init 563 :init
521 ;; Use M-u for prefix keys 564 ;; Use M-u for prefix keys
@@ -523,23 +566,23 @@ With prefix ARG, toggle the value of
523 (keymap-set universal-argument-map "M-u" #'universal-argument-more)) 566 (keymap-set universal-argument-map "M-u" #'universal-argument-more))
524 567
525(use-package filldent 568(use-package filldent
526 :load-path "~/src/emacs/filldent/" 569 :load-path "~/src/filldent.el/"
527 :bind ("M-q" . filldent-dwim) 570 :bind ("M-q" . filldent-dwim)
528 :config 571 :config
529 (setopt filldent-fill-modes '(web-mode))) 572 (setq filldent-fill-modes '(web-mode)))
530 573
531(use-package frowny 574(use-package frowny
532 :load-path "~/src/emacs/frowny/" 575 :load-path "~/src/frowny.el/"
533 :config 576 :config
534 (global-frowny-mode)) 577 (global-frowny-mode))
535 578
536(use-package keepassxc-shim 579(use-package keepassxc-shim
537 :load-path "~/src/emacs/keepassxc-shim/" 580 :load-path "~/src/keepassxc-shim.el/"
538 :config 581 :config
539 (keepassxc-shim-activate)) 582 (keepassxc-shim-activate))
540 583
541(use-package hippie-completing-read 584(use-package hippie-completing-read
542 :load-path "~/src/emacs/hippie-completing-read/" 585 :load-path "~/src/hippie-completing-read.el/"
543 :bind (("M-/" . hippie-completing-read))) 586 :bind (("M-/" . hippie-completing-read)))
544 587
545 588
@@ -549,7 +592,7 @@ With prefix ARG, toggle the value of
549 :ensure t 592 :ensure t
550 :config 593 :config
551 ;; https://github.com/jwiegley/emacs-async/issues/64 594 ;; https://github.com/jwiegley/emacs-async/issues/64
552 ;; (setopt message-send-mail-function #'async-smtpmail-send-it) 595 ;; (setq message-send-mail-function #'async-smtpmail-send-it)
553 (dired-async-mode) 596 (dired-async-mode)
554 (async-bytecomp-package-mode)) 597 (async-bytecomp-package-mode))
555 598
@@ -560,11 +603,11 @@ With prefix ARG, toggle the value of
560 :ensure t 603 :ensure t
561 :hook (prog-mode-hook)) 604 :hook (prog-mode-hook))
562 605
563(use-package clean-kill-ring 606;; (use-package clean-kill-ring
564 :vc (:url "https://github.com/NicholasBHubbard/clean-kill-ring.el") 607;; :vc (:url "https://github.com/NicholasBHubbard/clean-kill-ring.el")
565 :config 608;; :config
566 (setopt clean-kill-ring-prevent-duplicates t) 609;; (setq clean-kill-ring-prevent-duplicates t)
567 (clean-kill-ring-mode)) 610;; (clean-kill-ring-mode))
568 611
569(use-package minions 612(use-package minions
570 :ensure t 613 :ensure t
@@ -641,7 +684,7 @@ The prefix argument is as in `visual-fill-column-widen' but negated."
641(use-package wgrep 684(use-package wgrep
642 :ensure t 685 :ensure t
643 :config 686 :config
644 (setopt wgrep-enable-key (kbd "C-x C-q")) 687 (setq wgrep-enable-key (kbd "C-x C-q"))
645 :bind (:map grep-mode-map 688 :bind (:map grep-mode-map
646 ("C-x C-q" . wgrep-change-to-wgrep-mode))) 689 ("C-x C-q" . wgrep-change-to-wgrep-mode)))
647 690
@@ -651,8 +694,8 @@ The prefix argument is as in `visual-fill-column-widen' but negated."
651 :map isearch-mode-map 694 :map isearch-mode-map
652 ("M-j" . avy-isearch)) 695 ("M-j" . avy-isearch))
653 :config 696 :config
654 (setopt avy-background t 697 (setq avy-background t
655 avy-keys (string-to-list "asdfghjklqwertyuiopzxcvbnm"))) 698 avy-keys (string-to-list "asdfghjklqwertyuiopzxcvbnm")))
656 699
657(use-package zzz-to-char 700(use-package zzz-to-char
658 :ensure t 701 :ensure t
@@ -666,11 +709,11 @@ The prefix argument is as in `visual-fill-column-widen' but negated."
666(use-package isearch-mb 709(use-package isearch-mb
667 :ensure t 710 :ensure t
668 :config 711 :config
669 (setopt isearch-lazy-count t 712 (setq isearch-lazy-count t
670 isearch-regexp-lax-whitespace t 713 isearch-regexp-lax-whitespace t
671 search-whitespace-regexp "\\W+" 714 search-whitespace-regexp "\\W+"
672 search-default-mode t ; Search regexp by default 715 search-default-mode t ; Search regexp by default
673 isearch-wrap-pause 'no) 716 isearch-wrap-pause 'no)
674 (define-advice isearch-cancel (:before (&rest _) add-search-to-history) 717 (define-advice isearch-cancel (:before (&rest _) add-search-to-history)
675 "Add search string to history when canceling." 718 "Add search string to history when canceling."
676 (unless (equal "" isearch-string) 719 (unless (equal "" isearch-string)
@@ -702,46 +745,46 @@ The prefix argument is as in `visual-fill-column-widen' but negated."
702 "C-M-%" #'anzu-isearch-query-replace) 745 "C-M-%" #'anzu-isearch-query-replace)
703 (isearch-mb-mode)) 746 (isearch-mb-mode))
704 747
705(use-package paredit 748;; (use-package paredit
706 :ensure t 749;; :ensure t
707 :hook ( emacs-lisp-mode-hook ielm-mode-hook 750;; :hook ( emacs-lisp-mode-hook ielm-mode-hook
708 eval-expression-minibuffer-setup-hook 751;; eval-expression-minibuffer-setup-hook
709 lisp-interaction-mode-hook 752;; lisp-interaction-mode-hook
710 lisp-mode-hook scheme-mode-hook 753;; lisp-mode-hook scheme-mode-hook
711 fennel-mode-hook fennel-repl-mode-hook 754;; fennel-mode-hook fennel-repl-mode-hook
712 geiser-mode-hook geiser-repl-mode-hook) 755;; geiser-mode-hook geiser-repl-mode-hook)
713 :config 756;; :config
714 (keymap-set paredit-mode-map "C-j" 757;; (keymap-set paredit-mode-map "C-j"
715 (defun +paredit-newline () 758;; (defun +paredit-newline ()
716 (interactive) 759;; (interactive)
717 (call-interactively 760;; (call-interactively
718 (if (derived-mode-p 'lisp-interaction-mode) 761;; (if (derived-mode-p 'lisp-interaction-mode)
719 #'eval-print-last-sexp #'paredit-newline)))) 762;; #'eval-print-last-sexp #'paredit-newline))))
720 (keymap-unset paredit-mode-map "RET" t) 763;; (keymap-unset paredit-mode-map "RET" t)
721 (keymap-unset paredit-mode-map "M-s" t) 764;; (keymap-unset paredit-mode-map "M-s" t)
722 (keymap-unset paredit-mode-map "M-r" t) 765;; (keymap-unset paredit-mode-map "M-r" t)
723 (add-to-list 'paredit-space-for-delimiter-predicates 766;; (add-to-list 'paredit-space-for-delimiter-predicates
724 (defun paredit@dont-space-@ (endp delimiter) 767;; (defun paredit@dont-space-@ (endp delimiter)
725 "Don't add a space after @ in `paredit-mode'." 768;; "Don't add a space after @ in `paredit-mode'."
726 (let ((point (point))) 769;; (let ((point (point)))
727 (or endp 770;; (or endp
728 (seq-every-p 771;; (seq-every-p
729 (lambda (prefix) 772;; (lambda (prefix)
730 (and (> point (length prefix)) 773;; (and (> point (length prefix))
731 (let ((start (- point (length prefix))) 774;; (let ((start (- point (length prefix)))
732 (end point)) 775;; (end point))
733 (not (string= (buffer-substring start end) 776;; (not (string= (buffer-substring start end)
734 prefix))))) 777;; prefix)))))
735 ;; Add strings to this list to inhibit adding a space 778;; ;; Add strings to this list to inhibit adding a space
736 ;; after them. 779;; ;; after them.
737 '(",@"))))))) 780;; '(",@")))))))
738 781
739(use-package hungry-delete 782(use-package hungry-delete
740 :ensure t 783 :ensure t
741 :config 784 :config
742 (setopt hungry-delete-chars-to-skip " \t" 785 (setq hungry-delete-chars-to-skip " \t"
743 hungry-delete-skip-regexp (format "[%s]" hungry-delete-chars-to-skip) 786 hungry-delete-skip-regexp (format "[%s]" hungry-delete-chars-to-skip)
744 hungry-delete-join-reluctantly nil) 787 hungry-delete-join-reluctantly nil)
745 (add-to-list 'hungry-delete-except-modes 'eshell-mode) 788 (add-to-list 'hungry-delete-except-modes 'eshell-mode)
746 (add-to-list 'hungry-delete-except-modes 'nim-mode) 789 (add-to-list 'hungry-delete-except-modes 'nim-mode)
747 (add-to-list 'hungry-delete-except-modes 'python-mode) 790 (add-to-list 'hungry-delete-except-modes 'python-mode)
@@ -758,9 +801,9 @@ The prefix argument is as in `visual-fill-column-widen' but negated."
758 (interactive "*p") 801 (interactive "*p")
759 (if (looking-at hungry-delete-skip-regexp) 802 (if (looking-at hungry-delete-skip-regexp)
760 (hungry-delete-forward (or arg 1)) 803 (hungry-delete-forward (or arg 1))
761 (paredit-forward-delete arg)))) 804 (paredit-forward-delete arg)))))
762 ;; Mode 805 ;; Mode
763 (global-hungry-delete-mode))) 806 (global-hungry-delete-mode))
764 807
765(use-package macrostep 808(use-package macrostep
766 :ensure t 809 :ensure t
@@ -777,7 +820,7 @@ The prefix argument is as in `visual-fill-column-widen' but negated."
777 :ensure t 820 :ensure t
778 :when inferior-lisp-program 821 :when inferior-lisp-program
779 :preface 822 :preface
780 (setopt inferior-lisp-program (choose-executable "sbcl")) 823 (setq inferior-lisp-program (choose-executable "sbcl"))
781 (defun +sly-start-or-mrepl () 824 (defun +sly-start-or-mrepl ()
782 (interactive) 825 (interactive)
783 (if (ignore-errors (sly-connection)) 826 (if (ignore-errors (sly-connection))
@@ -787,7 +830,7 @@ The prefix argument is as in `visual-fill-column-widen' but negated."
787 :config 830 :config
788 (autoload 'sly-mrepl "sly-mrepl" nil t) 831 (autoload 'sly-mrepl "sly-mrepl" nil t)
789 (keymap-set sly-mode-map "C-c C-z" #'+sly-start-or-mrepl) 832 (keymap-set sly-mode-map "C-c C-z" #'+sly-start-or-mrepl)
790 (setopt sly-net-coding-system 'utf-8-unix) 833 (setq sly-net-coding-system 'utf-8-unix)
791 (sly-symbol-completion-mode -1)) 834 (sly-symbol-completion-mode -1))
792 835
793(use-package pdf-tools 836(use-package pdf-tools
@@ -825,9 +868,9 @@ The prefix argument is as in `visual-fill-column-widen' but negated."
825 :ensure t 868 :ensure t
826 :mode "\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" 869 :mode "\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'"
827 :config 870 :config
828 (setopt markdown-command (choose-executable 871 (setq markdown-command (choose-executable
829 '("pandoc" "--from=markdown" "--to=html5") 872 '("pandoc" "--from=markdown" "--to=html5")
830 "markdown")) 873 "markdown"))
831 (add-hook 'markdown-mode-hook #'visual-fill-column-mode)) 874 (add-hook 'markdown-mode-hook #'visual-fill-column-mode))
832 875
833(use-package pandoc-mode 876(use-package pandoc-mode
@@ -864,31 +907,44 @@ The prefix argument is as in `visual-fill-column-widen' but negated."
864 :bind (("C-c r p" . eradio-toggle|play) 907 :bind (("C-c r p" . eradio-toggle|play)
865 ("C-c r s" . eradio-stop)) 908 ("C-c r s" . eradio-stop))
866 :config 909 :config
867 (setopt eradio-player '("mpv" "--no-video" "--no-terminal") 910 (setq eradio-player '("mpv" "--no-video" "--no-terminal")
868 eradio-channels 911 eradio-channels
869 ;; At some point I should actually ... write this in to this file or 912 ;; (name . url)
870 ;; something. But until I decide to quit using radish altogether, this 913 '(("Nightwave Plaza" . "http://radio.plaza.one/ogg")
871 ;; what I got. 914 ("Radio Paradise - Main Mix" .
872 (with-current-buffer (find-file-noselect "~/etc/radish/stations") 915 "http://stream.radioparadise.com/rp_192m.ogg")
873 (let (chans) 916 ("Radio Paradise - Mellow Mix" .
874 (dolist (line (string-split (buffer-substring-no-properties 917 "http://stream.radioparadise.com/mellow-96m.ogg")
875 (point-min) (point-max)) 918 ("Radio Paradise - Rock Mix" .
876 "\n") 919 "http://stream.radioparadise.com/rock-96m.ogg")
877 chans) 920 ("Radio Paradise - Global Mix" .
878 (unless (string-match-p "^#" line) 921 "http://stream.radioparadise.com/global-96m.ogg")
879 (let* ((ll (string-split line "\t")) 922 ("KLSU" . "http://130.39.238.143:8010/stream.mp3"))
880 (url (cl-first ll)) 923 ;; At some point I should actually ... write this in to this file or
881 (name (cl-second ll)) 924 ;; something. But until I decide to quit using radish altogether, this
882 (tags (cl-third ll))) 925 ;; what I got.
883 (when (and name 926 ;; (with-current-buffer (find-file-noselect "~/etc/radish/stations")
884 (string-match-p "[^ \n\t]*://[^ \n\t]*" url)) 927 ;; (let (chans)
885 (push (cons (format "%s - %s" name tags) url) chans))))))))) 928 ;; (dolist (line (string-split (buffer-substring-no-properties
929 ;; (point-min) (point-max))
930 ;; "\n")
931 ;; chans)
932 ;; (unless (string-match-p "^#" line)
933 ;; (let* ((ll (string-split line "\t"))
934 ;; (url (cl-first ll))
935 ;; (name (cl-second ll))
936 ;; (tags (cl-third ll)))
937 ;; (when (and name
938 ;; (string-match-p "[^ \n\t]*://[^ \n\t]*" url))
939 ;; (push (cons (format "%s - %s" name tags) url)
940 ;; chans)))))))
941 ))
886 942
887(use-package wiki-abbrev 943(use-package wiki-abbrev
888 :after org ; Don't need abbrevs til I load org. 944 :after org ; Don't need abbrevs til I load org.
889 :load-path "~/src/emacs/wiki-abbrev.el/" 945 :load-path "~/src/wiki-abbrev.el/"
890 :config 946 :config
891 (setopt wiki-abbrev-file (etc/ "wiki-abbrevs")) 947 (setq wiki-abbrev-file (etc/ "wiki-abbrevs"))
892 (wiki-abbrev-insinuate)) 948 (wiki-abbrev-insinuate))
893 949
894(use-package flyspell-correct 950(use-package flyspell-correct
@@ -931,7 +987,7 @@ With PREFIX, prompt to change the current dictionary."
931 :bind (:map dired-mode-map 987 :bind (:map dired-mode-map
932 (")" . dired-git-info-mode)) 988 (")" . dired-git-info-mode))
933 :config 989 :config
934 (setopt dgi-auto-hide-details-p nil)) 990 (setq dgi-auto-hide-details-p nil))
935 991
936(use-package expand-region ; needed for embrace anyway 992(use-package expand-region ; needed for embrace anyway
937 :ensure t 993 :ensure t
@@ -963,7 +1019,7 @@ With PREFIX, prompt to change the current dictionary."
963 (keymap-set org-mode-map "=" (org-insert-or-embrace "=")) 1019 (keymap-set org-mode-map "=" (org-insert-or-embrace "="))
964 (keymap-set org-mode-map "~" (org-insert-or-embrace "~")) 1020 (keymap-set org-mode-map "~" (org-insert-or-embrace "~"))
965 (keymap-set org-mode-map "+" (org-insert-or-embrace "+"))) 1021 (keymap-set org-mode-map "+" (org-insert-or-embrace "+")))
966 :bind (("C-\"" . embrace-commander)) 1022 :bind (("C-'" . embrace-commander))
967 :hook ((org-mode-hook . embrace-org-mode-hook) 1023 :hook ((org-mode-hook . embrace-org-mode-hook)
968 (ruby-mode-hook . embrace-ruby-mode-hook) 1024 (ruby-mode-hook . embrace-ruby-mode-hook)
969 (emacs-lisp-mode-hook . embrace-emacs-lisp-mode-hook) 1025 (emacs-lisp-mode-hook . embrace-emacs-lisp-mode-hook)
@@ -972,7 +1028,7 @@ With PREFIX, prompt to change the current dictionary."
972(use-package apheleia 1028(use-package apheleia
973 :ensure t 1029 :ensure t
974 :config 1030 :config
975 (setopt apheleia-hide-log-buffers t) 1031 (setq apheleia-hide-log-buffers t)
976 (setf (alist-get 'shfmt apheleia-formatters) 1032 (setf (alist-get 'shfmt apheleia-formatters)
977 '("shfmt" "--case-indent")) 1033 '("shfmt" "--case-indent"))
978 (global-set-key (kbd "M-C-\\") 1034 (global-set-key (kbd "M-C-\\")
@@ -997,44 +1053,24 @@ With PREFIX, prompt to change the current dictionary."
997(use-package rec-mode 1053(use-package rec-mode
998 :ensure t) 1054 :ensure t)
999 1055
1000;; (use-package gauche-mode
1001;; :load-path "~/src/emacs/gauche-mode/"
1002;; :mode "\\.scm\\'"
1003;; :config
1004;; (setopt gauche-mode-info-language 'en
1005;; scheme-program-name "gosh -i"
1006;; scheme-compile-exp-command "%s")
1007;; (add-to-list 'scheme-source-modes 'gauche-mode)
1008;; (setf (alist-get "\\*scheme\\*" display-buffer-alist nil nil #'equal)
1009;; '((display-buffer-reuse-window
1010;; display-buffer-pop-up-window)
1011;; (inhibit-same-window . t)))
1012;; (add-hook 'gauche-mode-hook #'enable-gauche-paredit-mode)
1013;; (add-hook 'inferior-scheme-mode-hook #'enable-gauche-paredit-mode)
1014;; ;; Extras
1015;; (define-key gauche-mode-map (kbd "C-c C-k")
1016;; (defun +gauche-mode-send-buffer ()
1017;; (interactive)
1018;; (save-mark-and-excursion
1019;; (let ((start (point-min))
1020;; (end (point-max)))
1021;; (goto-char start)
1022;; (while (or (looking-at "#!") ; Shebang
1023;; (looking-at ":;") ; "shell trampoline"
1024;; )
1025;; (forward-line 1)
1026;; (beginning-of-line)
1027;; (setq start (point)))
1028;; (scheme-send-region-and-go start end))))))
1029 1056
1030(use-package geiser 1057(use-package geiser
1031 :ensure t 1058 :ensure t
1032 :config 1059 :config
1033 (use-package geiser-guile :ensure t) 1060 (when (executable-find "guile")
1034 (use-package geiser-chicken :ensure t) 1061 (use-package geiser-guile :ensure t))
1035 (use-package geiser-chez :ensure t) 1062 (when (executable-find "chicken")
1036 (use-package geiser-gambit :ensure t) 1063 (use-package geiser-chicken :ensure t))
1037 (use-package geiser-chibi :ensure t) 1064 (when (or (prog1 (executable-find "chez")
1065 (setopt geiser-chez-binary
1066 (executable-find "chez")))
1067 (executable-find "petite")
1068 (executable-find "scheme"))
1069 (use-package geiser-chez :ensure t))
1070 (when (executable-find "gambit")
1071 (use-package geiser-gambit :ensure t))
1072 (when (executable-find "chibi-scheme")
1073 (use-package geiser-chibi :ensure t))
1038 (use-package macrostep-geiser 1074 (use-package macrostep-geiser
1039 :ensure t 1075 :ensure t
1040 :config 1076 :config
@@ -1047,21 +1083,6 @@ With PREFIX, prompt to change the current dictionary."
1047 (keymap-unset geiser-mode-map "C-." t) 1083 (keymap-unset geiser-mode-map "C-." t)
1048 (keymap-unset scheme-mode-map "M-o" t))) 1084 (keymap-unset scheme-mode-map "M-o" t)))
1049 1085
1050(use-package treesit-auto
1051 ;; XXX: I don't really get the utility of this package, but I spent a ton of
1052 ;; time figuring out how to properly build it ... so here it is.
1053 :ensure t
1054 :when (treesit-available-p)
1055 :config
1056 ;; (setopt treesit-extra-load-path
1057 ;; ;; https://github.com/casouri/tree-sitter-module/
1058 ;; `(,(expand-file-name "~/misc/tree-sitter-module/dist/")))
1059 (setopt treesit-auto-install nil) ; javascript keeps failing
1060 (global-treesit-auto-mode))
1061
1062(use-package elpher
1063 :ensure t)
1064
1065(use-package detached 1086(use-package detached
1066 :when (executable-find "dtach") 1087 :when (executable-find "dtach")
1067 :ensure t 1088 :ensure t
@@ -1078,33 +1099,33 @@ With PREFIX, prompt to change the current dictionary."
1078(use-package lin 1099(use-package lin
1079 :ensure t 1100 :ensure t
1080 :config 1101 :config
1081 (setopt lin-face 'lin-cyan 1102 (setq lin-face 'lin-cyan
1082 lin-mode-hooks 1103 lin-mode-hooks
1083 '(dired-mode-hook 1104 '(dired-mode-hook
1084 ;; bongo-mode-hook 1105 ;; bongo-mode-hook
1085 ;; elfeed-search-mode-hook 1106 ;; elfeed-search-mode-hook
1086 git-rebase-mode-hook 1107 git-rebase-mode-hook
1087 grep-mode-hook 1108 grep-mode-hook
1088 ibuffer-mode-hook 1109 ibuffer-mode-hook
1089 ilist-mode-hook 1110 ilist-mode-hook
1090 ;; ledger-report-mode-hook 1111 ;; ledger-report-mode-hook
1091 log-view-mode-hook 1112 log-view-mode-hook
1092 magit-log-mode-hook 1113 magit-log-mode-hook
1093 ;; mu4e-headers-mode-hook 1114 ;; mu4e-headers-mode-hook
1094 notmuch-search-mode-hook 1115 notmuch-search-mode-hook
1095 notmuch-tree-mode-hook 1116 notmuch-tree-mode-hook
1096 occur-mode-hook 1117 occur-mode-hook
1097 org-agenda-mode-hook 1118 org-agenda-mode-hook
1098 pdf-outline-buffer-mode-hook 1119 pdf-outline-buffer-mode-hook
1099 proced-mode-hook 1120 proced-mode-hook
1100 tabulated-list-mode-hook)) 1121 tabulated-list-mode-hook))
1101 (lin-global-mode)) 1122 (lin-global-mode))
1102 1123
1103(use-package gcmh 1124(use-package gcmh
1104 :ensure t 1125 :ensure t
1105 :config 1126 :config
1106 (setopt gcmh-idle-delay 'auto 1127 (setq gcmh-idle-delay 'auto
1107 gcmh-verbose nil) 1128 gcmh-verbose nil)
1108 (gcmh-mode)) 1129 (gcmh-mode))
1109 1130
1110(use-package tmr 1131(use-package tmr
@@ -1116,44 +1137,10 @@ With PREFIX, prompt to change the current dictionary."
1116 tmr--timers) 1137 tmr--timers)
1117 (propertize "⏲" 'face 'font-lock-warning-face) 1138 (propertize "⏲" 'face 'font-lock-warning-face)
1118 "")) 1139 ""))
1119 (add-to-list 'global-mode-string 1140 ;; (add-to-list 'global-mode-string
1120 '("" (:eval (tmr-mode-line))) 1141 ;; '("" (:eval (tmr-mode-line)))
1121 'append)) 1142 ;; 'append)
1122 1143 )
1123;; (use-package elfeed
1124;; :ensure t
1125;; :preface
1126;; ;; https://karthinks.com/software/lazy-elfeed/
1127;; (defun elfeed-scroll-up-command (&optional arg)
1128;; "Scroll up or go to next feed item in Elfeed"
1129;; (interactive "^P")
1130;; (let ((scroll-error-top-bottom nil))
1131;; (condition-case-unless-debug nil
1132;; (scroll-up-command arg)
1133;; (error (elfeed-show-next)))))
1134;; (defun elfeed-scroll-down-command (&optional arg)
1135;; "Scroll up or go to next feed item in Elfeed"
1136;; (interactive "^P")
1137;; (let ((scroll-error-top-bottom nil))
1138;; (condition-case-unless-debug nil
1139;; (scroll-down-command arg)
1140;; (error (elfeed-show-prev)))))
1141;; :bind (("C-c f" . elfeed))
1142;; :config
1143;; (setopt elfeed-enclosure-default-dir "~/var/download/"
1144;; elfeed-db-directory (sync/ "emacs/elfeed/db" t)
1145;; elfeed-curl-max-connections 4)
1146;; (add-hook 'elfeed-search-update-hook #'truncate-lines-local-mode)
1147;; (keymap-set elfeed-show-mode-map "SPC" #'elfeed-scroll-up-command)
1148;; (keymap-set elfeed-show-mode-map "S-SPC" #'elfeed-scroll-down-command)
1149;; (keymap-set elfeed-search-mode-map "a" #'elfeed-search-untag-all-unread)
1150;; (setq elfeed-feeds nil) ; Always reload the feed list from feeds.opml
1151;; (elfeed-load-opml "~/var/feeds.opml"))
1152
1153(use-package iedit ; XXX: is this necessary?
1154 :ensure t
1155 :init
1156 (customize-set-variable 'iedit-toggle-key-default (kbd "C-'")))
1157 1144
1158(use-package dumb-jump 1145(use-package dumb-jump
1159 :ensure t 1146 :ensure t