summary refs log tree commit diff stats
path: root/README.md
diff options
context:
space:
mode:
authorCase Duckworth2021-01-12 18:34:17 -0600
committerCase Duckworth2021-01-12 18:34:17 -0600
commit394a62109e8acd7184ff5ceecf46b1771df51ae7 (patch)
treee6cd445c845a75f7d3987fe72afef37c10a695d6 /README.md
parentAdd PHP mode (diff)
downloademacs-394a62109e8acd7184ff5ceecf46b1771df51ae7.tar.gz
emacs-394a62109e8acd7184ff5ceecf46b1771df51ae7.zip
Change indentation
Diffstat (limited to 'README.md')
-rw-r--r--README.md145
1 files changed, 90 insertions, 55 deletions
diff --git a/README.md b/README.md index 9450ea5..bde17e1 100644 --- a/README.md +++ b/README.md
@@ -393,17 +393,27 @@ helper function, though, to add things to the whitelist.
393 (cuss calendar-latitude 30.4515) 393 (cuss calendar-latitude 30.4515)
394 (cuss calendar-longitude -91.1871) 394 (cuss calendar-longitude -91.1871)
395 395
396 ;; sunrise 396 (defun acdw/run-with-sun (sunrise-command sunset-command)
397 (run-at-time (nth 1 (split-string (sunrise-sunset))) 397 "Run commands at sunrise and sunset."
398 (* 60 60 24) 398 (let* ((times-regex (rx (* nonl)
399 (lambda () 399 (: (any ?s ?S) "unrise") " "
400 (modus-themes-load-operandi))) 400 (group (repeat 1 2 digit) ":"
401 401 (repeat 1 2 digit)
402 ;; sunset 402 (: (any ?a ?A ?p ?P) (any ?m ?M)))
403 (run-at-time (nth 4 (split-string (sunrise-sunset))) 403 (* nonl)
404 (* 60 60 24) 404 (: (any ?s ?S) "unset") " "
405 (lambda () 405 (group (repeat 1 2 digit) ":"
406 (modus-themes-load-vivendi))) 406 (repeat 1 2 digit)
407 (: (any ?a ?A ?p ?P) (any ?m ?M)))
408 (* nonl)))
409 (ss (sunrise-sunset))
410 (m_ (string-match times-regex ss))
411 (sunrise-time (match-string 1 ss))
412 (sunset-time (match-string 2 ss)))
413 (run-at-time sunrise-time (* 60 60 24) sunrise-command)
414 (run-at-time sunset-time (* 60 60 24) sunset-command)))
415
416 (acdw/run-with-sun #'modus-themes-load-operandi #'modus-themes-load-vivendi)
407 417
408 418
409### Fonts 419### Fonts
@@ -430,19 +440,24 @@ helper function, though, to add things to the whitelist.
430 ;; fixed-pitch /is/ the default 440 ;; fixed-pitch /is/ the default
431 (set-face-from-alternatives face nil 441 (set-face-from-alternatives face nil
432 '(:family "Input Mono" 442 '(:family "Input Mono"
443 :slant normal
433 :weight normal 444 :weight normal
434 :height 110) 445 :height 110)
435 '(:family "Go Mono" 446 '(:family "Go Mono"
447 :slant normal
436 :weight normal 448 :weight normal
437 :height 100) 449 :height 100)
438 '(:family "Consolas" 450 '(:family "Consolas"
451 :slant normal
439 :weight normal 452 :weight normal
440 :height 100))) 453 :height 100)))
441 ;; variable-pitch is different 454 ;; variable-pitch is different
442 (set-face-from-alternatives 'variable-pitch nil 455 (set-face-from-alternatives 'variable-pitch nil
443 '(:family "Input Sans" 456 '(:family "Input Sans"
457 :slant normal
444 :weight normal) 458 :weight normal)
445 '(:family "Georgia" 459 '(:family "Georgia"
460 :slant normal
446 :weight normal))) 461 :weight normal)))
447 462
448 ;; remove myself from the hook 463 ;; remove myself from the hook
@@ -524,15 +539,11 @@ helper function, though, to add things to the whitelist.
524 539
525 (straight-use-package '(consult 540 (straight-use-package '(consult
526 :host github 541 :host github
527 :repo "minad/consult")) 542 :repo "minad/consult"
543 :files (:defaults "consult-pkg.el")))
528 (require 'consult) 544 (require 'consult)
529 545
530 (straight-use-package '(consult-selectrum 546 (with-eval-after-load 'consult
531 :host github
532 :repo "minad/consult"))
533 (require 'consult-selectrum)
534
535 (with-eval-after-load 'consult
536 (define-key ctl-x-map "b" #'consult-buffer) 547 (define-key ctl-x-map "b" #'consult-buffer)
537 (define-key ctl-x-map (kbd "C-r") #'consult-buffer) 548 (define-key ctl-x-map (kbd "C-r") #'consult-buffer)
538 (define-key ctl-x-map "4b" #'consult-buffer-other-window) 549 (define-key ctl-x-map "4b" #'consult-buffer-other-window)
@@ -724,12 +735,20 @@ from [u/TheFrenchPoulp](https://www.reddit.com/r/emacs/comments/km9by4/weekly_ti
724 735
725#### UTF-8 736#### UTF-8
726 737
727 (set-language-environment "UTF-8") 738from [Mastering Emacs](https://www.masteringemacs.org/article/working-coding-systems-unicode-emacs).
728 (set-terminal-coding-system 'utf-8) 739
729 (cuss locale-coding-system 'utf-8)
730 (set-default-coding-systems 'utf-8)
731 (set-selection-coding-system 'utf-8)
732 (prefer-coding-system 'utf-8) 740 (prefer-coding-system 'utf-8)
741 (set-default-coding-systems 'utf-8)
742 (set-terminal-coding-system 'utf-8)
743 (set-keyboard-coding-system 'utf-8)
744 ;; backwards compatibility:
745 ;; `default-buffer-file-coding-system' is deprecated in 23.2.
746 (if (boundp 'buffer-file-coding-system)
747 (setq-default buffer-file-coding-system 'utf-8)
748 (setq default-buffer-file-coding-system 'utf-8))
749
750 ;; Treat clipboard as UTF-8 string first; compound text next, etc.
751 (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
733 752
734 753
735#### Convert all files to UNIX-style line endings 754#### Convert all files to UNIX-style line endings
@@ -885,14 +904,14 @@ I’ve pretty much cribbed this from [recentf-remove-sudo-tramp-prefix](https://
885 904
886#### Replace with Anzu 905#### Replace with Anzu
887 906
888 (straight-use-package 'anzu) 907 (straight-use-package 'anzu)
889 (require 'anzu) 908 (require 'anzu)
890 909
891 ;; show search count in the modeline 910 ;; show search count in the modeline
892 (global-anzu-mode +1) 911 (global-anzu-mode +1)
893 912
894 (cuss anzu-replace-to-string-separator " → " 913 (cuss anzu-replace-to-string-separator " → "
895 "What to separate the search from the replacement.") 914 "What to separate the search from the replacement.")
896 915
897 (global-set-key [remap query-replace] #'anzu-query-replace) 916 (global-set-key [remap query-replace] #'anzu-query-replace)
898 (global-set-key [remap query-replace-regexp] #'anzu-query-replace-regexp) 917 (global-set-key [remap query-replace-regexp] #'anzu-query-replace-regexp)
@@ -1028,7 +1047,9 @@ I’ve pretty much cribbed this from [recentf-remove-sudo-tramp-prefix](https://
1028 (straight-use-package 'janet-mode) 1047 (straight-use-package 'janet-mode)
1029 (require 'janet-mode) 1048 (require 'janet-mode)
1030 1049
1031 (straight-use-package 'inf-janet-mode) 1050 (straight-use-package '(inf-janet
1051 :host github
1052 :repo "velkyel/inf-janet"))
1032 1053
1033 (add-hook 'janet-mode-hook #'inf-janet-minor-mode) 1054 (add-hook 'janet-mode-hook #'inf-janet-minor-mode)
1034 1055
@@ -1180,8 +1201,7 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
1180 1201
1181### Basics 1202### Basics
1182 1203
1183 (straight-use-package '(org 1204 (straight-use-package 'org)
1184 :repo "https://code.orgmode.org/bzg/org-mode.git"))
1185 1205
1186 (with-eval-after-load 'org 1206 (with-eval-after-load 'org
1187 (require 'org-tempo) 1207 (require 'org-tempo)
@@ -1226,8 +1246,8 @@ I’ve put org mode under Applications, as opposed to Writing, because it’s m
1226 (defun acdw/org-mode-prettify () 1246 (defun acdw/org-mode-prettify ()
1227 "Prettify `org-mode'." 1247 "Prettify `org-mode'."
1228 (dolist (cell '(("[ ]" . ?□) ("[X]" . ?☑) ("[-]" . ?◐) 1248 (dolist (cell '(("[ ]" . ?□) ("[X]" . ?☑) ("[-]" . ?◐)
1229 ("#+begin_src" . ?✎) ("#+BEGIN_SRC" . ?✎) 1249 ("#+begin_src" . ?✎) ("#+begin_src" . ?✎)
1230 ("#+end_src" . ?■) ("#+END_SRC" . ?■))) 1250 ("#+end_src" . ?■) ("#+end_src" . ?■)))
1231 (add-to-list 'prettify-symbols-alist cell :append)) 1251 (add-to-list 'prettify-symbols-alist cell :append))
1232 (prettify-symbols-mode +1)) 1252 (prettify-symbols-mode +1))
1233 1253
@@ -1391,6 +1411,12 @@ from [unpackaged.el](https://github.com/alphapapa/unpackaged.el#ensure-blank-lin
1391 (add-hook 'before-save-hook #'cribbed/org-mode-fix-blank-lines) 1411 (add-hook 'before-save-hook #'cribbed/org-mode-fix-blank-lines)
1392 1412
1393 1413
1414### Org Templates (`org-tempo`)
1415
1416 (add-to-list 'org-structure-template-alist
1417 '("el" . "src emacs-lisp"))
1418
1419
1394### Org Agenda 1420### Org Agenda
1395 1421
1396 (cuss org-agenda-files 1422 (cuss org-agenda-files
@@ -1405,12 +1431,13 @@ from [unpackaged.el](https://github.com/alphapapa/unpackaged.el#ensure-blank-lin
1405 1431
1406 (cuss org-todo-keywords 1432 (cuss org-todo-keywords
1407 '((sequence "RECUR(r)" "TODO(t)" "|" "DONE(d)") 1433 '((sequence "RECUR(r)" "TODO(t)" "|" "DONE(d)")
1434 (sequence "APPT(a)")
1408 (sequence "|" "CANCELLED(c)"))) 1435 (sequence "|" "CANCELLED(c)")))
1409 1436
1410 (cuss org-agenda-skip-scheduled-if-done t) 1437 (cuss org-agenda-skip-scheduled-if-done t)
1411 (cuss org-agenda-skip-deadline-if-done t) 1438 (cuss org-agenda-skip-deadline-if-done t)
1412 (cuss org-deadline-warning-days 4 1439 (cuss org-deadline-warning-days 0
1413 "Warn of a deadline beginning four days before.") 1440 "Don't warn of an impending deadline.")
1414 1441
1415 1442
1416### TODO Capture 1443### TODO Capture
@@ -1479,10 +1506,10 @@ I’m only enabling this at home for now, since it requires building stuff.
1479 (visual-fill-column-mode -1)) 1506 (visual-fill-column-mode -1))
1480 1507
1481 (at-home 1508 (at-home
1482 (straight-use-package 'pdf-tools) 1509 (straight-use-package 'pdf-tools)
1483 (pdf-loader-install) 1510 (pdf-loader-install)
1484 1511
1485 (add-hook 'pdf-view-mode-hook #'acdw/disable-visual-fill-column-mode)) 1512 (add-hook 'pdf-view-mode-hook #'acdw/disable-visual-fill-column-mode))
1486 1513
1487 1514
1488## E-book tools 1515## E-book tools
@@ -1729,12 +1756,12 @@ I’m only enabling this at home for now, since it requires building stuff.
1729### Exec path from shell 1756### Exec path from shell
1730 1757
1731 (at-home 1758 (at-home
1732 (straight-use-package 'exec-path-from-shell) 1759 (straight-use-package 'exec-path-from-shell)
1733 (defvar acdw/exec-path-from-shell-initialized nil 1760 (defvar acdw/exec-path-from-shell-initialized nil
1734 "Stores whether we've initialized or not.") 1761 "Stores whether we've initialized or not.")
1735 (unless acdw/exec-path-from-shell-initialized 1762 (unless acdw/exec-path-from-shell-initialized
1736 (exec-path-from-shell-initialize) 1763 (exec-path-from-shell-initialize)
1737 (setq acdw/exec-path-from-shell-initialized (current-time)))) 1764 (setq acdw/exec-path-from-shell-initialized (current-time))))
1738 1765
1739 1766
1740# Appendices 1767# Appendices
@@ -1820,8 +1847,6 @@ I’m only enabling this at home for now, since it requires building stuff.
1820 1847
1821### emacsdc 1848### emacsdc
1822 1849
1823:header-args: :tangle bin/emacsdc :tangle-mode (identity #o755)
1824
1825Here's a wrapper script that'll start `emacs --daemon` if there isn't 1850Here's a wrapper script that'll start `emacs --daemon` if there isn't
1826one, and then launch `emacsclient` with the arguments. I'd recommend 1851one, and then launch `emacsclient` with the arguments. I'd recommend
1827installing with either `ln -s bin/emacsdc $HOME/.local/bin/`, or 1852installing with either `ln -s bin/emacsdc $HOME/.local/bin/`, or
@@ -1835,14 +1860,24 @@ adding `$HOME/.local/bin` to your `$PATH`.
1835 1860
1836### Emacs.cmd 1861### Emacs.cmd
1837 1862
1838Here's a wrapper script that'll run Emacs on Windows, with a custom `$HOME`. I have 1863Here's a wrapper script that'll run Emacs on Windows, with a
1839mine setup like this: Emacs is downloaded from [the GNU mirror](https://mirrors.tripadvisor.com/gnu/emacs/windows/emacs-27/emacs-27.1-x86_64.zip) and unzipped to 1864custom `$HOME`. I have mine setup like this: Emacs is downloaded
1840`~/Downloads/emacs/`. For some reason, Emacs by default sets `$HOME` to `%APPDATA%`, 1865from [the GNU mirror](https://mirrors.tripadvisor.com/gnu/emacs/windows/emacs-27/emacs-27.1-x86_64.zip) and unzipped to `~/Downloads/emacs/`. For
1841which doesn’t make a lot of sense to me. I change it to `%USERPROFILE%`, and then run 1866some reason, Emacs by default sets `$HOME` to `%APPDATA%`, which
1842Emacs with the supplied arguments. 1867doesn’t make a lot of sense to me. I change it to
1868`%USERPROFILE%\Downloads\home`, and then run Emacs with the
1869supplied arguments.
1843 1870
1844 set HOME=%USERPROFILE% 1871As far as creating a shortcut to the Desktop, you’ll have to do
1845 set EMACS="%USERPROFILE%\Downloads\emacs\bin\runemacs.exe" 1872that yourself – *apparently* Windows doesn’t have a built-in
1873shortcut-creating software >:(.
1874
1875 REM Set variables
1876 set HOME=%USERPROFILE%\Downloads\home
1877 set EMACS=%USERPROFILE%\Downloads\emacs\bin\runemacs.exe
1878
1879 REM Change the directory
1880 chdir %HOME%
1846 1881
1847 REM Run "Quick Mode" 1882 REM Run "Quick Mode"
1848 REM "%EMACS%" -Q %* 1883 REM "%EMACS%" -Q %*
@@ -1873,7 +1908,7 @@ following source block, for details.
1873 1908
1874 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 1909 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1875 1910
1876 0. You just DO WHAT THE FUCK YOU WANT TO. 1911 0. You just DO WHAT THE FUCK YOU WANT TO.
1877 1912
1878 1913
1879### Note on the license 1914### Note on the license