summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-10-17 21:27:59 -0500
committerCase Duckworth2022-10-17 21:27:59 -0500
commit3e78d1f8ca5b100f39577790614433398bc6a422 (patch)
treef65f3164ac143c81da877375adce7f1f1492a01f
parentbleh (diff)
downloademacs-3e78d1f8ca5b100f39577790614433398bc6a422.tar.gz
emacs-3e78d1f8ca5b100f39577790614433398bc6a422.zip
asoi
-rw-r--r--.gitignore1
-rw-r--r--init.el310
-rw-r--r--lisp/+chicken.el12
-rw-r--r--lisp/+emacs.el14
-rw-r--r--lisp/+org.el76
-rw-r--r--machines/bob.el5
6 files changed, 256 insertions, 162 deletions
diff --git a/.gitignore b/.gitignore index c521db5..bc45f59 100644 --- a/.gitignore +++ b/.gitignore
@@ -22,3 +22,4 @@ url/
22 22
23# put random stuff in here 23# put random stuff in here
24scratch.el 24scratch.el
25spell-fu/
diff --git a/init.el b/init.el index d3fc88e..bed69ee 100644 --- a/init.el +++ b/init.el
@@ -487,6 +487,12 @@
487 ;; (+kmacro-recording-indicator-mode +1) 487 ;; (+kmacro-recording-indicator-mode +1)
488 (+kmacro-block-undo-mode +1))) 488 (+kmacro-block-undo-mode +1)))
489 489
490(setup make-mode
491 (:hook (defun +make-remove-warnings ()
492 (dolist (f '(makefile-warn-continuations
493 makefile-warn-suspicious-lines))
494 (remove-hook 'write-file-functions f t)))))
495
490(setup midnight 496(setup midnight
491 (midnight-mode +1) 497 (midnight-mode +1)
492 (add-hook 'midnight-hook #'recentf-cleanup)) 498 (add-hook 'midnight-hook #'recentf-cleanup))
@@ -520,18 +526,18 @@
520 ) 526 )
521 (with-eval-after-load 'transient 527 (with-eval-after-load 'transient
522 (transient-define-prefix net-utils () 528 (transient-define-prefix net-utils ()
523 "Networking utilities" 529 "Networking utilities"
524 ["Actions" 530 ["Actions"
525 ("p" "Ping" ping) 531 ("p" "Ping" ping)
526 ("i" "Ifconfig" ifconfig) 532 ("i" "Ifconfig" ifconfig)
527 ("w" "Iwconfig" iwconfig) 533 ("w" "Iwconfig" iwconfig)
528 ("n" "Netstat" netstat) 534 ("n" "Netstat" netstat)
529 ("a" "Arp" arp) 535 ("a" "Arp" arp)
530 ("r" "Route" route) 536 ("r" "Route" route)
531 ("h" "Nslookup host" nslookup-host) 537 ("h" "Nslookup host" nslookup-host)
532 ("d" "Dig" dig) 538 ("d" "Dig" dig)
533 ("s" "Smb Client" smbclient) 539 ("s" "Smb Client" smbclient)
534 ("t" "Traceroute" traceroute)]) 540 ("t" "Traceroute" traceroute)])
535 (:+key "C-z M-n" #'net-utils))) 541 (:+key "C-z M-n" #'net-utils)))
536 542
537(setup notmuch 543(setup notmuch
@@ -720,10 +726,7 @@
720 "`" #'+org-insert-tilde 726 "`" #'+org-insert-tilde
721 "~" #'+org-insert-backtick 727 "~" #'+org-insert-backtick
722 "C-c C-x l" #'org-toggle-link-display 728 "C-c C-x l" #'org-toggle-link-display
723 "C-c C-x m" (lambda () (interactive) 729 "C-c C-x m" #'+org-toggle-view-emphasis
724 (setq-local org-hide-emphasis-markers
725 (not org-hide-emphasis-markers))
726 (font-lock-update))
727 "C-c C-x r" #'+org-drawer-list-add-resource 730 "C-c C-x r" #'+org-drawer-list-add-resource
728 "C-M-k" #'kill-paragraph 731 "C-M-k" #'kill-paragraph
729 "C-M-t" #'transpose-paragraphs) 732 "C-M-t" #'transpose-paragraphs)
@@ -761,7 +764,11 @@
761 (org-link-set-parameters "tel" :follow #'+org-tel-open) 764 (org-link-set-parameters "tel" :follow #'+org-tel-open)
762 (org-link-set-parameters "sms" :follow #'+org-sms-open) 765 (org-link-set-parameters "sms" :follow #'+org-sms-open)
763 (setf (alist-get "\\.x?html?\\'" org-file-apps nil nil #'equal) 766 (setf (alist-get "\\.x?html?\\'" org-file-apps nil nil #'equal)
764 #'+org-open-html)) 767 #'+org-open-html)
768 (advice-add 'org-agenda :before
769 (defun +org-agenda-files-uniquify (&rest _)
770 (setq org-agenda-files
771 (seq-uniq org-agenda-files)))))
765 (:face 'org-done '((t (:inherit (modus-themes-subtle-green)))) 772 (:face 'org-done '((t (:inherit (modus-themes-subtle-green))))
766 'org-tag '((t (:inherit (secondary-selection)))) 773 'org-tag '((t (:inherit (secondary-selection))))
767 'org-todo '((t (:inherit (modus-themes-subtle-red))))) 774 'org-todo '((t (:inherit (modus-themes-subtle-red)))))
@@ -917,6 +924,24 @@
917 (:local-set comment-auto-fill-only-comments t) 924 (:local-set comment-auto-fill-only-comments t)
918 (:hook #'prettify-symbols-mode)) 925 (:hook #'prettify-symbols-mode))
919 926
927(setup scheme
928 ;; I use CHICKEN
929 (:require +chicken)
930 (:with-mode scheme-mode
931 (:file-match (rx ".scm" eos)))
932 (setq scheme-mit-dialect nil
933 scheme-program-name (executable-find "csi")
934 scheme-default-implementation 'chicken)
935 ;; Scheme complete
936 (straight-use-package 'scheme-complete)
937 (autoload 'scheme-smart-complete "scheme-complete" nil t)
938 (with-eval-after-load 'scheme
939 (define-key scheme-mode-map (kbd "TAB") #'scheme-complete-or-indent))
940 (autoload 'scheme-get-current-symbol-info "scheme-complete" nil t)
941 (:local-set eldoc-documentation-function #'scheme-get-current-symbol-info
942 lisp-indent-function #'scheme-smart-indent-function)
943 (:hook #'eldoc-mode))
944
920(setup scratch 945(setup scratch
921 (:require +scratch) 946 (:require +scratch)
922 (:option initial-major-mode #'lisp-interaction-mode 947 (:option initial-major-mode #'lisp-interaction-mode
@@ -1064,7 +1089,14 @@
1064 1089
1065(setup (:straight apheleia) 1090(setup (:straight apheleia)
1066 (:require apheleia +apheleia) 1091 (:require apheleia +apheleia)
1067 (+apheleia/user-save-global-mode +1)) 1092 (+apheleia/user-save-global-mode +1)
1093 (add-to-list 'apheleia-formatters `(fmt . ("fmt"
1094 "-s" ; split long lines but don't refill
1095 "-u" ; one space words, two space sentences
1096 "-w" ; set width (fill-column)
1097 ,(number-to-string (floor (* fill-column 1.1)))
1098 "-g" ; goal width
1099 ,(number-to-string fill-column)))))
1068 1100
1069(setup (:straight avy) 1101(setup (:straight avy)
1070 (:require avy +avy) 1102 (:require avy +avy)
@@ -1555,10 +1587,11 @@
1555(setup (:straight editorconfig) 1587(setup (:straight editorconfig)
1556 (:with-mode conf-mode 1588 (:with-mode conf-mode
1557 (:file-match (rx ".editorconfig" eos))) 1589 (:file-match (rx ".editorconfig" eos)))
1558 (dolist (m '(emacs-lisp-mode 1590 (with-eval-after-load 'editorconfig
1559 lisp-mode 1591 (dolist (m '(emacs-lisp-mode
1560 scheme-mode)) 1592 lisp-mode
1561 (add-to-list 'editorconfig-exclude-modes m)) 1593 scheme-mode))
1594 (add-to-list 'editorconfig-exclude-modes m)))
1562 (editorconfig-mode +1)) 1595 (editorconfig-mode +1))
1563 1596
1564(setup (:straight electric-cursor) 1597(setup (:straight electric-cursor)
@@ -1644,6 +1677,12 @@
1644(setup (:straight elpher) 1677(setup (:straight elpher)
1645 (:bind "l" #'elpher-back)) 1678 (:bind "l" #'elpher-back))
1646 1679
1680(setup (:straight emacs-everywhere
1681 (cl-loop for prog in '("xclip" "xdotool" "xprop" "xwininfo")
1682 if (executable-find prog)
1683 return prog
1684 finally return nil)))
1685
1647(setup (:straight embark) 1686(setup (:straight embark)
1648 (:require embark 1687 (:require embark
1649 +embark) 1688 +embark)
@@ -1737,6 +1776,14 @@
1737 :repo "https://codeberg.org/acdw/filldent.el")) 1776 :repo "https://codeberg.org/acdw/filldent.el"))
1738 (:+key "M-q" #'filldent-unfill-toggle)) 1777 (:+key "M-q" #'filldent-unfill-toggle))
1739 1778
1779(setup (:straight (flymake-chicken
1780 :host github
1781 :repo "chicken-contrib/flymake-chicken"))
1782 (add-hook 'scheme-mode-hook (defun +flymake-chicken-init ()
1783 (add-hook 'flymake-diagnostic-functions
1784 #'flymake-chicken-backend
1785 nil t))))
1786
1740(setup (:straight (flymake-collection :host github 1787(setup (:straight (flymake-collection :host github
1741 :repo "mohkale/flymake-collection")) 1788 :repo "mohkale/flymake-collection"))
1742 (+ensure-after-init #'flymake-collection-hook-setup)) 1789 (+ensure-after-init #'flymake-collection-hook-setup))
@@ -1756,11 +1803,11 @@
1756 (add-hook 'modus-themes-after-load-theme-hook 1803 (add-hook 'modus-themes-after-load-theme-hook
1757 (defun focus-update@after-modus-load () 1804 (defun focus-update@after-modus-load ()
1758 (modus-themes-with-colors 1805 (modus-themes-with-colors
1759 (:face 'focus-unfocused `((t ( :foreground ,fg-inactive 1806 (:face 'focus-unfocused `((t ( :foreground ,fg-inactive
1760 :background ,bg-inactive 1807 :background ,bg-inactive
1761 :weight normal 1808 :weight normal
1762 :slant normal 1809 :slant normal
1763 :extend t))))))) 1810 :extend t)))))))
1764 ;; XXX: This doesn't work, because notmuch overlays shit on the buffer 1811 ;; XXX: This doesn't work, because notmuch overlays shit on the buffer
1765 (setf (alist-get 'notmuch-show-mode focus-mode-to-thing) 1812 (setf (alist-get 'notmuch-show-mode focus-mode-to-thing)
1766 'notmuch-message) 1813 'notmuch-message)
@@ -1781,24 +1828,31 @@
1781(setup (:straight (frowny :host nil 1828(setup (:straight (frowny :host nil
1782 :repo "https://codeberg.org/acdw/frowny.el")) 1829 :repo "https://codeberg.org/acdw/frowny.el"))
1783 (:option frowny-eyes (rx (any ":=") (opt "'") (? "-"))) 1830 (:option frowny-eyes (rx (any ":=") (opt "'") (? "-")))
1831 (add-to-list 'frowny-inhibit-modes 'vterm-mode)
1784 (global-frowny-mode +1)) 1832 (global-frowny-mode +1))
1785 1833
1786(setup (:straight (geiser 1834;; (setup (:straight (geiser
1787 :type git 1835;; :type git
1788 :flavor melpa 1836;; :flavor melpa
1789 :files ("elisp/*.el" "doc/*" "geiser-pkg.el") 1837;; :files ("elisp/*.el" "doc/*" "geiser-pkg.el")
1790 :pre-build ("make" "-Cdoc" "geiser.info") 1838;; :pre-build ("make" "-Cdoc" "geiser.info")
1791 :host gitlab 1839;; :host gitlab
1792 :repo "emacs-geiser/geiser")) 1840;; :repo "emacs-geiser/geiser"))
1793 (dolist (pkg '( geiser-chicken geiser-guile 1841;; (dolist (pkg '( geiser-chicken geiser-guile
1794 macrostep-geiser 1842;; macrostep-geiser
1795 scheme-complete)) 1843;; scheme-complete))
1796 (straight-use-package pkg)) 1844;; (straight-use-package pkg))
1797 (:require +chicken) 1845;; (:require +chicken)
1798 (:with-mode scheme-mode 1846;; (+chicken-indentation-insinuate)
1799 (:file-match (rx ".scm" eos))) 1847;; (:with-mode scheme-mode
1800 (setf (alist-get "\\.scm\\'" auto-insert-alist nil nil #'equal) 1848;; (:file-match (rx ".scm" eos)))
1801 '(insert "#!/bin/sh\n#| -*- scheme -*-\nexec csi -s $0 \"$@\"\n|#\n"))) 1849;; (setf (alist-get "\\.scm\\'" auto-insert-alist nil nil #'equal)
1850;; '(insert "#!/bin/sh\n#| -*- scheme -*-\nexec csi -s $0 \"$@\"\n|#\n"))
1851;; ;; (when-let ((scmfmt-exe (executable-find "scmfmt")))
1852;; ;; (with-eval-after-load 'apheleia
1853;; ;; (setf (alist-get 'scmfmt apheleia-formatters) (list scmfmt-exe))
1854;; ;; (setf (alist-get 'scheme-mode apheleia-mode-alist) 'scmfmt)))
1855;; )
1802 1856
1803(setup (:straight (ghelp :repo "https://github.com/casouri/ghelp")) 1857(setup (:straight (ghelp :repo "https://github.com/casouri/ghelp"))
1804 ;;; XXX: set this up! 1858 ;;; XXX: set this up!
@@ -1915,9 +1969,9 @@
1915 '(("\\( enters the room ([^)]+)\\| has left the chatroom\\)$") 1969 '(("\\( enters the room ([^)]+)\\| has left the chatroom\\)$")
1916 ("." . jabber-muc-presence-dim)) 1970 ("." . jabber-muc-presence-dim))
1917 jabber-muc-colorize-foreign nil ; doesn't match my color theme 1971 jabber-muc-colorize-foreign nil ; doesn't match my color theme
1918 jabber-groupchat-prompt-format "[%t] %n\n" 1972 jabber-groupchat-prompt-format "[%t] %n> "
1919 jabber-chat-local-prompt-format "[%t] %n\n" 1973 jabber-chat-local-prompt-format "[%t] %n> "
1920 jabber-chat-foreign-prompt-format "[%t] %n\n" 1974 jabber-chat-foreign-prompt-format "[%t] %n> "
1921 ;; jabber-chat-foreign-prompt-format 1975 ;; jabber-chat-foreign-prompt-format
1922 ;; (concat +jabber-pre-prompt 1976 ;; (concat +jabber-pre-prompt
1923 ;; "%n\n" 1977 ;; "%n\n"
@@ -1937,17 +1991,17 @@
1937 (add-hook 'modus-themes-after-load-theme-hook 1991 (add-hook 'modus-themes-after-load-theme-hook
1938 (defun jabber-chat@after-modus-themes-load () 1992 (defun jabber-chat@after-modus-themes-load ()
1939 (modus-themes-with-colors 1993 (modus-themes-with-colors
1940 (:face 'jabber-chat-prompt-foreign `((t (:foreground ,red))) 1994 (:face 'jabber-chat-prompt-foreign `((t (:foreground ,red)))
1941 'jabber-chat-prompt-local `((t (:foreground ,blue))) 1995 'jabber-chat-prompt-local `((t (:foreground ,blue)))
1942 'jabber-chat-prompt-system `((t (:foreground ,green))))) 1996 'jabber-chat-prompt-system `((t (:foreground ,green)))))
1943 (setq jabber-muc-nick-value (pcase (frame--current-backround-mode (selected-frame)) 1997 (setq jabber-muc-nick-value (pcase (frame--current-backround-mode (selected-frame))
1944 ('light 0.5) 1998 ('light 0.5)
1945 ('dark 1.0))) 1999 ('dark 1.0)))
1946 (+mapc-some-buffers #'+jabber-colors-update 2000 (+mapc-some-buffers #'+jabber-colors-update
1947 (lambda () (derived-mode-p 'jabber-chat-mode 2001 (lambda () (derived-mode-p 'jabber-chat-mode
1948 'jabber-roster-mode 2002 'jabber-roster-mode
1949 'jabber-activity-mode 2003 'jabber-activity-mode
1950 'jabber-browse-mode))))) 2004 'jabber-browse-mode)))))
1951 (dolist (mode '(jabber-chat-mode 2005 (dolist (mode '(jabber-chat-mode
1952 jabber-browse-mode 2006 jabber-browse-mode
1953 jabber-roster-mode 2007 jabber-roster-mode
@@ -2005,6 +2059,9 @@
2005 "M-w" #'link-hint-copy-link "w" #'link-hint-copy-link 2059 "M-w" #'link-hint-copy-link "w" #'link-hint-copy-link
2006 "M-c" #'+link-hint-open-chrome "c" #'+link-hint-open-chrome))) 2060 "M-c" #'+link-hint-open-chrome "c" #'+link-hint-open-chrome)))
2007 2061
2062(setup (:straight lua-mode)
2063 (:file-match (rx ".lua" eos)))
2064
2008(setup (:straight (machine 2065(setup (:straight (machine
2009 :host nil 2066 :host nil
2010 :repo "https://codeberg.org/acdw/machine.el")) 2067 :repo "https://codeberg.org/acdw/machine.el"))
@@ -2113,60 +2170,60 @@
2113 "Set up mdous-themes to be mostly monochrome." 2170 "Set up mdous-themes to be mostly monochrome."
2114 ;; Major mode in the mode-line 2171 ;; Major mode in the mode-line
2115 (modus-themes-with-colors 2172 (modus-themes-with-colors
2116 (custom-set-faces 2173 (custom-set-faces
2117 `(font-lock-builtin-face 2174 `(font-lock-builtin-face
2118 ((,class :inherit modus-themes-bold 2175 ((,class :inherit modus-themes-bold
2119 :foreground unspecified))) 2176 :foreground unspecified)))
2120 `(font-lock-comment-face 2177 `(font-lock-comment-face
2121 ((,class :inherit default 2178 ((,class :inherit default
2122 :slant normal 2179 :slant normal
2123 :height 1.0 2180 :height 1.0
2124 :foreground ,fg-comment-yellow))) 2181 :foreground ,fg-comment-yellow)))
2125 `(font-lock-comment-delimiter-face 2182 `(font-lock-comment-delimiter-face
2126 ((,class :inherit fixed-pitch 2183 ((,class :inherit fixed-pitch
2127 :foreground ,fg-comment-yellow))) 2184 :foreground ,fg-comment-yellow)))
2128 `(font-lock-constant-face 2185 `(font-lock-constant-face
2129 ((,class :inherit underline 2186 ((,class :inherit underline
2130 :foreground unspecified))) 2187 :foreground unspecified)))
2131 `(font-lock-doc-face 2188 `(font-lock-doc-face
2132 ((,class :inherit modus-themes-slant 2189 ((,class :inherit modus-themes-slant
2133 :foreground ,fg-docstring))) 2190 :foreground ,fg-docstring)))
2134 `(font-lock-function-name-face 2191 `(font-lock-function-name-face
2135 ((,class :foreground unspecified 2192 ((,class :foreground unspecified
2136 :slant italic))) 2193 :slant italic)))
2137 `(font-lock-keyword-face 2194 `(font-lock-keyword-face
2138 ((,class :inherit modus-themes-bold 2195 ((,class :inherit modus-themes-bold
2139 :foreground unspecified))) 2196 :foreground unspecified)))
2140 `(font-lock-negation-char-face 2197 `(font-lock-negation-char-face
2141 ((,class :inherit modus-themes-bold 2198 ((,class :inherit modus-themes-bold
2142 :foreground unspecified))) 2199 :foreground unspecified)))
2143 `(font-lock-preprocessor-face 2200 `(font-lock-preprocessor-face
2144 ((,class :foreground unspecified))) 2201 ((,class :foreground unspecified)))
2145 `(font-lock-regexp-grouping-backslash 2202 `(font-lock-regexp-grouping-backslash
2146 ((,class :foreground ,fg-escape-char-backslash))) 2203 ((,class :foreground ,fg-escape-char-backslash)))
2147 `(font-lock-regexp-grouping-construct 2204 `(font-lock-regexp-grouping-construct
2148 ((,class :foreground ,fg-escape-char-construct))) 2205 ((,class :foreground ,fg-escape-char-construct)))
2149 `(font-lock-string-face 2206 `(font-lock-string-face
2150 ((,class :foreground ,fg-special-warm))) 2207 ((,class :foreground ,fg-special-warm)))
2151 `(font-lock-type-face 2208 `(font-lock-type-face
2152 ((,class :inherit modus-themes-bold 2209 ((,class :inherit modus-themes-bold
2153 :foreground unspecified))) 2210 :foreground unspecified)))
2154 `(font-lock-variable-name-face 2211 `(font-lock-variable-name-face
2155 ((,class :foreground unspecified))) 2212 ((,class :foreground unspecified)))
2156 `(font-lock-warning-face 2213 `(font-lock-warning-face
2157 ((,class :inherit modus-themes-bold 2214 ((,class :inherit modus-themes-bold
2158 :foreground ,red-nuanced-fg))) 2215 :foreground ,red-nuanced-fg)))
2159 `(font-lock-todo-face 2216 `(font-lock-todo-face
2160 ((,class :inherit font-lock-comment-face 2217 ((,class :inherit font-lock-comment-face
2161 :foreground ,fg-header 2218 :foreground ,fg-header
2162 :background ,yellow-intense-bg))) 2219 :background ,yellow-intense-bg)))
2163 ;; `(mode-line 2220 ;; `(mode-line
2164 ;; ((,class :height 100))) 2221 ;; ((,class :height 100)))
2165 ;; `(mode-line-inactive 2222 ;; `(mode-line-inactive
2166 ;; ((,class :height 100))) 2223 ;; ((,class :height 100)))
2167 ;; `(tab-bar 2224 ;; `(tab-bar
2168 ;; ((,class :height 100))) 2225 ;; ((,class :height 100)))
2169 )))) 2226 ))))
2170 2227
2171 (require 'dawn) 2228 (require 'dawn)
2172 (dawn-schedule #'modus-themes-load-operandi 2229 (dawn-schedule #'modus-themes-load-operandi
@@ -2214,8 +2271,8 @@
2214 (add-hook 'modus-themes-after-load-theme-hook 2271 (add-hook 'modus-themes-after-load-theme-hook
2215 (defun +nyan-modus-update-colors () 2272 (defun +nyan-modus-update-colors ()
2216 (modus-themes-with-colors 2273 (modus-themes-with-colors
2217 (set-face-attribute '+nyan-mode-line nil 2274 (set-face-attribute '+nyan-mode-line nil
2218 :background bg-special-warm)))) 2275 :background bg-special-warm))))
2219 (+nyan-modus-update-colors)) 2276 (+nyan-modus-update-colors))
2220 (+nyan-mode +1)) 2277 (+nyan-mode +1))
2221 2278
@@ -2402,7 +2459,7 @@
2402 '(+modeline-track 2459 '(+modeline-track
2403 simple-modeline-segment-misc-info)))) 2460 simple-modeline-segment-misc-info))))
2404 (lambda () (when (featurep 'dired-rsync) 2461 (lambda () (when (featurep 'dired-rsync)
2405 dired-rsync-modeline-status)) 2462 dired-rsync-modeline-status))
2406 ,(+modeline-concat 2463 ,(+modeline-concat
2407 '(+modeline-god-mode 2464 '(+modeline-god-mode
2408 +modeline-kmacro-indicator 2465 +modeline-kmacro-indicator
@@ -2433,19 +2490,21 @@
2433 (alert-add-rule :category "slack" 2490 (alert-add-rule :category "slack"
2434 :style 'ignore))) 2491 :style 'ignore)))
2435 2492
2436(setup (:straight sly 2493;; (setup (:straight sly
2437 (defvar +lisp-bin (executable-find "sbcl"))) 2494;; (defvar +lisp-bin (executable-find "sbcl")))
2438 (:also-load sly-autoloads 2495;; (:also-load sly-autoloads
2439 +sly) 2496;; +sly)
2440 (:option inferior-lisp-program +lisp-bin 2497;; (:option inferior-lisp-program +lisp-bin
2441 sly-kill-without-query-p t 2498;; sly-kill-without-query-p t
2442 sly-command-switch-to-existing-lisp t) 2499;; sly-command-switch-to-existing-lisp t)
2443 (:with-mode lisp-mode 2500;; (:with-mode lisp-mode
2444 (:bind "C-c C-z" #'sly-mrepl)) 2501;; (:bind "C-c C-z" #'sly-mrepl))
2445 (:with-feature sly-mrepl 2502;; (:with-feature sly-mrepl
2446 (dolist (key '("RET" "<return>")) 2503;; (dolist (key '("RET" "<return>"))
2447 (:bind key #'sly-mrepl-return-at-end)) 2504;; (:bind key #'sly-mrepl-return-at-end))
2448 (:bind "C-c C-c" #'sly-mrepl-return))) 2505;; (:bind "C-c C-c" #'sly-mrepl-return)))
2506
2507(setup (:straight slime))
2449 2508
2450(setup (:straight smartscan) 2509(setup (:straight smartscan)
2451 (:with-map smartscan-map 2510 (:with-map smartscan-map
@@ -2461,9 +2520,9 @@
2461 #'describe-gnu-project 2520 #'describe-gnu-project
2462 #'suspend-frame) 2521 #'suspend-frame)
2463 (sophomore-disable-with 'confirm 2522 (sophomore-disable-with 'confirm
2464 #'save-buffers-kill-terminal) 2523 #'save-buffers-kill-terminal)
2465 (sophomore-disable-with 'confirm-y 2524 (sophomore-disable-with 'confirm-y
2466 #'+save-buffers-quit) 2525 #'+save-buffers-quit)
2467 (sophomore-mode +1)) 2526 (sophomore-mode +1))
2468 2527
2469(setup (:straight (spongebob-case 2528(setup (:straight (spongebob-case
@@ -2609,8 +2668,7 @@
2609 2668
2610(setup (:straight vterm 2669(setup (:straight vterm
2611 (and module-file-suffix 2670 (and module-file-suffix
2612 (executable-find "cmake")) 2671 (executable-find "cmake")))
2613 :quit)
2614 (:also-load +vterm) 2672 (:also-load +vterm)
2615 (:option vterm-always-compile-module t 2673 (:option vterm-always-compile-module t
2616 vterm-buffer-name-string "vterm: %s" 2674 vterm-buffer-name-string "vterm: %s"
diff --git a/lisp/+chicken.el b/lisp/+chicken.el index 55fc48e..15713f8 100644 --- a/lisp/+chicken.el +++ b/lisp/+chicken.el
@@ -18,5 +18,17 @@
18 "awful" "--development-mode" (buffer-file-name)))) 18 "awful" "--development-mode" (buffer-file-name))))
19 (t (message "Some awful error occurred!")))) 19 (t (message "Some awful error occurred!"))))
20 20
21(defun +chicken-indentation-insinuate ()
22 "Insinuate indentation from
23https://wiki.call-cc.org/emacs#tweaking-stock-scheme-mode-indentation."
24 (defun scheme-module-indent (state indent-point normal-indent) 0)
25 (put 'module 'scheme-indent-function 'scheme-module-indent)
26 (put 'and-let* 'scheme-indent-function 1)
27 (put 'parameterize 'scheme-indent-function 1)
28 (put 'handle-exceptions 'scheme-indent-function 1)
29 (put 'when 'scheme-indent-function 1)
30 (put 'unless 'scheme-indent-function 1)
31 (put 'match 'scheme-indent-function 1))
32
21(provide '+chicken) 33(provide '+chicken)
22;;; +chicken.el ends here 34;;; +chicken.el ends here
diff --git a/lisp/+emacs.el b/lisp/+emacs.el index b69d1a0..9158b62 100644 --- a/lisp/+emacs.el +++ b/lisp/+emacs.el
@@ -316,8 +316,9 @@ ARG is passed to `backward-kill-word'."
316 316
317(defun +save-some-buffers-p () 317(defun +save-some-buffers-p ()
318 "Predicate for `save-some-buffers-default-predicate'. 318 "Predicate for `save-some-buffers-default-predicate'.
319It returns nil with remote files." 319It returns nil with remote files and those without attached files."
320 (not (file-remote-p (buffer-file-name)))) 320 (and (buffer-file-name)
321 (not (file-remote-p (buffer-file-name)))))
321 322
322;; https://www.wwwtech.de/articles/2013/may/emacs:-jump-to-matching-paren-beginning-of-block 323;; https://www.wwwtech.de/articles/2013/may/emacs:-jump-to-matching-paren-beginning-of-block
323(defun +goto-matching-paren (&optional arg) 324(defun +goto-matching-paren (&optional arg)
@@ -333,6 +334,14 @@ It returns nil with remote files."
333 ((looking-back "[\[\(\{]" 1) (backward-char) (forward-sexp arg)) 334 ((looking-back "[\[\(\{]" 1) (backward-char) (forward-sexp arg))
334 (t (up-list arg t t)))) 335 (t (up-list arg t t))))
335 336
337(defun +delete-window-or-bury-buffer ()
338 "Delete the current window, or bury the current buffer.
339If the current window is the only window, bury the buffer."
340 (interactive)
341 (condition-case e
342 (delete-window)
343 (t (bury-buffer))))
344
336 345
337;;; Bindings 346;;; Bindings
338 347
@@ -348,6 +357,7 @@ It returns nil with remote files."
348(global-set-key (kbd "C-x 4 n") #'clone-buffer) 357(global-set-key (kbd "C-x 4 n") #'clone-buffer)
349;; https://christiantietze.de/posts/2022/07/shift-click-in-emacs-to-select/ 358;; https://christiantietze.de/posts/2022/07/shift-click-in-emacs-to-select/
350(global-set-key (kbd "S-<down-mouse-1>") #'mouse-set-mark) 359(global-set-key (kbd "S-<down-mouse-1>") #'mouse-set-mark)
360(global-set-key (kbd "C-x 0") #'+delete-window-or-bury-buffer)
351 361
352 362
353;;; Required libraries 363;;; Required libraries
diff --git a/lisp/+org.el b/lisp/+org.el index 2557671..dc0ce1b 100644 --- a/lisp/+org.el +++ b/lisp/+org.el
@@ -343,6 +343,7 @@ Return as a list."
343 (+org-unsmartify) 343 (+org-unsmartify)
344 (+org-fix-blank-lines t) 344 (+org-fix-blank-lines t)
345 (org-align-tags t) 345 (org-align-tags t)
346 (org-hide-drawer-all)
346 (when (buffer-narrowed-p) 347 (when (buffer-narrowed-p)
347 (goto-char (point-min)) 348 (goto-char (point-min))
348 (forward-line 1) 349 (forward-line 1)
@@ -731,39 +732,48 @@ When called with a prefix ARG, will still unconditionally call
731 732
732 733
733;;; move org archives to a dedicated file 734;;; move org archives to a dedicated file
734(defun +org-archive-monthwise (archive-file) 735;; (defun +org-archive-monthwise (archive-file)
735 (if (file-exists-p archive-file) 736;; (if (file-exists-p archive-file)
736 (with-current-buffer (find-file-noselect archive-file) 737;; (with-current-buffer (find-file-noselect archive-file)
737 (let ((dir (file-name-directory (file-truename archive-file))) 738;; (let ((dir (file-name-directory (file-truename archive-file)))
738 (prog (make-progress-reporter (format "Archiving from %s..." archive-file))) 739;; (prog (make-progress-reporter (format "Archiving from %s..." archive-file)))
739 (keep-going t)) 740;; (keep-going t))
740 (goto-char (point-min)) 741;; (goto-char (point-min))
741 (while keep-going 742;; (while keep-going
742 (when-let* ((time (or (org-entry-get (point) "ARCHIVE_TIME") 743;; (when-let* ((time (or (org-entry-get (point) "ARCHIVE_TIME")
743 (org-get-deadline-time (point)))) 744;; (org-get-deadline-time (point))))
744 (parsed-time (and time 745;; (parsed-time (and time
745 (org-parse-time-string time))) 746;; (org-parse-time-string time)))
746 (refile-target (format "%s%02d-%02d.org" 747;; (refile-target (format "%s%02d-%02d.org"
747 dir 748;; dir
748 (decoded-time-year parsed-time) 749;; (decoded-time-year parsed-time)
749 (decoded-time-month parsed-time))) 750;; (decoded-time-month parsed-time)))
750 (title-str (format "#+title: Archive for %02d-%02d (%s)\n\n" 751;; (title-str (format "#+title: Archive for %02d-%02d (%s)\n\n"
751 (decoded-time-year parsed-time) 752;; (decoded-time-year parsed-time)
752 (decoded-time-month parsed-time) 753;; (decoded-time-month parsed-time)
753 (file-truename archive-file)))) 754;; (file-truename archive-file))))
754 (unless (file-exists-p refile-target) 755;; (unless (file-exists-p refile-target)
755 (with-current-buffer (find-file-noselect refile-target) 756;; (with-current-buffer (find-file-noselect refile-target)
756 (insert title-str) 757;; (insert title-str)
757 (save-buffer))) 758;; (save-buffer)))
758 (org-refile nil nil (list "" 759;; (org-refile nil nil (list ""
759 refile-target 760;; refile-target
760 nil 761;; nil
761 0))) 762;; 0)))
762 (progress-reporter-update prog) 763;; (progress-reporter-update prog)
763 (org-next-visible-heading 1) 764;; (org-next-visible-heading 1)
764 (when (>= (point) (point-max)) 765;; (when (>= (point) (point-max))
765 (setq keep-going nil))))) 766;; (setq keep-going nil)))))
766 (message "Archive file %s does not exist!" archive-file))) 767;; (message "Archive file %s does not exist!" archive-file)))
768
769
770;;; +org-toggle-view-emphasis
771;; I thought this function was already written somewhere...
772(defun +org-toggle-view-emphasis ()
773 "Toggle `org-hide-emphasis-markers' and redraw the buffer."
774 (interactive)
775 (setq-local org-hide-emphasis-markers (not org-hide-emphasis-markers))
776 (font-lock-update))
767 777
768 778
769;;; el-patch 779;;; el-patch
diff --git a/machines/bob.el b/machines/bob.el index 7c1a16d..a408e5c 100644 --- a/machines/bob.el +++ b/machines/bob.el
@@ -16,7 +16,10 @@
16 :courier ("Courier Prime Code" "Courier Prime") 16 :courier ("Courier Prime Code" "Courier Prime")
17 :gaegu (("Gaegu" 140) "Gaegu") ; no italic 17 :gaegu (("Gaegu" 140) "Gaegu") ; no italic
18 :comic (("Comic Code" 100) "Comic Code") 18 :comic (("Comic Code" 100) "Comic Code")
19 :go/comic (("Go Mono" 100) ("Comic Code" 100)) 19 :comic/fantasque (("Comic Code" 100) "Fantasque Sans Mono")
20 :terminus (("Terminus (TTF)" 120) "Terminus (TTF)")
21 :cmu (("CMU Typewriter Text" 160) "CMU Concrete")
22 :apl (("APL386 Unicode" 120) "Comic Code")
20 ) 23 )
21 "A plist of possible font combinations.") 24 "A plist of possible font combinations.")
22 25