diff options
author | Case Duckworth | 2021-02-10 10:32:33 -0600 |
---|---|---|
committer | Case Duckworth | 2021-02-10 10:32:33 -0600 |
commit | 14550001c03f08f4a3dafd5c8003205731430bf7 (patch) | |
tree | a39ec46a267ed649eb8ba35f3d43d88c0724385d | |
parent | Rewrite git-sync integration and add functions (diff) | |
parent | Wrap flyspell binding in with-eval-after-load (diff) | |
download | emacs-14550001c03f08f4a3dafd5c8003205731430bf7.tar.gz emacs-14550001c03f08f4a3dafd5c8003205731430bf7.zip |
Merge branch 'main' of https://tildegit.org/acdw/emacs into main
-rw-r--r-- | config.org | 99 |
1 files changed, 70 insertions, 29 deletions
diff --git a/config.org b/config.org index 18abf17..c31b821 100644 --- a/config.org +++ b/config.org | |||
@@ -205,13 +205,12 @@ This is extremely fiddly and I'd love another option. | |||
205 | split-height-threshold 50) | 205 | split-height-threshold 50) |
206 | #+end_src | 206 | #+end_src |
207 | 207 | ||
208 | *** Switch to other window or buffer :crux: | 208 | *** Switch to other window or buffer :crux: |
209 | 209 | ||
210 | #+begin_src emacs-lisp :noweb-ref bindings | 210 | #+begin_src emacs-lisp :noweb-ref bindings |
211 | (define-key acdw/map (kbd "M-o") #'crux-other-window-or-switch-buffer) | 211 | (define-key acdw/map (kbd "M-o") #'crux-other-window-or-switch-buffer) |
212 | #+end_src | 212 | #+end_src |
213 | 213 | ||
214 | |||
215 | *** The *Help* window | 214 | *** The *Help* window |
216 | 215 | ||
217 | I want to select the *Help* window by default, so I can easily quit it. | 216 | I want to select the *Help* window by default, so I can easily quit it. |
@@ -220,8 +219,6 @@ I want to select the *Help* window by default, so I can easily quit it. | |||
220 | (setq-default help-window-select t) | 219 | (setq-default help-window-select t) |
221 | #+end_src | 220 | #+end_src |
222 | 221 | ||
223 | |||
224 | |||
225 | ** Buffers | 222 | ** Buffers |
226 | 223 | ||
227 | *** Uniquify buffers | 224 | *** Uniquify buffers |
@@ -274,7 +271,7 @@ function to the =kill-buffer-query-functions= hook that will return | |||
274 | (add-hook 'kill-buffer-query-functions #'immortal-scratch) | 271 | (add-hook 'kill-buffer-query-functions #'immortal-scratch) |
275 | #+end_src | 272 | #+end_src |
276 | 273 | ||
277 | *** An /even better/ scratch buffer :package: | 274 | *** An /even better/ scratch buffer :package: |
278 | 275 | ||
279 | The aptly-named =scratch= pops open a new scratch buffer /with the same | 276 | The aptly-named =scratch= pops open a new scratch buffer /with the same |
280 | mode as the file you're currently editing/. I'm pretty chuffed about | 277 | mode as the file you're currently editing/. I'm pretty chuffed about |
@@ -414,7 +411,7 @@ underline below all the text. | |||
414 | (setq-default x-underline-at-descent-line t) | 411 | (setq-default x-underline-at-descent-line t) |
415 | #+end_src | 412 | #+end_src |
416 | 413 | ||
417 | *** Unicode fonts :package: | 414 | *** Unicode fonts :package: |
418 | 415 | ||
419 | =unicode-fonts= pulls in some other packages that still require the | 416 | =unicode-fonts= pulls in some other packages that still require the |
420 | deprecated =cl= library. So, I've forked those libraries to require | 417 | deprecated =cl= library. So, I've forked those libraries to require |
@@ -506,7 +503,7 @@ issue. | |||
506 | (add-hook 'after-make-frame-functions #'hook--unicode-fonts-setup) | 503 | (add-hook 'after-make-frame-functions #'hook--unicode-fonts-setup) |
507 | #+end_src | 504 | #+end_src |
508 | 505 | ||
509 | *** Draw form-feeds (=^L=) properly :package: | 506 | *** Draw form-feeds (=^L=) properly :package: |
510 | 507 | ||
511 | #+begin_src emacs-lisp :noweb-ref packages | 508 | #+begin_src emacs-lisp :noweb-ref packages |
512 | (straight-use-package 'form-feed) | 509 | (straight-use-package 'form-feed) |
@@ -519,7 +516,7 @@ issue. | |||
519 | 516 | ||
520 | ** Theming | 517 | ** Theming |
521 | 518 | ||
522 | *** Modus themes :package: | 519 | *** Modus themes :package: |
523 | 520 | ||
524 | I want the git version. | 521 | I want the git version. |
525 | 522 | ||
@@ -571,7 +568,7 @@ I want the git version. | |||
571 | 568 | ||
572 | *** Mode line | 569 | *** Mode line |
573 | 570 | ||
574 | **** Simple modeline :package: | 571 | **** Simple modeline :package: |
575 | 572 | ||
576 | After trying =doom-mode-line= and =smart-mode-line=, I think I've finally | 573 | After trying =doom-mode-line= and =smart-mode-line=, I think I've finally |
577 | landed on a good one: =simple-modeline=. | 574 | landed on a good one: =simple-modeline=. |
@@ -629,7 +626,7 @@ How is this not built into Emacs? Oh well, I have [[https://github.com/jamesnvc | |||
629 | (advice-add 'select-window :after #'cogent-line-set-selected-window) | 626 | (advice-add 'select-window :after #'cogent-line-set-selected-window) |
630 | #+end_src | 627 | #+end_src |
631 | 628 | ||
632 | **** Blackout some modes :package: | 629 | **** Blackout some modes :package: |
633 | 630 | ||
634 | Like =diminish= or =delight=, =blackout= allows me to remove some | 631 | Like =diminish= or =delight=, =blackout= allows me to remove some |
635 | minor-modes from the modeline. | 632 | minor-modes from the modeline. |
@@ -750,7 +747,7 @@ to /hide/ those contents. | |||
750 | read-file-name-completion-ignore-case t) | 747 | read-file-name-completion-ignore-case t) |
751 | #+end_src | 748 | #+end_src |
752 | 749 | ||
753 | *** Selectrum :package: | 750 | *** Selectrum :package: |
754 | 751 | ||
755 | *COMMENT 2021-02-01*: For some reason, selectrum will randomly do a thing where | 752 | *COMMENT 2021-02-01*: For some reason, selectrum will randomly do a thing where |
756 | it, like, flashes up and down in the minibuffer? I don't know how to explain | 753 | it, like, flashes up and down in the minibuffer? I don't know how to explain |
@@ -781,7 +778,7 @@ for now .... I just want to see my completions. | |||
781 | (icomplete-vertical-mode +1) | 778 | (icomplete-vertical-mode +1) |
782 | #+end_src | 779 | #+end_src |
783 | 780 | ||
784 | *** Prescient :package: | 781 | *** Prescient :package: |
785 | 782 | ||
786 | #+begin_src emacs-lisp :noweb-ref packages | 783 | #+begin_src emacs-lisp :noweb-ref packages |
787 | (straight-use-package 'prescient) | 784 | (straight-use-package 'prescient) |
@@ -807,7 +804,7 @@ Let's have =prescient= and =selectrum= work together. | |||
807 | (selectrum-prescient-mode +1)) | 804 | (selectrum-prescient-mode +1)) |
808 | #+end_src | 805 | #+end_src |
809 | 806 | ||
810 | *** Consult :package: | 807 | *** Consult :package: |
811 | 808 | ||
812 | #+begin_src emacs-lisp :noweb-ref modes | 809 | #+begin_src emacs-lisp :noweb-ref modes |
813 | (straight-use-package 'consult) | 810 | (straight-use-package 'consult) |
@@ -859,7 +856,7 @@ default completion system. These all come from the [[https://github.com/minad/c | |||
859 | register-preview-function #'consult-register-preview) | 856 | register-preview-function #'consult-register-preview) |
860 | #+end_src | 857 | #+end_src |
861 | 858 | ||
862 | *** Marginalia :package: | 859 | *** Marginalia :package: |
863 | 860 | ||
864 | Finally, =marginalia= provides extra information about completion | 861 | Finally, =marginalia= provides extra information about completion |
865 | candidates. | 862 | candidates. |
@@ -959,7 +956,7 @@ generally use it as a leader for entering applications. | |||
959 | (run-hooks 'acdw/leader-defined-hook) | 956 | (run-hooks 'acdw/leader-defined-hook) |
960 | #+end_src | 957 | #+end_src |
961 | 958 | ||
962 | *** Show keybindings with =which-key= :package: | 959 | *** Show keybindings with =which-key= :package: |
963 | 960 | ||
964 | #+begin_src emacs-lisp :noweb-ref packages | 961 | #+begin_src emacs-lisp :noweb-ref packages |
965 | (straight-use-package 'which-key) | 962 | (straight-use-package 'which-key) |
@@ -989,7 +986,7 @@ for a program that values freedom so much. | |||
989 | (setq-default disabled-command-function nil) | 986 | (setq-default disabled-command-function nil) |
990 | #+end_src | 987 | #+end_src |
991 | 988 | ||
992 | ** CRUX :package:crux: | 989 | ** CRUX :package:crux: |
993 | 990 | ||
994 | A collection of generally-useful functions that I don't want to bother | 991 | A collection of generally-useful functions that I don't want to bother |
995 | including here myself. This is kind of an experiment, to be honest. | 992 | including here myself. This is kind of an experiment, to be honest. |
@@ -1116,7 +1113,7 @@ the user is looking at something else. | |||
1116 | 1113 | ||
1117 | ** Garbage collection | 1114 | ** Garbage collection |
1118 | 1115 | ||
1119 | *** Garbage Collection Magic Hack :package: | 1116 | *** Garbage Collection Magic Hack :package: |
1120 | 1117 | ||
1121 | Look, I'm not going to look too deeply into this. It's /magic/ afer | 1118 | Look, I'm not going to look too deeply into this. It's /magic/ afer |
1122 | all. | 1119 | all. |
@@ -1186,7 +1183,7 @@ Notepad can handle UNIX line endings, so I don't want to hear it. | |||
1186 | (add-hook 'before-save-hook #'ewiki/no-junk-please-were-unixish) | 1183 | (add-hook 'before-save-hook #'ewiki/no-junk-please-were-unixish) |
1187 | #+end_src | 1184 | #+end_src |
1188 | 1185 | ||
1189 | ** Keep =~/.emacs.d= clean :package: | 1186 | ** Keep =~/.emacs.d= clean :package: |
1190 | 1187 | ||
1191 | #+begin_src emacs-lisp :noweb-ref packages :noweb yes | 1188 | #+begin_src emacs-lisp :noweb-ref packages :noweb yes |
1192 | (straight-use-package 'no-littering) | 1189 | (straight-use-package 'no-littering) |
@@ -1215,7 +1212,7 @@ Notepad can handle UNIX line endings, so I don't want to hear it. | |||
1215 | `((".*" . ,dir)))) | 1212 | `((".*" . ,dir)))) |
1216 | #+end_src | 1213 | #+end_src |
1217 | 1214 | ||
1218 | ** Autosaves :package: | 1215 | ** Autosaves :package: |
1219 | 1216 | ||
1220 | I don't use the =auto-save= system, preferring instead to use | 1217 | I don't use the =auto-save= system, preferring instead to use |
1221 | Bozhidar Batsov's [[https://github.com/bbatsov/super-save][super-save]] package. | 1218 | Bozhidar Batsov's [[https://github.com/bbatsov/super-save][super-save]] package. |
@@ -1396,7 +1393,7 @@ It manages my whitespace for me, anyway. | |||
1396 | (setq-default kill-do-not-save-duplicates t) | 1393 | (setq-default kill-do-not-save-duplicates t) |
1397 | #+end_src | 1394 | #+end_src |
1398 | 1395 | ||
1399 | *** Kill the line if there is no region :crux: | 1396 | *** Kill the line if there is no region :crux: |
1400 | 1397 | ||
1401 | #+begin_src emacs-lisp :noweb-ref hooks | 1398 | #+begin_src emacs-lisp :noweb-ref hooks |
1402 | (crux-with-region-or-line kill-ring-save) | 1399 | (crux-with-region-or-line kill-ring-save) |
@@ -1557,7 +1554,9 @@ already commented. That's it. | |||
1557 | 1554 | ||
1558 | * Writing | 1555 | * Writing |
1559 | 1556 | ||
1560 | ** COMMENT Word count :package: | 1557 | ** Word count |
1558 | |||
1559 | *** COMMENT WC Mode :package: | ||
1561 | 1560 | ||
1562 | I'm just going to comment this out for right now because I honestly | 1561 | I'm just going to comment this out for right now because I honestly |
1563 | don't know if it's that useful. | 1562 | don't know if it's that useful. |
@@ -1577,8 +1576,20 @@ don't know if it's that useful. | |||
1577 | (add-hook 'text-mode-hook #'hook--wc-mode-no-keybinds) | 1576 | (add-hook 'text-mode-hook #'hook--wc-mode-no-keybinds) |
1578 | #+end_src | 1577 | #+end_src |
1579 | 1578 | ||
1579 | *** Keybinding :crux: | ||
1580 | |||
1581 | I just found out that =M-== counts the words in a region. That's great, but I | ||
1582 | often want to count the words in the whole buffer. Enter | ||
1583 | =crux-with-region-or-buffer=. I could change the binding. .... but I don't want to. | ||
1584 | |||
1585 | #+begin_src emacs-lisp :noweb-ref bindings | ||
1586 | (crux-with-region-or-buffer count-words-region) | ||
1587 | #+end_src | ||
1588 | |||
1580 | ** Spell checking | 1589 | ** Spell checking |
1581 | 1590 | ||
1591 | *** Settings | ||
1592 | |||
1582 | Let's use =hunspell=. | 1593 | Let's use =hunspell=. |
1583 | 1594 | ||
1584 | #+begin_src emacs-lisp :noweb-ref packages | 1595 | #+begin_src emacs-lisp :noweb-ref packages |
@@ -1593,6 +1604,26 @@ Let's use =hunspell=. | |||
1593 | (write-region "" nil ispell-personal-dictionary nil 0)) | 1604 | (write-region "" nil ispell-personal-dictionary nil 0)) |
1594 | #+end_src | 1605 | #+end_src |
1595 | 1606 | ||
1607 | *** Flyspell | ||
1608 | |||
1609 | #+begin_src emacs-lisp :noweb-ref hooks | ||
1610 | (add-hook 'text-mode-hook #'flyspell-mode) | ||
1611 | (add-hook 'prog-mode-hook #'flyspell-prog-mode) | ||
1612 | #+end_src | ||
1613 | |||
1614 | *** Flyspell-correct :package: | ||
1615 | |||
1616 | Display corrections with =completing-read=. | ||
1617 | |||
1618 | #+begin_src emacs-lisp :noweb-ref packages | ||
1619 | (straight-use-package 'flyspell-correct) | ||
1620 | #+end_src | ||
1621 | |||
1622 | #+begin_src emacs-lisp :noweb-ref bindings | ||
1623 | (with-eval-after-load 'flyspell | ||
1624 | (define-key flyspell-mode-map (kbd "C-;") #'flyspell-correct-wrapper)) | ||
1625 | #+end_src | ||
1626 | |||
1596 | * Reading | 1627 | * Reading |
1597 | 1628 | ||
1598 | ** Smooth-scrolling of images :package: | 1629 | ** Smooth-scrolling of images :package: |
@@ -1645,7 +1676,7 @@ to auto-fill in programming modes, but /only/ the comments. | |||
1645 | show-paren-style 'mixed) | 1676 | show-paren-style 'mixed) |
1646 | #+end_src | 1677 | #+end_src |
1647 | 1678 | ||
1648 | *** Smart parens :package: | 1679 | *** Smart parens :package: |
1649 | 1680 | ||
1650 | #+begin_src emacs-lisp :noweb-ref packages | 1681 | #+begin_src emacs-lisp :noweb-ref packages |
1651 | (straight-use-package 'smartparens) | 1682 | (straight-use-package 'smartparens) |
@@ -1692,7 +1723,7 @@ to auto-fill in programming modes, but /only/ the comments. | |||
1692 | 1723 | ||
1693 | ** Formatting | 1724 | ** Formatting |
1694 | 1725 | ||
1695 | *** Aggressive indent :package: | 1726 | *** Aggressive indent :package: |
1696 | 1727 | ||
1697 | #+begin_src emacs-lisp :noweb-ref packages | 1728 | #+begin_src emacs-lisp :noweb-ref packages |
1698 | (straight-use-package 'aggressive-indent) | 1729 | (straight-use-package 'aggressive-indent) |
@@ -1851,7 +1882,7 @@ move up a directory with a keybinding, I'll change =-a= to =-A=. | |||
1851 | (define-key acdw/map (kbd "C-x C-j") #'dired-jump) | 1882 | (define-key acdw/map (kbd "C-x C-j") #'dired-jump) |
1852 | #+end_src | 1883 | #+end_src |
1853 | 1884 | ||
1854 | *** Expand subtrees :package: | 1885 | *** Expand subtrees :package: |
1855 | 1886 | ||
1856 | Instead of opening each folder in its own buffer, =dired-subtree= | 1887 | Instead of opening each folder in its own buffer, =dired-subtree= |
1857 | enables me to open them in the same buffer, fancily indented. | 1888 | enables me to open them in the same buffer, fancily indented. |
@@ -1865,7 +1896,7 @@ enables me to open them in the same buffer, fancily indented. | |||
1865 | (define-key dired-mode-map "i" #'dired-subtree-toggle)) | 1896 | (define-key dired-mode-map "i" #'dired-subtree-toggle)) |
1866 | #+end_src | 1897 | #+end_src |
1867 | 1898 | ||
1868 | *** Collapse singleton directories :package: | 1899 | *** Collapse singleton directories :package: |
1869 | 1900 | ||
1870 | If a directory only has one item in it, =dired-collapse= shows what | 1901 | If a directory only has one item in it, =dired-collapse= shows what |
1871 | that one item is. | 1902 | that one item is. |
@@ -1929,7 +1960,7 @@ true, please feel free to hack this repo and change this paragraph. | |||
1929 | (setenv "GIT_ASKPASS" "git-gui--askpass") | 1960 | (setenv "GIT_ASKPASS" "git-gui--askpass") |
1930 | #+end_src | 1961 | #+end_src |
1931 | 1962 | ||
1932 | **** Forge :package: | 1963 | **** Forge :package: |
1933 | 1964 | ||
1934 | #+begin_src emacs-lisp :noweb-ref packages | 1965 | #+begin_src emacs-lisp :noweb-ref packages |
1935 | (straight-use-package 'forge) | 1966 | (straight-use-package 'forge) |
@@ -1937,7 +1968,7 @@ true, please feel free to hack this repo and change this paragraph. | |||
1937 | (require 'forge)) | 1968 | (require 'forge)) |
1938 | #+end_src | 1969 | #+end_src |
1939 | 1970 | ||
1940 | *** Git file modes :package: | 1971 | *** Git file modes :package: |
1941 | 1972 | ||
1942 | #+begin_src emacs-lisp :noweb-ref packages | 1973 | #+begin_src emacs-lisp :noweb-ref packages |
1943 | (dolist (feat '(gitattributes-mode | 1974 | (dolist (feat '(gitattributes-mode |
@@ -2114,7 +2145,16 @@ See [[https://github.com/redguardtoo/mastering-emacs-in-one-year-guide/blob/mast | |||
2114 | ("https://aiweirdness.com/rss" tech) | 2145 | ("https://aiweirdness.com/rss" tech) |
2115 | ("http://tilde.town/~m455/javapool.rss" tilde) | 2146 | ("http://tilde.town/~m455/javapool.rss" tilde) |
2116 | ("https://spwhitton.name/blog/index.rss" blags) | 2147 | ("https://spwhitton.name/blog/index.rss" blags) |
2117 | ("https://www.theadvocate.com/search/?f=rss&t=article&l=50" news) | 2148 | (,(concat "https://www.theadvocate.com/search/?" |
2149 | ;; Let's Build A URL!!! | ||
2150 | "f=rss" ; RSS feed | ||
2151 | "&l=10" ; 10 most recent (length) | ||
2152 | "&c[]=" ; I'm guessing ... categories? | ||
2153 | "baton_rouge/news*," | ||
2154 | "baton_rouge/opinion*" | ||
2155 | "?t=article" ; type=article | ||
2156 | ) | ||
2157 | news) | ||
2118 | ("https://esoteric.codes/rss" tech) | 2158 | ("https://esoteric.codes/rss" tech) |
2119 | ("https://wphicks.github.io/feed.xml" blags) | 2159 | ("https://wphicks.github.io/feed.xml" blags) |
2120 | )) | 2160 | )) |
@@ -2822,7 +2862,7 @@ settings and written some ancillary scripts. | |||
2822 | 2862 | ||
2823 | I'll put generic system-integrating code here. | 2863 | I'll put generic system-integrating code here. |
2824 | 2864 | ||
2825 | *** Edit with Emacs :package: | 2865 | *** Edit with Emacs :package: |
2826 | 2866 | ||
2827 | Install the [[https://addons.mozilla.org/en-US/firefox/addon/edit-with-emacs1/][Firefox Addon]] alongside this package to edit web forms in | 2867 | Install the [[https://addons.mozilla.org/en-US/firefox/addon/edit-with-emacs1/][Firefox Addon]] alongside this package to edit web forms in |
2828 | Emacs (or the [[https://chrome.google.com/webstore/detail/edit-with-emacs/ljobjlafonikaiipfkggjbhkghgicgoh][Chrome one]] if you... /hate/ freedom :P). | 2868 | Emacs (or the [[https://chrome.google.com/webstore/detail/edit-with-emacs/ljobjlafonikaiipfkggjbhkghgicgoh][Chrome one]] if you... /hate/ freedom :P). |
@@ -2871,6 +2911,7 @@ This function require [[https://github.com/simonthum/git-sync][git-sync]]. | |||
2871 | (defun acdw/git-sync-elfeed-db () | 2911 | (defun acdw/git-sync-elfeed-db () |
2872 | "Run `acdw/git-sync' on `elfeed-db-directory'." | 2912 | "Run `acdw/git-sync' on `elfeed-db-directory'." |
2873 | (interactive) | 2913 | (interactive) |
2914 | (save-some-buffers :no-query nil) | ||
2874 | (acdw/git-sync elfeed-db-directory)) | 2915 | (acdw/git-sync elfeed-db-directory)) |
2875 | 2916 | ||
2876 | (define-key acdw/leader (kbd "C-M-f") #'acdw/git-sync-elfeed-db) | 2917 | (define-key acdw/leader (kbd "C-M-f") #'acdw/git-sync-elfeed-db) |