about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2020-09-22 20:20:57 -0500
committerCase Duckworth2020-09-22 20:20:57 -0500
commit798f242e4f07d652cf6689feae07bd41b83d950d (patch)
tree94ab3b458fb806f0a44aba09f3f305b5c6833503
parentFix outshine-mode hook (diff)
downloademacs-798f242e4f07d652cf6689feae07bd41b83d950d.tar.gz
emacs-798f242e4f07d652cf6689feae07bd41b83d950d.zip
Fix line endings
-rw-r--r--init.el1508
1 files changed, 754 insertions, 754 deletions
diff --git a/init.el b/init.el index 213c6bc..bafdda2 100644 --- a/init.el +++ b/init.el
@@ -1,754 +1,754 @@
1;;; init.el -*- lexical-binding: t; coding: utf-8; fill-column: 70 -*- 1;;; init.el -*- lexical-binding: t; coding: utf-8; fill-column: 70 -*-
2 2
3;;; Commentary: 3;;; Commentary:
4;; I /was/ going to convert this to org-mode, but then I found this 4;; I /was/ going to convert this to org-mode, but then I found this
5;; page: https://yiufung.net/post/pure-emacs-lisp-init-skeleton/, 5;; page: https://yiufung.net/post/pure-emacs-lisp-init-skeleton/,
6;; which pointed out that I could use `outline-mode' (or in my case, 6;; which pointed out that I could use `outline-mode' (or in my case,
7;; `outshine') to fold and navigate a pure-elisp `init.el'. So that's 7;; `outshine') to fold and navigate a pure-elisp `init.el'. So that's
8;; what I'm doing. 8;; what I'm doing.
9;;; Basic emacs config & built-in packages 9;;; Basic emacs config & built-in packages
10;;;; /Really/ basic emacs config 10;;;; /Really/ basic emacs config
11;; I /did/ use `better-defaults', but it turns out that that package 11;; I /did/ use `better-defaults', but it turns out that that package
12;; is (a) short and (b) mostly overriden by other settings. 12;; is (a) short and (b) mostly overriden by other settings.
13(use-package emacs 13(use-package emacs
14 :demand ; make sure this stuff loads 14 :demand ; make sure this stuff loads
15 :init 15 :init
16 ;; where I am 16 ;; where I am
17 (setq calendar-location-name "Baton Rouge, LA") 17 (setq calendar-location-name "Baton Rouge, LA")
18 (setq calendar-latitude 30.39) 18 (setq calendar-latitude 30.39)
19 (setq calendar-longitude -91.83) 19 (setq calendar-longitude -91.83)
20 20
21 ;; firefox is love, firefox is life 21 ;; firefox is love, firefox is life
22 (setq browse-url-browser-function 'browse-url-firefox 22 (setq browse-url-browser-function 'browse-url-firefox
23 browse-url-new-window-flag t 23 browse-url-new-window-flag t
24 browse-url-firefox-new-window-is-tab t) 24 browse-url-firefox-new-window-is-tab t)
25 25
26 ;; honestly not sure if this is necessary 26 ;; honestly not sure if this is necessary
27 (autoload 'zap-up-to-char "misc" 27 (autoload 'zap-up-to-char "misc"
28 "Kill up to, but not including, ARGth occurence of CHAR." t) 28 "Kill up to, but not including, ARGth occurence of CHAR." t)
29 29
30 ;; show parentheses 30 ;; show parentheses
31 (setq show-paren-style 'mixed) 31 (setq show-paren-style 'mixed)
32 (show-paren-mode) 32 (show-paren-mode)
33 33
34 ;; always work on visual lines 34 ;; always work on visual lines
35 (global-visual-line-mode) 35 (global-visual-line-mode)
36 36
37 ;; make the mouse avoid where I'm typing 37 ;; make the mouse avoid where I'm typing
38 (mouse-avoidance-mode 'jump) 38 (mouse-avoidance-mode 'jump)
39 39
40 ;; delete the selection when I start typing, like a normal editor 40 ;; delete the selection when I start typing, like a normal editor
41 (delete-selection-mode) 41 (delete-selection-mode)
42 42
43 ;; ignore case 43 ;; ignore case
44 (setq-default completion-ignore-case t 44 (setq-default completion-ignore-case t
45 read-buffer-completion-ignore-case t 45 read-buffer-completion-ignore-case t
46 read-file-name-completion-ignore-case t) 46 read-file-name-completion-ignore-case t)
47 47
48 ;; etc defaults 48 ;; etc defaults
49 (fset 'yes-or-no-p 'y-or-n-p) 49 (fset 'yes-or-no-p 'y-or-n-p)
50 (setq-default indent-tabs-mode nil 50 (setq-default indent-tabs-mode nil
51 save-interprogram-paste-before-kill t 51 save-interprogram-paste-before-kill t
52 apropos-do-all t 52 apropos-do-all t
53 mouse-yank-at-point t 53 mouse-yank-at-point t
54 require-final-newline t 54 require-final-newline t
55 visible-bell (not *acdw/at-larry*) 55 visible-bell (not *acdw/at-larry*)
56 ediff-window-setup-function 'ediff-setup-windows-plain 56 ediff-window-setup-function 'ediff-setup-windows-plain
57 use-dialog-box nil 57 use-dialog-box nil
58 mark-even-if-inactive nil 58 mark-even-if-inactive nil
59 sentence-end-double-space t) 59 sentence-end-double-space t)
60 60
61 ;; utf-8 is now, old man 61 ;; utf-8 is now, old man
62 (set-charset-priority 'unicode) 62 (set-charset-priority 'unicode)
63 (set-language-environment "UTF-8") 63 (set-language-environment "UTF-8")
64 (set-default-coding-systems 'utf-8) 64 (set-default-coding-systems 'utf-8)
65 (set-terminal-coding-system 'utf-8) 65 (set-terminal-coding-system 'utf-8)
66 (set-keyboard-coding-system 'utf-8) 66 (set-keyboard-coding-system 'utf-8)
67 (set-selection-coding-system 'utf-8) 67 (set-selection-coding-system 'utf-8)
68 (prefer-coding-system 'utf-8) 68 (prefer-coding-system 'utf-8)
69 (setq default-buffer-file-coding-system 'utf-8 69 (setq default-buffer-file-coding-system 'utf-8
70 default-process-coding-system '(utf-8-unix . utf-8-unix) 70 default-process-coding-system '(utf-8-unix . utf-8-unix)
71 locale-coding-system 'utf-8) 71 locale-coding-system 'utf-8)
72 72
73 ;; don't confirm killing 73 ;; don't confirm killing
74 (setq confirm-kill-processes nil 74 (setq confirm-kill-processes nil
75 confirm-kill-emacs nil) 75 confirm-kill-emacs nil)
76 76
77 ;; simplify the GUI 77 ;; simplify the GUI
78 (setq default-frame-alist '((tool-bar-lines . 0) 78 (setq default-frame-alist '((tool-bar-lines . 0)
79 (menu-bar-lines . 0) 79 (menu-bar-lines . 0)
80 (vertical-scroll-bars . nil) 80 (vertical-scroll-bars . nil)
81 (horizontal-scroll-bars . nil) 81 (horizontal-scroll-bars . nil)
82 (right-divider-width . 2) 82 (right-divider-width . 2)
83 (bottom-divider-width . 2) 83 (bottom-divider-width . 2)
84 (left-fringe-width . 2) 84 (left-fringe-width . 2)
85 (right-fringe-width . 2)) 85 (right-fringe-width . 2))
86 inhibit-startup-buffer-menu t 86 inhibit-startup-buffer-menu t
87 inhibit-startup-screen t 87 inhibit-startup-screen t
88 initial-buffer-choice t 88 initial-buffer-choice t
89 initial-scratch-message nil) 89 initial-scratch-message nil)
90 90
91 ;; When at larry, fullscreen emacs. 91 ;; When at larry, fullscreen emacs.
92 (when *acdw/at-larry* 92 (when *acdw/at-larry*
93 (add-to-list 'default-frame-alist '(fullscreen . maximized))) 93 (add-to-list 'default-frame-alist '(fullscreen . maximized)))
94 94
95 ;; set up the cursor 95 ;; set up the cursor
96 (blink-cursor-mode 0) 96 (blink-cursor-mode 0)
97 (setq-default cursor-type 'bar 97 (setq-default cursor-type 'bar
98 cursor-in-non-selected-windows 'hollow) 98 cursor-in-non-selected-windows 'hollow)
99 99
100 ;; display line numbers in `prog-mode' 100 ;; display line numbers in `prog-mode'
101 (add-hook 'prog-mode-hook 101 (add-hook 'prog-mode-hook
102 (if (and (fboundp 'display-line-numbers-mode) 102 (if (and (fboundp 'display-line-numbers-mode)
103 (display-graphic-p)) 103 (display-graphic-p))
104 #'display-line-numbers-mode 104 #'display-line-numbers-mode
105 #'linum-mode)) 105 #'linum-mode))
106 106
107 ;; custom functions 107 ;; custom functions
108 (defun split-and-follow-below () 108 (defun split-and-follow-below ()
109 "Split the window below and switch to the split." 109 "Split the window below and switch to the split."
110 (interactive) 110 (interactive)
111 (split-window-below) 111 (split-window-below)
112 (balance-windows) 112 (balance-windows)
113 (other-window 1)) 113 (other-window 1))
114 114
115 (defun split-and-follow-right () 115 (defun split-and-follow-right ()
116 "Split the window right and switch to the split." 116 "Split the window right and switch to the split."
117 (interactive) 117 (interactive)
118 (split-window-right) 118 (split-window-right)
119 (balance-windows) 119 (balance-windows)
120 (other-window 1)) 120 (other-window 1))
121 121
122 (defun full-auto-save () 122 (defun full-auto-save ()
123 "Save all buffers that (a) have files associated and (b) are modified." 123 "Save all buffers that (a) have files associated and (b) are modified."
124 (interactive) 124 (interactive)
125 (save-excursion 125 (save-excursion
126 (dolist (buf (buffer-list)) 126 (dolist (buf (buffer-list))
127 (set-buffer buf) 127 (set-buffer buf)
128 (if (and (buffer-file-name) (buffer-modified-p)) 128 (if (and (buffer-file-name) (buffer-modified-p))
129 (basic-save-buffer))))) 129 (basic-save-buffer)))))
130 130
131 (defun kill-this-buffer () 131 (defun kill-this-buffer ()
132 "Kill the current buffer." 132 "Kill the current buffer."
133 (interactive) 133 (interactive)
134 (kill-buffer nil)) 134 (kill-buffer nil))
135 135
136 :bind 136 :bind
137 ("C-x C-b" . ibuffer) 137 ("C-x C-b" . ibuffer)
138 ("M-z" . zap-up-to-char) 138 ("M-z" . zap-up-to-char)
139 ([remap split-window-below] . split-and-follow-below) 139 ([remap split-window-below] . split-and-follow-below)
140 ([remap split-window-right] . split-and-follow-right) 140 ([remap split-window-right] . split-and-follow-right)
141 ("C-x f" . find-file) 141 ("C-x f" . find-file)
142 ("C-z" . nil) 142 ("C-z" . nil)
143 ("C-x k" . kill-this-buffer) 143 ("C-x k" . kill-this-buffer)
144 ("C-x K" . kill-buffer) 144 ("C-x K" . kill-buffer)
145 145
146 :hook 146 :hook
147 (prog-mode-hook . prettify-symbols-mode) 147 (prog-mode-hook . prettify-symbols-mode)
148 ((auto-save-hook focus-out-hook) . full-auto-save) 148 ((auto-save-hook focus-out-hook) . full-auto-save)
149 (before-save-hook . delete-trailing-whitespace)) 149 (before-save-hook . delete-trailing-whitespace))
150 150
151;;;; Keep .emacs.d clean 151;;;; Keep .emacs.d clean
152;; load this early for other packages to use 152;; load this early for other packages to use
153(use-package no-littering 153(use-package no-littering
154 :demand 154 :demand
155 :config 155 :config
156 (setq custom-file (no-littering-expand-etc-file-name "custom.el")) 156 (setq custom-file (no-littering-expand-etc-file-name "custom.el"))
157 157
158 (setq create-lockfiles nil) 158 (setq create-lockfiles nil)
159 159
160 (setq delete-old-versions t 160 (setq delete-old-versions t
161 kept-new-versions 6 161 kept-new-versions 6
162 kept-old-versions 2 162 kept-old-versions 2
163 version-control t) 163 version-control t)
164 164
165 (setq backup-directory-alist 165 (setq backup-directory-alist
166 `((".*" . ,(no-littering-expand-var-file-name "backup/")))) 166 `((".*" . ,(no-littering-expand-var-file-name "backup/"))))
167 167
168 (setq auto-save-file-name-transforms 168 (setq auto-save-file-name-transforms
169 `((".*" ,(no-littering-expand-var-file-name "auto-save/") t))) 169 `((".*" ,(no-littering-expand-var-file-name "auto-save/") t)))
170 (auto-save-mode)) 170 (auto-save-mode))
171 171
172;;;; Uniquily name buffers 172;;;; Uniquily name buffers
173(use-package uniquify 173(use-package uniquify
174 :straight nil 174 :straight nil
175 :init 175 :init
176 (setq uniquify-buffer-name-style 'forward)) 176 (setq uniquify-buffer-name-style 'forward))
177 177
178;;;; Use async when possible 178;;;; Use async when possible
179(use-package async 179(use-package async
180 :config 180 :config
181 (dired-async-mode)) 181 (dired-async-mode))
182 182
183;;;; Autocompile elisp files (like this one) 183;;;; Autocompile elisp files (like this one)
184(use-package auto-compile 184(use-package auto-compile
185 :init 185 :init
186 (setq load-prefer-newer t) 186 (setq load-prefer-newer t)
187 :config 187 :config
188 (auto-compile-on-load-mode)) 188 (auto-compile-on-load-mode))
189 189
190;;;; Recent files 190;;;; Recent files
191(use-package recentf 191(use-package recentf
192 :init 192 :init
193 (setq recentf-max-menu-items 100 193 (setq recentf-max-menu-items 100
194 recentf-max-saved-items 100) 194 recentf-max-saved-items 100)
195 :config 195 :config
196 (add-to-list 'recentf-exclude no-littering-var-directory) 196 (add-to-list 'recentf-exclude no-littering-var-directory)
197 (add-to-list 'recentf-exclude no-littering-etc-directory) 197 (add-to-list 'recentf-exclude no-littering-etc-directory)
198 (recentf-mode)) 198 (recentf-mode))
199;;;; Save places in files 199;;;; Save places in files
200(use-package saveplace 200(use-package saveplace
201 :init 201 :init
202 (setq save-place-file (no-littering-expand-var-file-name "places")) 202 (setq save-place-file (no-littering-expand-var-file-name "places"))
203 (when *acdw/at-work* 203 (when *acdw/at-work*
204 (setq save-place-forget-unreadable-files nil)) 204 (setq save-place-forget-unreadable-files nil))
205 :config 205 :config
206 (save-place-mode)) 206 (save-place-mode))
207 207
208;;;; Save history of commands, etc. 208;;;; Save history of commands, etc.
209(use-package savehist 209(use-package savehist
210 :init 210 :init
211 (setq savehist-additional-variables 211 (setq savehist-additional-variables
212 '(kill-ring 212 '(kill-ring
213 search-ring 213 search-ring
214 regexp-search-ring)) 214 regexp-search-ring))
215 :config 215 :config
216 (savehist-mode)) 216 (savehist-mode))
217 217
218;;;; Authority sources for logins 218;;;; Authority sources for logins
219;; TODO: use gpg 219;; TODO: use gpg
220(use-package auth-source 220(use-package auth-source
221 :init 221 :init
222 (setq auth-sources '("~/.authinfo")) 222 (setq auth-sources '("~/.authinfo"))
223 (setq user-full-name "Case Duckworth") 223 (setq user-full-name "Case Duckworth")
224 (setq user-mail-address "acdw@acdw.net")) 224 (setq user-mail-address "acdw@acdw.net"))
225 225
226;;; General-ish Packages 226;;; General-ish Packages
227;;;; General improvements 227;;;; General improvements
228;;;;; Diminish TODO: is this necessary? 228;;;;; Diminish TODO: is this necessary?
229(use-package diminish) 229(use-package diminish)
230 230
231;;;;; Restart emacs /from within/ emacs 231;;;;; Restart emacs /from within/ emacs
232(use-package restart-emacs) 232(use-package restart-emacs)
233 233
234;;;; User interface 234;;;; User interface
235;;;;; Pop-up help for keys 235;;;;; Pop-up help for keys
236(use-package which-key 236(use-package which-key
237 :diminish which-key-mode 237 :diminish which-key-mode
238 :init 238 :init
239 (setq which-key-enable-extended-define-key t) 239 (setq which-key-enable-extended-define-key t)
240 :config 240 :config
241 (which-key-setup-side-window-right-bottom) 241 (which-key-setup-side-window-right-bottom)
242 (which-key-mode)) 242 (which-key-mode))
243 243
244;;;;; A better help buffer 244;;;;; A better help buffer
245(use-package helpful 245(use-package helpful
246 :bind 246 :bind
247 ("C-h f" . helpful-callable) 247 ("C-h f" . helpful-callable)
248 ("C-h v" . helpful-variable) 248 ("C-h v" . helpful-variable)
249 ("C-h k" . helpful-key) 249 ("C-h k" . helpful-key)
250 ("C-c C-d" . helpful-at-point) 250 ("C-c C-d" . helpful-at-point)
251 ("C-h F" . helpful-function) 251 ("C-h F" . helpful-function)
252 ("C-h C" . helpful-command)) 252 ("C-h C" . helpful-command))
253 253
254;;;;; A better `outline-mode' 254;;;;; A better `outline-mode'
255(use-package outshine 255(use-package outshine
256 :init 256 :init
257 (setq outshine-cycle-emulate-tab t) 257 (setq outshine-cycle-emulate-tab t)
258 :bind (:map outshine-mode-map 258 :bind (:map outshine-mode-map
259 ("<S-iso-lefttab>" . outshine-cycle-buffer) 259 ("<S-iso-lefttab>" . outshine-cycle-buffer)
260 ("<backtab>" . outshine-cycle-buffer)) 260 ("<backtab>" . outshine-cycle-buffer))
261 :hook 261 :hook
262 (emacs-lisp-mode-hook: . outshine-mode)) 262 (emacs-lisp-mode-hook: . outshine-mode))
263 263
264;;;;; Item selection & narrowing 264;;;;; Item selection & narrowing
265(use-package selectrum 265(use-package selectrum
266 :init 266 :init
267 (setq enable-recursive-minibuffers t) 267 (setq enable-recursive-minibuffers t)
268 (minibuffer-depth-indicate-mode) 268 (minibuffer-depth-indicate-mode)
269 :config 269 :config
270 (selectrum-mode)) 270 (selectrum-mode))
271 271
272(use-package prescient) 272(use-package prescient)
273 273
274(use-package selectrum-prescient 274(use-package selectrum-prescient
275 :config 275 :config
276 (selectrum-prescient-mode) 276 (selectrum-prescient-mode)
277 (prescient-persist-mode)) 277 (prescient-persist-mode))
278 278
279;;;;; Searching 279;;;;; Searching
280(use-package ctrlf 280(use-package ctrlf
281 :config 281 :config
282 (ctrlf-mode)) 282 (ctrlf-mode))
283 283
284;;;;; Visually switch windows 284;;;;; Visually switch windows
285(use-package switch-window 285(use-package switch-window
286 :init 286 :init
287 (setq switch-window-shortcut-style 'qwerty) 287 (setq switch-window-shortcut-style 'qwerty)
288 :bind 288 :bind
289 ([remap other-window] . switch-window) 289 ([remap other-window] . switch-window)
290 ("s-o" . switch-window)) 290 ("s-o" . switch-window))
291 291
292;;;; Theming, looks, fonts 292;;;; Theming, looks, fonts
293;;;;; Modeline 293;;;;; Modeline
294(use-package doom-modeline 294(use-package doom-modeline
295 :init 295 :init
296 (setq doom-modeline-icon nil 296 (setq doom-modeline-icon nil
297 doom-modeline-enable-word-count t) 297 doom-modeline-enable-word-count t)
298 298
299 (when *acdw/at-larry* 299 (when *acdw/at-larry*
300 (setq display-time-format "%R") 300 (setq display-time-format "%R")
301 (display-time-mode)) 301 (display-time-mode))
302 302
303 :hook 303 :hook
304 (window-setup-hook . doom-modeline-mode)) 304 (window-setup-hook . doom-modeline-mode))
305;;;;; Ligatures 305;;;;; Ligatures
306(use-package ligature 306(use-package ligature
307 :straight (ligature 307 :straight (ligature
308 :host github 308 :host github
309 :repo "mickeynp/ligature.el") 309 :repo "mickeynp/ligature.el")
310 :config 310 :config
311 (ligature-set-ligatures 'prog-mode 311 (ligature-set-ligatures 'prog-mode
312 '("++" "--" "/=" "&&" "||" "||=" 312 '("++" "--" "/=" "&&" "||" "||="
313 "->" "=>" "::" "__" 313 "->" "=>" "::" "__"
314 "==" "===" "!=" "=/=" "!==" 314 "==" "===" "!=" "=/=" "!=="
315 "<=" ">=" "<=>" 315 "<=" ">=" "<=>"
316 "/*" "*/" "//" "///" 316 "/*" "*/" "//" "///"
317 "\\n" "\\\\" 317 "\\n" "\\\\"
318 "<<" "<<<" "<<=" ">>" ">>>" ">>=" 318 "<<" "<<<" "<<=" ">>" ">>>" ">>="
319 "|=" "^=" 319 "|=" "^="
320 "**" "--" "---" "----" "-----" 320 "**" "--" "---" "----" "-----"
321 "==" "===" "====" "=====" 321 "==" "===" "====" "====="
322 "</" "<!--" "</>" "-->" "/>" 322 "</" "<!--" "</>" "-->" "/>"
323 ":=" "..." ":>" ":<" ">:" "<:" 323 ":=" "..." ":>" ":<" ">:" "<:"
324 "::=" ;; add others here 324 "::=" ;; add others here
325 )) 325 ))
326 (global-ligature-mode)) 326 (global-ligature-mode))
327;;;;; Unicode 327;;;;; Unicode
328(use-package unicode-fonts 328(use-package unicode-fonts
329 :config 329 :config
330 (unicode-fonts-setup)) 330 (unicode-fonts-setup))
331;;;;; Modus themes 331;;;;; Modus themes
332(use-package modus-operandi-theme 332(use-package modus-operandi-theme
333 :if window-system 333 :if window-system
334 :config 334 :config
335 (load-theme 'modus-operandi t t) 335 (load-theme 'modus-operandi t t)
336 336
337 (defun acdw/sunrise () 337 (defun acdw/sunrise ()
338 (enable-theme 'modus-operandi) 338 (enable-theme 'modus-operandi)
339 (start-process-shell-command "light" nil "light -S 60")) 339 (start-process-shell-command "light" nil "light -S 60"))
340 340
341 (if *acdw/at-work* 341 (if *acdw/at-work*
342 (enable-theme 'modus-operandi) 342 (enable-theme 'modus-operandi)
343 (run-at-time (nth 1 (split-string (sunrise-sunset))) 343 (run-at-time (nth 1 (split-string (sunrise-sunset)))
344 (* 60 60 24) #'acdw/sunrise))) 344 (* 60 60 24) #'acdw/sunrise)))
345 345
346(when *acdw/at-home* 346(when *acdw/at-home*
347 (use-package modus-vivendi-theme 347 (use-package modus-vivendi-theme
348 :if window-system 348 :if window-system
349 :config 349 :config
350 (load-theme 'modus-vivendi t t) 350 (load-theme 'modus-vivendi t t)
351 351
352 (defun acdw/sunset () 352 (defun acdw/sunset ()
353 (enable-theme 'modus-vivendi) 353 (enable-theme 'modus-vivendi)
354 (start-process-shell-command "light" nil "light -S 35")) 354 (start-process-shell-command "light" nil "light -S 35"))
355 355
356 (run-at-time (nth 4 (split-string (sunrise-sunset))) 356 (run-at-time (nth 4 (split-string (sunrise-sunset)))
357 (* 60 60 24) #'acdw/sunset) 357 (* 60 60 24) #'acdw/sunset)
358 (run-at-time "12am" (* 60 60 24) #'acdw/sunset))) 358 (run-at-time "12am" (* 60 60 24) #'acdw/sunset)))
359;;;; General text editing 359;;;; General text editing
360;;;;; Jump to characters fast 360;;;;; Jump to characters fast
361(use-package avy 361(use-package avy
362 :bind 362 :bind
363 ("M-s" . avy-goto-char-timer)) 363 ("M-s" . avy-goto-char-timer))
364;;;;; Show text commands acted on 364;;;;; Show text commands acted on
365(use-package volatile-highlights 365(use-package volatile-highlights
366 :config 366 :config
367 (volatile-highlights-mode)) 367 (volatile-highlights-mode))
368;;;;; Visual replacement for `zap-to-char' 368;;;;; Visual replacement for `zap-to-char'
369(use-package zop-to-char 369(use-package zop-to-char
370 :bind 370 :bind
371 ([remap zap-to-char] . zop-to-char) 371 ([remap zap-to-char] . zop-to-char)
372 ([remap zap-up-to-char] . zop-up-to-char)) 372 ([remap zap-up-to-char] . zop-up-to-char))
373;;;;; Kill & mark things more visually 373;;;;; Kill & mark things more visually
374(use-package easy-kill 374(use-package easy-kill
375 :bind 375 :bind
376 ([remap kill-ring-save] . easy-kill) 376 ([remap kill-ring-save] . easy-kill)
377 ([remap mark-sexp] . easy-mark)) 377 ([remap mark-sexp] . easy-mark))
378;;;;; Operate on the current line if no region is active 378;;;;; Operate on the current line if no region is active
379(use-package whole-line-or-region 379(use-package whole-line-or-region
380 :config 380 :config
381 (whole-line-or-region-global-mode)) 381 (whole-line-or-region-global-mode))
382 382
383;;;;; Expand region 383;;;;; Expand region
384(use-package expand-region 384(use-package expand-region
385 :bind 385 :bind
386 ("C-=" . er/expand-region)) 386 ("C-=" . er/expand-region))
387;;;; Programming 387;;;; Programming
388;;;;; Code completion 388;;;;; Code completion
389(use-package company 389(use-package company
390 :init 390 :init
391 (setq company-idle-delay 0.1 391 (setq company-idle-delay 0.1
392 company-show-numbers t) 392 company-show-numbers t)
393 :config 393 :config
394 (let ((map company-active-map)) 394 (let ((map company-active-map))
395 (mapc (lambda (x) 395 (mapc (lambda (x)
396 (define-key map (format "%d" x) 396 (define-key map (format "%d" x)
397 `(lambda () 397 `(lambda ()
398 (interactive) 398 (interactive)
399 (company-complete-number ,x)))) 399 (company-complete-number ,x))))
400 (number-sequence 0 9))) 400 (number-sequence 0 9)))
401 :hook 401 :hook
402 (prog-mode-hook . company-mode) 402 (prog-mode-hook . company-mode)
403 :bind (:map company-active-map 403 :bind (:map company-active-map
404 ("C-n" . company-select-next) 404 ("C-n" . company-select-next)
405 ("C-p" . company-select-previous))) 405 ("C-p" . company-select-previous)))
406 406
407(use-package company-quickhelp 407(use-package company-quickhelp
408 :hook 408 :hook
409 (company-mode-hook . company-quickhelp-local-mode)) 409 (company-mode-hook . company-quickhelp-local-mode))
410 410
411(use-package company-prescient 411(use-package company-prescient
412 :hook 412 :hook
413 (company-mode-hook . company-prescient-mode)) 413 (company-mode-hook . company-prescient-mode))
414 414
415;;;;; Git integration 415;;;;; Git integration
416(use-package magit 416(use-package magit
417 :if *acdw/at-home* 417 :if *acdw/at-home*
418 :bind 418 :bind
419 ("C-x g" . magit-status) 419 ("C-x g" . magit-status)
420 :config 420 :config
421 (add-to-list 'magit-no-confirm 'stage-all-changes)) 421 (add-to-list 'magit-no-confirm 'stage-all-changes))
422 422
423;; use libgit to speed up magit, only at home 423;; use libgit to speed up magit, only at home
424(when (and *acdw/at-home* (executable-find "cmake")) 424(when (and *acdw/at-home* (executable-find "cmake"))
425 (use-package libgit) 425 (use-package libgit)
426 426
427 (use-package magit-libgit 427 (use-package magit-libgit
428 :after (magit libgit)) 428 :after (magit libgit))
429 ) 429 )
430 430
431(use-package forge 431(use-package forge
432 :if *acdw/at-home* 432 :if *acdw/at-home*
433 :after magit 433 :after magit
434 :config 434 :config
435 (setq forge-owned-accounts '(("duckwork")))) 435 (setq forge-owned-accounts '(("duckwork"))))
436;;;;; Code formatting & display 436;;;;; Code formatting & display
437;;;;;; Keep code properly indented 437;;;;;; Keep code properly indented
438(use-package aggressive-indent 438(use-package aggressive-indent
439 :diminish aggressive-indent-mode 439 :diminish aggressive-indent-mode
440 :hook 440 :hook
441 (prog-mode-hook . aggressive-indent-mode)) 441 (prog-mode-hook . aggressive-indent-mode))
442;;;;;; Smartly deal with pairs 442;;;;;; Smartly deal with pairs
443(use-package smartparens 443(use-package smartparens
444 :config 444 :config
445 (require 'smartparens-config) 445 (require 'smartparens-config)
446 (smartparens-global-mode)) 446 (smartparens-global-mode))
447;;;;;; Show delimiters as different colors 447;;;;;; Show delimiters as different colors
448(use-package rainbow-delimiters 448(use-package rainbow-delimiters
449 :hook 449 :hook
450 (prog-mode-hook . rainbow-delimiters-mode)) 450 (prog-mode-hook . rainbow-delimiters-mode))
451;;;;;; Show colors as they appear in the buffer 451;;;;;; Show colors as they appear in the buffer
452(use-package rainbow-mode 452(use-package rainbow-mode
453 :hook 453 :hook
454 (prog-mode-hook . rainbow-mode)) 454 (prog-mode-hook . rainbow-mode))
455;;;; Writing 455;;;; Writing
456;;;;; `fill-column', but in `visual-line-mode' 456;;;;; `fill-column', but in `visual-line-mode'
457(use-package visual-fill-column 457(use-package visual-fill-column
458 :init 458 :init
459 (setq split-window-preferred-function 'visual-fill-column-split-window-sensibly) 459 (setq split-window-preferred-function 'visual-fill-column-split-window-sensibly)
460 (setq visual-fill-column-center-text t) 460 (setq visual-fill-column-center-text t)
461 :config 461 :config
462 (advice-add 'text-scale-adjust 462 (advice-add 'text-scale-adjust
463 :after #'visual-fill-column-adjust)) 463 :after #'visual-fill-column-adjust))
464 464
465;;;; Machine-specific 465;;;; Machine-specific
466;;;;; Linux at home 466;;;;; Linux at home
467(when *acdw/at-home* 467(when *acdw/at-home*
468;;;;;; Edit files with `sudo' (I think?) 468;;;;;; Edit files with `sudo' (I think?)
469 (use-package su 469 (use-package su
470 :config 470 :config
471 (su-mode)) 471 (su-mode))
472;;;;;; Implement XDG Trash specification 472;;;;;; Implement XDG Trash specification
473 (use-package trashed 473 (use-package trashed
474 :init 474 :init
475 (setq delete-by-moving-to-trash t)) 475 (setq delete-by-moving-to-trash t))
476;;;;;; Build exec-path from $PATH 476;;;;;; Build exec-path from $PATH
477 (use-package exec-path-from-shell 477 (use-package exec-path-from-shell
478 :demand 478 :demand
479 :config 479 :config
480 (exec-path-from-shell-initialize)) 480 (exec-path-from-shell-initialize))
481 ) 481 )
482;;; Specialized packages 482;;; Specialized packages
483;;;; Gemini & Gopher 483;;;; Gemini & Gopher
484(use-package elpher 484(use-package elpher
485 :straight (elpher 485 :straight (elpher
486 :repo "git://thelambdalab.xyz/elpher.git") 486 :repo "git://thelambdalab.xyz/elpher.git")
487 :bind (:map elpher-mode-map 487 :bind (:map elpher-mode-map
488 ("n" . elpher-next-link) 488 ("n" . elpher-next-link)
489 ("p" . elpher-prev-link) 489 ("p" . elpher-prev-link)
490 ("o" . elpher-follow-current-link) 490 ("o" . elpher-follow-current-link)
491 ("G" . elpher-go-current)) 491 ("G" . elpher-go-current))
492 :hook (elpher-mode-hook . (lambda () 492 :hook (elpher-mode-hook . (lambda ()
493 (variable-pitch-mode) 493 (variable-pitch-mode)
494 (set-fill-column 100) 494 (set-fill-column 100)
495 (visual-fill-column-mode)))) 495 (visual-fill-column-mode))))
496 496
497(use-package gemini-mode 497(use-package gemini-mode
498 :straight (gemini-mode 498 :straight (gemini-mode
499 :repo "https://git.carcosa.net/jmcbray/gemini.el.git")) 499 :repo "https://git.carcosa.net/jmcbray/gemini.el.git"))
500 500
501(use-package gemini-write 501(use-package gemini-write
502 :straight (gemini-write 502 :straight (gemini-write
503 :repo "https://alexschroeder.ch/cgit/gemini-write")) 503 :repo "https://alexschroeder.ch/cgit/gemini-write"))
504 504
505(defun post-to-gemlog-blue (post-title user pass) 505(defun post-to-gemlog-blue (post-title user pass)
506 "Post current buffer to gemlog.blue." 506 "Post current buffer to gemlog.blue."
507 (interactive 507 (interactive
508 (let* ((title-maybe (progn ;; TODO this is ... clunky 508 (let* ((title-maybe (progn ;; TODO this is ... clunky
509 (goto-char (point-min)) 509 (goto-char (point-min))
510 (if (re-search-forward "^# \\(.*\\)" nil t) 510 (if (re-search-forward "^# \\(.*\\)" nil t)
511 (buffer-substring-no-properties 511 (buffer-substring-no-properties
512 (match-beginning 1) 512 (match-beginning 1)
513 (match-end 1)) 513 (match-end 1))
514 ""))) 514 "")))
515 (title (read-string 515 (title (read-string
516 (format "Title%s: " 516 (format "Title%s: "
517 (if (string= "" title-maybe) 517 (if (string= "" title-maybe)
518 "" 518 ""
519 (concat " (" title-maybe ")"))) 519 (concat " (" title-maybe ")")))
520 nil nil title-maybe)) 520 nil nil title-maybe))
521 (user (read-string "User: " nil)) 521 (user (read-string "User: " nil))
522 (pass (read-passwd "Pass: " nil))) 522 (pass (read-passwd "Pass: " nil)))
523 (list title user pass))) 523 (list title user pass)))
524 524
525 (require 'mm-url) 525 (require 'mm-url)
526 (let ((url-request-method "POST") 526 (let ((url-request-method "POST")
527 (url-request-extra-headers 527 (url-request-extra-headers
528 '(("Content-Type" . "application/x-www-form-urlencoded"))) 528 '(("Content-Type" . "application/x-www-form-urlencoded")))
529 (url-request-data 529 (url-request-data
530 (mm-url-encode-www-form-urlencoded 530 (mm-url-encode-www-form-urlencoded
531 `(("title" . ,post-title) 531 `(("title" . ,post-title)
532 ("gemloguser" . ,user) 532 ("gemloguser" . ,user)
533 ("pw" . ,pass) 533 ("pw" . ,pass)
534 ("post" . ,(buffer-string)))))) 534 ("post" . ,(buffer-string))))))
535 (with-current-buffer 535 (with-current-buffer
536 (url-retrieve-synchronously "https://gemlog.blue/post.php") 536 (url-retrieve-synchronously "https://gemlog.blue/post.php")
537 (goto-char (point-min)) 537 (goto-char (point-min))
538 (re-search-forward "\\(gemini://.*\\.gmi\\)") 538 (re-search-forward "\\(gemini://.*\\.gmi\\)")
539 (elpher-go (match-string 1))))) 539 (elpher-go (match-string 1)))))
540 540
541;;;; exwm ~ Emacs X Window Manager 541;;;; exwm ~ Emacs X Window Manager
542(when *acdw/at-larry* 542(when *acdw/at-larry*
543 (use-package exwm 543 (use-package exwm
544 :if window-system 544 :if window-system
545 :demand 545 :demand
546 :custom 546 :custom
547 (exwm-layout-show-all-buffers t) 547 (exwm-layout-show-all-buffers t)
548 (exwm-workspace-warp-cursor t) 548 (exwm-workspace-warp-cursor t)
549 ;;(mouse-autoselect-window t) 549 ;;(mouse-autoselect-window t)
550 (exwm-workspace-number 4) 550 (exwm-workspace-number 4)
551 (exwm-input-global-keys 551 (exwm-input-global-keys
552 `( 552 `(
553 ([remap split-window-below] . split-and-follow-below) 553 ([remap split-window-below] . split-and-follow-below)
554 ([remap split-window-right] . split-and-follow-right) 554 ([remap split-window-right] . split-and-follow-right)
555 ([?\s-r] . exwm-reset) 555 ([?\s-r] . exwm-reset)
556 ([?\s-w] . exwm-workspace-switch) 556 ([?\s-w] . exwm-workspace-switch)
557 ([?\s-&] . (lambda (command) 557 ([?\s-&] . (lambda (command)
558 (interactive (list (read-shell-command "$ "))) 558 (interactive (list (read-shell-command "$ ")))
559 (start-process-shell-command command nil command))) 559 (start-process-shell-command command nil command)))
560 ,@(mapcar (lambda (i) 560 ,@(mapcar (lambda (i)
561 `(,(kbd (format "s-%d" i)) . 561 `(,(kbd (format "s-%d" i)) .
562 (lambda () 562 (lambda ()
563 (interactive) 563 (interactive)
564 (exwm-workspace-switch-create ,i)))) 564 (exwm-workspace-switch-create ,i))))
565 (number-sequence 0 9)))) 565 (number-sequence 0 9))))
566 (exwm-input-simulation-keys 566 (exwm-input-simulation-keys
567 '(([?\C-b] . [left]) 567 '(([?\C-b] . [left])
568 ([?\M-b] . [C-left]) 568 ([?\M-b] . [C-left])
569 ([?\C-f] . [right]) 569 ([?\C-f] . [right])
570 ([?\M-f] . [C-right]) 570 ([?\M-f] . [C-right])
571 ([?\C-p] . [up]) 571 ([?\C-p] . [up])
572 ([?\C-n] . [down]) 572 ([?\C-n] . [down])
573 ([?\C-a] . [home]) 573 ([?\C-a] . [home])
574 ([?\C-e] . [end]) 574 ([?\C-e] . [end])
575 ([?\M-v] . [prior]) 575 ([?\M-v] . [prior])
576 ([?\C-v] . [next]) 576 ([?\C-v] . [next])
577 ([?\C-d] . [delete]) 577 ([?\C-d] . [delete])
578 ([?\C-k] . [S-end delete]) 578 ([?\C-k] . [S-end delete])
579 ([?\C-s] . [?\C-f]) 579 ([?\C-s] . [?\C-f])
580 ([?\C-w] . [?\C-x]) 580 ([?\C-w] . [?\C-x])
581 ([?\M-w] . [?\C-c]) 581 ([?\M-w] . [?\C-c])
582 ([?\C-y] . [?\C-v]))) 582 ([?\C-y] . [?\C-v])))
583 :hook 583 :hook
584 ((exwm-update-class-hook . 584 ((exwm-update-class-hook .
585 (lambda () "Rename buffer to window's class name" 585 (lambda () "Rename buffer to window's class name"
586 (exwm-workspace-rename-buffer exwm-class-name))) 586 (exwm-workspace-rename-buffer exwm-class-name)))
587 (exwm-update-title-hook . 587 (exwm-update-title-hook .
588 (lambda () "Update workspace name to window title" 588 (lambda () "Update workspace name to window title"
589 (when (not exwm-instance-name) 589 (when (not exwm-instance-name)
590 (exwm-workspace-rename-buffer exwm-title)))) 590 (exwm-workspace-rename-buffer exwm-title))))
591 (exwm-init-hook . window-divider-mode) 591 (exwm-init-hook . window-divider-mode)
592 (exwm-init-hook . 592 (exwm-init-hook .
593 (lambda () "Autostart" 593 (lambda () "Autostart"
594 (start-process-shell-command "cmst" nil "cmst -m -w 5") 594 (start-process-shell-command "cmst" nil "cmst -m -w 5")
595 (start-process-shell-command "keepassxc" nil "keepassxc") 595 (start-process-shell-command "keepassxc" nil "keepassxc")
596 (start-process-shell-command 596 (start-process-shell-command
597 "pa-applet" nil 597 "pa-applet" nil
598 "pa-applet --disable-key-grabbing --disable-notifications") 598 "pa-applet --disable-key-grabbing --disable-notifications")
599 (start-process-shell-command 599 (start-process-shell-command
600 "cbatticon" nil "cbatticon")))) 600 "cbatticon" nil "cbatticon"))))
601 :config 601 :config
602 (require 'exwm) 602 (require 'exwm)
603 (exwm-enable) 603 (exwm-enable)
604 (require 'exwm-systemtray) 604 (require 'exwm-systemtray)
605 (exwm-systemtray-enable)) 605 (exwm-systemtray-enable))
606 606
607 (use-package exwm-firefox-core 607 (use-package exwm-firefox-core
608 :after exwm 608 :after exwm
609 :straight (exwm-firefox-core 609 :straight (exwm-firefox-core
610 :type git 610 :type git
611 :host github 611 :host github
612 :repo "walseb/exwm-firefox-core")) 612 :repo "walseb/exwm-firefox-core"))
613 613
614 (use-package exwm-firefox 614 (use-package exwm-firefox
615 :after exwm-firefox-core 615 :after exwm-firefox-core
616 :straight (exwm-firefox 616 :straight (exwm-firefox
617 :type git 617 :type git
618 :host github 618 :host github
619 :repo "ieure/exwm-firefox") 619 :repo "ieure/exwm-firefox")
620 :config 620 :config
621 (exwm-firefox-mode)) 621 (exwm-firefox-mode))
622 622
623 (use-package exwm-mff 623 (use-package exwm-mff
624 :straight (exwm-mff 624 :straight (exwm-mff
625 :host github 625 :host github
626 :repo "ieure/exwm-mff" 626 :repo "ieure/exwm-mff"
627 :fork ( 627 :fork (
628 :host github 628 :host github
629 :repo "duckwork/exwm-mff")) 629 :repo "duckwork/exwm-mff"))
630 :after exwm 630 :after exwm
631 :hook 631 :hook
632 (exwm-init-hook . exwm-mff-mode)) 632 (exwm-init-hook . exwm-mff-mode))
633 633
634 (use-package exwm-edit) 634 (use-package exwm-edit)
635 635
636 ) ;; end of *acdw/at-larry* block for exwm 636 ) ;; end of *acdw/at-larry* block for exwm
637 637
638;;;; IRC 638;;;; IRC
639(use-package circe 639(use-package circe
640 :if *acdw/at-larry* 640 :if *acdw/at-larry*
641 :init 641 :init
642 (defun my/fetch-password (&rest params) 642 (defun my/fetch-password (&rest params)
643 "Fetch a password from auth-sources" 643 "Fetch a password from auth-sources"
644 (require 'auth-source) 644 (require 'auth-source)
645 (let ((match (car (apply 'auth-source-search params)))) 645 (let ((match (car (apply 'auth-source-search params))))
646 (if match 646 (if match
647 (let ((secret (plist-get match :secret))) 647 (let ((secret (plist-get match :secret)))
648 (if (functionp secret) 648 (if (functionp secret)
649 (funcall secret) 649 (funcall secret)
650 secret)) 650 secret))
651 (error "Password not found for %S" params)))) 651 (error "Password not found for %S" params))))
652 652
653 (defun my/sasl-password (nick server) 653 (defun my/sasl-password (nick server)
654 "Fetch a password for $server and $nick" 654 "Fetch a password for $server and $nick"
655 (my/fetch-password :user nick :host server)) 655 (my/fetch-password :user nick :host server))
656 (require 'lui-autopaste) 656 (require 'lui-autopaste)
657 (defun my/circe-prompt () 657 (defun my/circe-prompt ()
658 (lui-set-prompt 658 (lui-set-prompt
659 (concat (propertize (concat (buffer-name) ">") 659 (concat (propertize (concat (buffer-name) ">")
660 'face 'circe-prompt-face) 660 'face 'circe-prompt-face)
661 " "))) 661 " ")))
662 (defun my/lui-setup () 662 (defun my/lui-setup ()
663 (setq right-margin-width 5 663 (setq right-margin-width 5
664 fringes-outside-margins t 664 fringes-outside-margins t
665 word-wrap t 665 word-wrap t
666 wrap-prefix " ") 666 wrap-prefix " ")
667 (setf (cdr (assoc 'continuation fringe-indicator-alist)) nil)) 667 (setf (cdr (assoc 'continuation fringe-indicator-alist)) nil))
668 :hook 668 :hook
669 (circe-channel-mode-hook . enable-lui-autopaste) 669 (circe-channel-mode-hook . enable-lui-autopaste)
670 (circe-chat-mode-hook . my/circe-prompt) 670 (circe-chat-mode-hook . my/circe-prompt)
671 (lui-mode-hook . my/lui-setup) 671 (lui-mode-hook . my/lui-setup)
672 :config 672 :config
673 (setq circe-default-part-message "Peace out, cub scouts") 673 (setq circe-default-part-message "Peace out, cub scouts")
674 (setq circe-default-quit-message "See You Space Cowpokes ......") 674 (setq circe-default-quit-message "See You Space Cowpokes ......")
675 (setq circe-default-realname "Case D") 675 (setq circe-default-realname "Case D")
676 (setq circe-highlight-nick-type 'all) 676 (setq circe-highlight-nick-type 'all)
677 (setq circe-reduce-lurker-spam t) 677 (setq circe-reduce-lurker-spam t)
678 (setq circe-format-say "{nick:-12s} {body}") 678 (setq circe-format-say "{nick:-12s} {body}")
679 (setq circe-format-self-say "{nick:-11s}> {body}") 679 (setq circe-format-self-say "{nick:-11s}> {body}")
680 (setq lui-time-stamp-position 'right-margin) 680 (setq lui-time-stamp-position 'right-margin)
681 (setq lui-fill-type nil) 681 (setq lui-fill-type nil)
682 (setq lui-time-stamp-format "%H:%M") 682 (setq lui-time-stamp-format "%H:%M")
683 (setq lui-track-bar-behavior 'before-switch-to-buffer) 683 (setq lui-track-bar-behavior 'before-switch-to-buffer)
684 (setq circe-network-options 684 (setq circe-network-options
685 `(("Freenode" 685 `(("Freenode"
686 :tls t 686 :tls t
687 :port 6697 687 :port 6697
688 :nick "acdw" 688 :nick "acdw"
689 :sasl-username "acdw" 689 :sasl-username "acdw"
690 :sasl-password ,(my/sasl-password "acdw" "irc.freenode.net") 690 :sasl-password ,(my/sasl-password "acdw" "irc.freenode.net")
691 :channels ("#emacs" "#daydreams")) 691 :channels ("#emacs" "#daydreams"))
692 ("Tilde.chat" 692 ("Tilde.chat"
693 :tls t 693 :tls t
694 :port 6697 694 :port 6697
695 :nick "acdw" 695 :nick "acdw"
696 :sasl-username "acdw" 696 :sasl-username "acdw"
697 :sasl-password ,(my/sasl-password "acdw" "irc.tilde.chat") 697 :sasl-password ,(my/sasl-password "acdw" "irc.tilde.chat")
698 :channels ("#gemini" "#meta")))) 698 :channels ("#gemini" "#meta"))))
699 (enable-lui-track-bar) 699 (enable-lui-track-bar)
700 :custom-face 700 :custom-face
701 (circe-my-message-face ((t (:inherit 'circe-highlight-nick-face :weight normal)))) 701 (circe-my-message-face ((t (:inherit 'circe-highlight-nick-face :weight normal))))
702 (circe-originator-face ((t (:weight bold)))) 702 (circe-originator-face ((t (:weight bold))))
703 (circe-prompt-face ((t (:inherit 'circe-my-message-face))))) 703 (circe-prompt-face ((t (:inherit 'circe-my-message-face)))))
704 704
705;;;; eshell 705;;;; eshell
706(use-package eshell 706(use-package eshell
707 :init 707 :init
708 (defun eshell/emacs (&rest args) 708 (defun eshell/emacs (&rest args)
709 "Open a file in emacs." 709 "Open a file in emacs."
710 (if (null args) 710 (if (null args)
711 (bury-buffer) 711 (bury-buffer)
712 (mapc #'find-file 712 (mapc #'find-file
713 (mapcar #'expand-file-name 713 (mapcar #'expand-file-name
714 (eshell-flatten-list (reverse args)))))) 714 (eshell-flatten-list (reverse args))))))
715 (defun eshell/info (&optional subject) 715 (defun eshell/info (&optional subject)
716 "Invoke `info', optionally opening Info to SUBJECT." 716 "Invoke `info', optionally opening Info to SUBJECT."
717 (require 'cl) 717 (require 'cl)
718 (let ((buf (current-buffer))) 718 (let ((buf (current-buffer)))
719 (Info-directory) 719 (Info-directory)
720 (if (not (null subject)) 720 (if (not (null subject))
721 (let ((node-exists (ignore-errors (Info-menu subject)))) 721 (let ((node-exists (ignore-errors (Info-menu subject))))
722 (if (not node-exists) 722 (if (not node-exists)
723 (format "No menu item `%s' in node `(dir)Top'." 723 (format "No menu item `%s' in node `(dir)Top'."
724 subject))))))) 724 subject)))))))
725 725
726(use-package eshell-syntax-highlighting 726(use-package eshell-syntax-highlighting
727 :after esh-mode 727 :after esh-mode
728 :config 728 :config
729 (eshell-syntax-highlighting-global-mode)) 729 (eshell-syntax-highlighting-global-mode))
730 730
731;;;; org-mode 731;;;; org-mode
732(use-package org 732(use-package org
733 :init 733 :init
734 (setq org-startup-indented t) 734 (setq org-startup-indented t)
735 (setq org-src-tab-acts-natively t) 735 (setq org-src-tab-acts-natively t)
736 (setq org-hide-emphasis-markers t) 736 (setq org-hide-emphasis-markers t)
737 (setq org-fontify-done-headline t) 737 (setq org-fontify-done-headline t)
738 (setq org-hide-leading-stars t) 738 (setq org-hide-leading-stars t)
739 (setq org-pretty-entities t) 739 (setq org-pretty-entities t)
740 740
741 (font-lock-add-keywords 'org-mode 741 (font-lock-add-keywords 'org-mode
742 '(("^ *\\([-+*]\\) " 742 '(("^ *\\([-+*]\\) "
743 (0 (prog1 () (compose-region (match-beginning 1) 743 (0 (prog1 () (compose-region (match-beginning 1)
744 (match-end 1) 744 (match-end 1)
745 "•")))))) 745 "•"))))))
746 :hook 746 :hook
747 (org-mode-hook . variable-pitch-mode)) 747 (org-mode-hook . variable-pitch-mode))
748 748
749(use-package org-bullets 749(use-package org-bullets
750 :hook 750 :hook
751 (org-mode-hook . (lambda () (org-bullets-mode)))) 751 (org-mode-hook . (lambda () (org-bullets-mode))))
752 752
753(provide 'init) 753(provide 'init)
754;;; init.el ends here 754;;; init.el ends here