summary refs log tree commit diff stats
path: root/README.md
diff options
context:
space:
mode:
authorCase Duckworth2020-12-23 20:30:13 -0600
committerCase Duckworth2020-12-23 20:30:13 -0600
commit027a7a96caf189958315955b7d6dde260f3295af (patch)
tree9a3225484082dbf28cf947cfb07e5e22d1d9bfb8 /README.md
parentAdd (declare) form to cuss (diff)
downloademacs-027a7a96caf189958315955b7d6dde260f3295af.tar.gz
emacs-027a7a96caf189958315955b7d6dde260f3295af.zip
Remove use-package
Diffstat (limited to 'README.md')
-rw-r--r--README.md62
1 files changed, 49 insertions, 13 deletions
diff --git a/README.md b/README.md index b4e10ba..f725e84 100644 --- a/README.md +++ b/README.md
@@ -80,6 +80,7 @@ when it errors.
80 '(use-package-custom-update 80 '(use-package-custom-update
81 :host github 81 :host github
82 :repo "a13/use-package-custom-update")) 82 :repo "a13/use-package-custom-update"))
83
83 (require 'use-package-custom-update) 84 (require 'use-package-custom-update)
84 85
85 86
@@ -146,6 +147,7 @@ when it errors.
146 (cuss default-frame-alist 147 (cuss default-frame-alist
147 '((tool-bar-lines . 0) 148 '((tool-bar-lines . 0)
148 (menu-bar-lines . 0))) 149 (menu-bar-lines . 0)))
150
149 (menu-bar-mode -1) 151 (menu-bar-mode -1)
150 (tool-bar-mode -1) 152 (tool-bar-mode -1)
151 153
@@ -154,6 +156,7 @@ when it errors.
154 156
155 (add-to-list 'default-frame-alist '(vertical-scroll-bars . nil)) 157 (add-to-list 'default-frame-alist '(vertical-scroll-bars . nil))
156 (scroll-bar-mode -1) 158 (scroll-bar-mode -1)
159
157 (add-to-list 'default-frame-alist '(horizontal-scroll-bars . nil)) 160 (add-to-list 'default-frame-alist '(horizontal-scroll-bars . nil))
158 (horizontal-scroll-bar-mode -1) 161 (horizontal-scroll-bar-mode -1)
159 162
@@ -171,6 +174,7 @@ when it errors.
171### Remove the bell 174### Remove the bell
172 175
173 (cuss visible-bell (not (string= (system-name) "larry"))) 176 (cuss visible-bell (not (string= (system-name) "larry")))
177
174 (defun acdw/ring-bell-function () 178 (defun acdw/ring-bell-function ()
175 "Custom bell-ringing function." 179 "Custom bell-ringing function."
176 (let ((orig-face (face-foreground 'mode-line))) 180 (let ((orig-face (face-foreground 'mode-line)))
@@ -180,6 +184,7 @@ when it errors.
180 (lambda (fg) 184 (lambda (fg)
181 (set-face-foreground 'mode-line fg)) 185 (set-face-foreground 'mode-line fg))
182 orig-face))) 186 orig-face)))
187
183 (cuss ring-bell-function #'acdw/ring-bell-function) 188 (cuss ring-bell-function #'acdw/ring-bell-function)
184 189
185 190
@@ -206,6 +211,7 @@ when it errors.
206 '((width . 80) 211 '((width . 80)
207 (height . 2) 212 (height . 2)
208 (vertical-scrollbars . nil))) 213 (vertical-scrollbars . nil)))
214
209 (set-window-scroll-bars (minibuffer-window) nil nil) 215 (set-window-scroll-bars (minibuffer-window) nil nil)
210 216
2112. Keep the cursor from going into the prompt 2172. Keep the cursor from going into the prompt
@@ -247,6 +253,7 @@ when it errors.
247 '((up . right) 253 '((up . right)
248 (down . right) 254 (down . right)
249 (t . nil))) 255 (t . nil)))
256
250 (cuss indicate-empty-lines t) 257 (cuss indicate-empty-lines t)
251 258
252 259
@@ -411,6 +418,7 @@ from [link0ff](https://github.com/link0ff/emacs-init).
411 :height 100) 418 :height 100)
412 ("Consolas" 419 ("Consolas"
413 :height 100))) 420 :height 100)))
421
414 (set-face-from-alternatives 'fixed-pitch 422 (set-face-from-alternatives 'fixed-pitch
415 '(("Libertinus Mono" 423 '(("Libertinus Mono"
416 :height 110) 424 :height 110)
@@ -420,6 +428,7 @@ from [link0ff](https://github.com/link0ff/emacs-init).
420 :height 100) 428 :height 100)
421 ("Consolas" 429 ("Consolas"
422 :height 100))) 430 :height 100)))
431
423 (set-face-from-alternatives 'variable-pitch 432 (set-face-from-alternatives 'variable-pitch
424 '(("Libertinus Serif" 433 '(("Libertinus Serif"
425 :height 120) 434 :height 120)
@@ -427,6 +436,7 @@ from [link0ff](https://github.com/link0ff/emacs-init).
427 :height 120) 436 :height 120)
428 ("Georgia" 437 ("Georgia"
429 :height 110))) 438 :height 110)))
439
430 (remove-function after-focus-change-function #'acdw/setup-fonts))) 440 (remove-function after-focus-change-function #'acdw/setup-fonts)))
431 441
432 (add-function :before after-focus-change-function #'acdw/setup-fonts) 442 (add-function :before after-focus-change-function #'acdw/setup-fonts)
@@ -454,6 +464,7 @@ from [link0ff](https://github.com/link0ff/emacs-init).
454 (straight-use-package 'async) 464 (straight-use-package 'async)
455 (autoload 'dired-async-mode "dired-async.el" nil t) 465 (autoload 'dired-async-mode "dired-async.el" nil t)
456 (dired-async-mode +1) 466 (dired-async-mode +1)
467
457 (async-bytecomp-package-mode +1) 468 (async-bytecomp-package-mode +1)
458 469
459 470
@@ -511,6 +522,7 @@ from [link0ff](https://github.com/link0ff/emacs-init).
511 ("<help> a" . consult-apropos)) 522 ("<help> a" . consult-apropos))
512 :init 523 :init
513 (fset 'multi-occur #'consult-multi-occur)) 524 (fset 'multi-occur #'consult-multi-occur))
525
514 (use-package consult-selectrum 526 (use-package consult-selectrum
515 :straight (consult-selectrum 527 :straight (consult-selectrum
516 :host github 528 :host github
@@ -620,8 +632,11 @@ Also from link0ff. See the above for a link.
620 '(kill-ring 632 '(kill-ring
621 search-ring 633 search-ring
622 regexp-search-ring)) 634 regexp-search-ring))
635
623 (cuss savehist-save-minibuffer-history t) 636 (cuss savehist-save-minibuffer-history t)
637
624 (cuss history-length t) 638 (cuss history-length t)
639
625 (cuss history-delete-duplicates t) 640 (cuss history-delete-duplicates t)
626 641
627 (savehist-mode +1) 642 (savehist-mode +1)
@@ -643,6 +658,7 @@ Also from link0ff. See the above for a link.
643 658
644 (cuss recentf-max-menu-items 100) 659 (cuss recentf-max-menu-items 100)
645 (cuss recentf-max-saved-items 100) 660 (cuss recentf-max-saved-items 100)
661
646 (with-eval-after-load 'no-littering 662 (with-eval-after-load 'no-littering
647 (add-to-list 'recentf-exclude no-littering-var-directory) 663 (add-to-list 'recentf-exclude no-littering-var-directory)
648 (add-to-list 'recentf-exclude no-littering-etc-directory)) 664 (add-to-list 'recentf-exclude no-littering-etc-directory))
@@ -762,10 +778,10 @@ Also from link0ff. See the above for a link.
762from [Emacs Wiki](https://www.emacswiki.org/emacs/EndOfLineTips). 778from [Emacs Wiki](https://www.emacswiki.org/emacs/EndOfLineTips).
763 779
764 (defun ewiki/no-junk-please-were-unixish () 780 (defun ewiki/no-junk-please-were-unixish ()
765 "Convert line endings to UNIX, dammit." 781 "Convert line endings to UNIX, dammit."
766 (let ((coding-str (symbol-name buffer-file-coding-system))) 782 (let ((coding-str (symbol-name buffer-file-coding-system)))
767 (when (string-match "-\\(?:dos\\|mac\\)$" coding-str) 783 (when (string-match "-\\(?:dos\\|mac\\)$" coding-str)
768 (set-buffer-file-coding-system 'unix)))) 784 (set-buffer-file-coding-system 'unix))))
769 785
770I add it to the `find-file-hook` *and* `before-save-hook` because I don't want to ever work with anything other than UNIX line endings ever again. I just don't care. Even Microsoft Notepad can handle UNIX line endings, so I don't want to hear it. 786I add it to the `find-file-hook` *and* `before-save-hook` because I don't want to ever work with anything other than UNIX line endings ever again. I just don't care. Even Microsoft Notepad can handle UNIX line endings, so I don't want to hear it.
771 787
@@ -845,23 +861,30 @@ I add it to the `find-file-hook` *and* `before-save-hook` because I don't want t
845 :custom 861 :custom
846 (company-idle-delay 0.1) 862 (company-idle-delay 0.1)
847 (company-minimum-prefix-length 3) 863 (company-minimum-prefix-length 3)
864
848 :init 865 :init
849 (defun acdw/company-complete-common-or-cycle+1 () 866 (defun acdw/company-complete-common-or-cycle+1 ()
850 (interactive) 867 (interactive)
851 (company-complete-common-or-cycle +1)) 868 (company-complete-common-or-cycle +1))
869
852 (defun acdw/company-complete-common-or-cycle-1 () 870 (defun acdw/company-complete-common-or-cycle-1 ()
853 (interactive) 871 (interactive)
854 (company-complete-common-or-cycle -1)) 872 (company-complete-common-or-cycle -1))
873
855 :bind 874 :bind
856 (:map company-active-map 875 (:map company-active-map
857 ("C-n" . acdw/company-complete-common-or-cycle+1) 876 ("C-n" . acdw/company-complete-common-or-cycle+1)
858 ("C-p" . acdw/company-complete-common-or-cycle-1)) 877 ("C-p" . acdw/company-complete-common-or-cycle-1))
878
859 :hook 879 :hook
860 (prog-mode-hook . company-mode)) 880 (prog-mode-hook . company-mode))
881
861 (use-package company-prescient 882 (use-package company-prescient
862 :hook 883 :hook
863 (company-mode-hook . company-prescient-mode)) 884 (company-mode-hook . company-prescient-mode))
885
864 ;; this comes with company-quickhelp, so.... 886 ;; this comes with company-quickhelp, so....
887
865 (use-package company-posframe 888 (use-package company-posframe
866 :after (company) 889 :after (company)
867 :config 890 :config
@@ -962,6 +985,7 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
962### Org Agenda 985### Org Agenda
963 986
964 (cuss org-agenda-files (no-littering-expand-etc-file-name "agenda-files")) 987 (cuss org-agenda-files (no-littering-expand-etc-file-name "agenda-files"))
988
965 (if (and (stringp org-agenda-files) 989 (if (and (stringp org-agenda-files)
966 (not (file-exists-p org-agenda-files))) 990 (not (file-exists-p org-agenda-files)))
967 (with-temp-buffer (write-file org-agenda-files))) 991 (with-temp-buffer (write-file org-agenda-files)))
@@ -981,6 +1005,7 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
981### [A better return in Org mode](http://kitchingroup.cheme.cmu.edu/blog/2017/04/09/A-better-return-in-org-mode/) 1005### [A better return in Org mode](http://kitchingroup.cheme.cmu.edu/blog/2017/04/09/A-better-return-in-org-mode/)
982 1006
983 (require 'org-inlinetask) 1007 (require 'org-inlinetask)
1008
984 (defun scimax/org-return (&optional ignore) 1009 (defun scimax/org-return (&optional ignore)
985 "Add new list item, heading or table row with RET. 1010 "Add new list item, heading or table row with RET.
986 A double return on an empty element deletes it. 1011 A double return on an empty element deletes it.
@@ -989,20 +1014,25 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
989 (if ignore 1014 (if ignore
990 (org-return) 1015 (org-return)
991 (cond 1016 (cond
1017
992 ((eq 'line-break (car (org-element-context))) 1018 ((eq 'line-break (car (org-element-context)))
993 (org-return t)) 1019 (org-return t))
1020
994 ;; Open links like usual, unless point is at the end of a line. 1021 ;; Open links like usual, unless point is at the end of a line.
995 ;; and if at beginning of line, just press enter. 1022 ;; and if at beginning of line, just press enter.
996 ((or (and (eq 'link (car (org-element-context))) (not (eolp))) 1023 ((or (and (eq 'link (car (org-element-context))) (not (eolp)))
997 (bolp)) 1024 (bolp))
998 (org-return)) 1025 (org-return))
1026
999 ;; It doesn't make sense to add headings in inline tasks. Thanks Anders 1027 ;; It doesn't make sense to add headings in inline tasks. Thanks Anders
1000 ;; Johansson! 1028 ;; Johansson!
1001 ((org-inlinetask-in-task-p) 1029 ((org-inlinetask-in-task-p)
1002 (org-return)) 1030 (org-return))
1031
1003 ;; checkboxes too 1032 ;; checkboxes too
1004 ((org-at-item-checkbox-p) 1033 ((org-at-item-checkbox-p)
1005 (org-insert-todo-heading nil)) 1034 (org-insert-todo-heading nil))
1035
1006 ;; lists end with two blank lines, so we need to make sure we are also not 1036 ;; lists end with two blank lines, so we need to make sure we are also not
1007 ;; at the beginning of a line to avoid a loop where a new entry gets 1037 ;; at the beginning of a line to avoid a loop where a new entry gets
1008 ;; created with only one blank line. 1038 ;; created with only one blank line.
@@ -1012,6 +1042,7 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
1012 (beginning-of-line) 1042 (beginning-of-line)
1013 (delete-region (line-beginning-position) (line-end-position)) 1043 (delete-region (line-beginning-position) (line-end-position))
1014 (org-return))) 1044 (org-return)))
1045
1015 ;; org-heading 1046 ;; org-heading
1016 ((org-at-heading-p) 1047 ((org-at-heading-p)
1017 (if (not (string= "" (org-element-property :title (org-element-context)))) 1048 (if (not (string= "" (org-element-property :title (org-element-context))))
@@ -1021,6 +1052,7 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
1021 (beginning-of-line) 1052 (beginning-of-line)
1022 (setf (buffer-substring 1053 (setf (buffer-substring
1023 (line-beginning-position) (line-end-position)) ""))) 1054 (line-beginning-position) (line-end-position)) "")))
1055
1024 ;; tables 1056 ;; tables
1025 ((org-at-table-p) 1057 ((org-at-table-p)
1026 (if (-any? 1058 (if (-any?
@@ -1034,9 +1066,12 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
1034 (setf (buffer-substring 1066 (setf (buffer-substring
1035 (line-beginning-position) (line-end-position)) "") 1067 (line-beginning-position) (line-end-position)) "")
1036 (org-return))) 1068 (org-return)))
1069
1037 ;; fall-through case 1070 ;; fall-through case
1038 (t 1071 (t
1039 (org-return))))) 1072 (org-return)))))
1073
1074
1040 (define-key org-mode-map (kbd "RET") 1075 (define-key org-mode-map (kbd "RET")
1041 'scimax/org-return) 1076 'scimax/org-return)
1042 1077
@@ -1087,16 +1122,10 @@ from [unpackaged.el](https://github.com/alphapapa/unpackaged.el#ensure-blank-lin
1087 (when (eq major-mode 'org-mode) 1122 (when (eq major-mode 'org-mode)
1088 (let ((current-prefix-arg 4)) ; Emulate C-u 1123 (let ((current-prefix-arg 4)) ; Emulate C-u
1089 (call-interactively 'unpackaged/org-fix-blank-lines)))) 1124 (call-interactively 'unpackaged/org-fix-blank-lines))))
1125
1090 (add-hook 'before-save-hook #'cribbed/org-mode-fix-blank-lines) 1126 (add-hook 'before-save-hook #'cribbed/org-mode-fix-blank-lines)
1091 1127
1092 1128
1093### Agenda
1094
1095 (bind-key "C-a" #'org-agenda 'acdw/map)
1096 (cuss org-agenda-files
1097 '("~/todo.org"))
1098
1099
1100## Elpher 1129## Elpher
1101 1130
1102 (use-package elpher 1131 (use-package elpher
@@ -1210,10 +1239,12 @@ from [unpackaged.el](https://github.com/alphapapa/unpackaged.el#ensure-blank-lin
1210from [karthinks](https://karthinks.com/software/more-batteries-included-with-emacs/#regexp-builder--m-x-re-builder). 1239from [karthinks](https://karthinks.com/software/more-batteries-included-with-emacs/#regexp-builder--m-x-re-builder).
1211 1240
1212 (require 'browse-url) 1241 (require 'browse-url)
1242
1213 (when (executable-find "mpv") 1243 (when (executable-find "mpv")
1214 (defun browse-url-mpv (url &optional single) 1244 (defun browse-url-mpv (url &optional single)
1215 (start-process "mpv" nil (if single "mpv" "umpv") 1245 (start-process "mpv" nil (if single "mpv" "umpv")
1216 (shell-quote-wildcard-pattern url))) 1246 (shell-quote-wildcard-pattern url)))
1247
1217 (defun browse-url-at-point-mpv (&optional single) 1248 (defun browse-url-at-point-mpv (&optional single)
1218 "Open a link in mpv." 1249 "Open a link in mpv."
1219 (interactive "P") 1250 (interactive "P")
@@ -1224,6 +1255,7 @@ from [karthinks](https://karthinks.com/software/more-batteries-included-with-ema
1224 (browse-url-mpv url t)) 1255 (browse-url-mpv url t))
1225 #'browse-url-mpv))) 1256 #'browse-url-mpv)))
1226 (browse-url-at-point))) 1257 (browse-url-at-point)))
1258
1227 (cuss browse-url-browser-function 1259 (cuss browse-url-browser-function
1228 '(("https?:\\/\\/www\\.youtu\\.*be." . browse-url-mpv) 1260 '(("https?:\\/\\/www\\.youtu\\.*be." . browse-url-mpv)
1229 ("." . browse-url-generic)))) 1261 ("." . browse-url-generic))))
@@ -1300,8 +1332,8 @@ from [karthinks](https://karthinks.com/software/more-batteries-included-with-ema
1300 1332
1301 ;; early-init.el -*- lexical-binding: t; no-byte-compile: t; -*- 1333 ;; early-init.el -*- lexical-binding: t; no-byte-compile: t; -*-
1302 1334
1303 (setq load-prefer-newer t) 1335 (setq load-prefer-newer t)
1304 (setq frame-inhibit-implied-resize t) 1336 (setq frame-inhibit-implied-resize t)
1305 1337
1306 1338
1307## Ease tangling and loading of Emacs' init 1339## Ease tangling and loading of Emacs' init
@@ -1336,6 +1368,7 @@ from [karthinks](https://karthinks.com/software/more-batteries-included-with-ema
1336 1368
1337 (defun acdw/refresh-emacs-no-load () 1369 (defun acdw/refresh-emacs-no-load ()
1338 (refresh-emacs 'disable-load)) 1370 (refresh-emacs 'disable-load))
1371
1339 (add-hook 'kill-emacs-hook #'acdw/refresh-emacs-no-load) 1372 (add-hook 'kill-emacs-hook #'acdw/refresh-emacs-no-load)
1340 1373
1341 1374
@@ -1355,6 +1388,7 @@ Here’s a wrapper script that’ll start `emacs –daemon` if there isn’t one
1355## License 1388## License
1356 1389
1357Copyright © 2020 Case Duckworth <acdw@acdw.net> 1390Copyright © 2020 Case Duckworth <acdw@acdw.net>
1391
1358This work is free. You can redistribute it and/or modify it under the 1392This work is free. You can redistribute it and/or modify it under the
1359terms of the Do What the Fuck You Want To Public License, Version 2, 1393terms of the Do What the Fuck You Want To Public License, Version 2,
1360as published by Sam Hocevar. See the `LICENSE` file, tangled from the 1394as published by Sam Hocevar. See the `LICENSE` file, tangled from the
@@ -1370,6 +1404,7 @@ following source block, for details.
1370 this license document, and changing it is allowed as long as the name is changed. 1404 this license document, and changing it is allowed as long as the name is changed.
1371 1405
1372 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 1406 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
1407
1373 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 1408 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1374 1409
1375 0. You just DO WHAT THE FUCK YOU WANT TO. 1410 0. You just DO WHAT THE FUCK YOU WANT TO.
@@ -1379,5 +1414,6 @@ following source block, for details.
1379 1414
1380It's highly likely that the WTFPL is completely incompatible with the 1415It's highly likely that the WTFPL is completely incompatible with the
1381GPL, for what should be fairly obvious reasons. To that, I say: 1416GPL, for what should be fairly obvious reasons. To that, I say:
1417
1382**SUE ME, RMS!** 1418**SUE ME, RMS!**
1383 1419