about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el157
-rw-r--r--lisp/+consult.el2
-rw-r--r--lisp/+elfeed.el8
-rw-r--r--lisp/+modeline.el13
-rw-r--r--lisp/acdw.el12
-rw-r--r--lisp/user-save.el18
-rw-r--r--machines/bob.el34
-rw-r--r--snippets/org-mode/sc2
8 files changed, 164 insertions, 82 deletions
diff --git a/init.el b/init.el index 5e52215..e032819 100644 --- a/init.el +++ b/init.el
@@ -117,12 +117,18 @@
117 (add-hook 'user-save-hook #'+clean-empty-lines) 117 (add-hook 'user-save-hook #'+clean-empty-lines)
118 (user-save-global-mode +1)) 118 (user-save-global-mode +1))
119 119
120(setup (:require winner)
121 (winner-mode +1))
122
120(setup +key 123(setup +key
121 (+ensure-after-init #'+key-global-mode)) 124 (+ensure-after-init #'+key-global-mode))
122 125
123(setup abbrev 126(setup abbrev
124 (:option abbrev-file-name (sync/ "abbrev.el") 127 (:option abbrev-file-name (sync/ "abbrev.el")
125 save-abbrevs 'silent) 128 save-abbrevs 'silent)
129(with-eval-after-load 'user-save
130 (:with-mode edit-abbrevs-mode
131 (:hook #'turn-off-user-save-mode)))
126 (:hook-into text-mode 132 (:hook-into text-mode
127 circe-chat-mode)) 133 circe-chat-mode))
128 134
@@ -177,42 +183,41 @@
177 (add-to-list '+browse-url-secondary-browser-regexps 183 (add-to-list '+browse-url-secondary-browser-regexps
178 (replace-regexp-in-string "\\." "\\\\." domain))) 184 (replace-regexp-in-string "\\." "\\\\." domain)))
179 ;; Set up URL handlers. 185 ;; Set up URL handlers.
180 (with-eval-after-load 'org-contacts 186 (require 'chd)
181 (require 'chd) 187 (+browse-url-set-handlers
182 (+browse-url-set-handlers 188 (list
183 (list 189 (cons (rx ; images
184 (cons (rx ; images 190 "." (or "jpeg" "jpg" "png" "bmp") eos)
185 "." (or "jpeg" "jpg" "png" "bmp") eos) 191 (lambda (&rest args)
186 (lambda (&rest args) 192 (apply
187 (apply 193 (cond ((executable-find "mpv") #'+browse-image-with-mpv)
188 (cond ((executable-find "mpv") #'+browse-image-with-mpv) 194 (t #'eww-browse-url))
189 (t #'eww-browse-url)) 195 args)))
190 args))) 196 (cons (rx (or ;; videos
191 (cons (rx (or ;; videos 197 "youtube.com" "youtu.be" "invidious" "yewtu.be"
192 "youtube.com" "youtu.be" "invidious" "yewtu.be" 198 (seq "." (or "mp4" "gif" "mov" "MOV" "webm") eos)
193 (seq "." (or "mp4" "gif" "mov" "MOV" "webm") eos) 199 ;; music
194 ;; music 200 "soundcloud.com" "bandcamp.com"
195 "soundcloud.com" "bandcamp.com" 201 (seq "." (or "ogg" "mp3" "opus" "m4a") eos)))
196 (seq "." (or "ogg" "mp3" "opus" "m4a") eos))) 202 (lambda (&rest args)
197 (lambda (&rest args) 203 (apply (if (executable-find "mpv")
198 (apply (if (executable-find "mpv") 204 #'+browse-url-with-mpv
199 #'+browse-url-with-mpv 205 browse-url-secondary-browser-function)
200 browse-url-secondary-browser-function) 206 args)))
201 args))) 207 (cons chd/url-regexps #'browse-url-chrome)
202 (cons chd/url-regexps #'browse-url-chrome) 208 (cons (+browse-url-secondary-browser-regexps-combine) ; non-text websites
203 (cons (+browse-url-secondary-browser-regexps-combine) ; non-text websites 209 (lambda (&rest args)
204 (lambda (&rest args) 210 (apply browse-url-secondary-browser-function args)))
205 (apply browse-url-secondary-browser-function args))) 211 (cons "xkcd\\.com"
206 (cons "xkcd\\.com" 212 (lambda (&rest args)
207 (lambda (&rest args) 213 (apply (if (fboundp #'xkcd-get)
208 (apply (if (fboundp #'xkcd-get) 214 (progn (require '+xkcd)
209 (progn (require '+xkcd) 215 #'+xkcd-get-from-url)
210 #'+xkcd-get-from-url) 216 +browse-url-browser-function)
211 +browse-url-browser-function) 217 args)))
212 args))) 218 (cons "." ; everything else
213 (cons "." ; everything else 219 (lambda (&rest args)
214 (lambda (&rest args) 220 (apply +browse-url-browser-function args)))))
215 (apply +browse-url-browser-function args))))))
216 ;; Transform URLs before passing to `browse-url' 221 ;; Transform URLs before passing to `browse-url'
217 (:option +browse-url-transformations `((,(rx (or "youtube.com" 222 (:option +browse-url-transformations `((,(rx (or "youtube.com"
218 "youtu.be")) 223 "youtu.be"))
@@ -472,7 +477,8 @@
472 (:option notmuch-init-file (notmuch/ "notmuch-init.el" t) 477 (:option notmuch-init-file (notmuch/ "notmuch-init.el" t)
473 notmuch-address-save-filename (notmuch/ "addresses" t) 478 notmuch-address-save-filename (notmuch/ "addresses" t)
474 notmuch-address-use-company (featurep 'company) 479 notmuch-address-use-company (featurep 'company)
475 notmuch-search-oldest-first nil) 480 notmuch-search-oldest-first nil
481 notmuch-archive-tags '("-inbox" "-unread"))
476 ;; Composing mail 482 ;; Composing mail
477 (:option message-kill-buffer-on-exit t 483 (:option message-kill-buffer-on-exit t
478 message-auto-save-directory "~/var/mail/drafts") 484 message-auto-save-directory "~/var/mail/drafts")
@@ -554,6 +560,9 @@
554 ("+" . "-")) 560 ("+" . "-"))
555 org-log-done 'time 561 org-log-done 'time
556 org-log-into-drawer t 562 org-log-into-drawer t
563 org-num-skip-commented t
564 org-num-skip-unnumbered t
565 org-num-skip-footnotes t
557 org-outline-path-complete-in-steps nil 566 org-outline-path-complete-in-steps nil
558 org-pretty-entities t 567 org-pretty-entities t
559 org-pretty-entities-include-sub-superscripts nil 568 org-pretty-entities-include-sub-superscripts nil
@@ -573,6 +582,7 @@
573 (sequence "|" "CANCELED(k@)") 582 (sequence "|" "CANCELED(k@)")
574 (sequence "MEETING(m)") 583 (sequence "MEETING(m)")
575 (sequence "ASSIGNED(a@/!)" "REVIEW(r)" "|" "DONE(d!)")) 584 (sequence "ASSIGNED(a@/!)" "REVIEW(r)" "|" "DONE(d!)"))
585 org-use-speed-commands t
576 org-emphasis-alist '(("*" org-bold) 586 org-emphasis-alist '(("*" org-bold)
577 ("/" org-italic) 587 ("/" org-italic)
578 ("_" org-underline) 588 ("_" org-underline)
@@ -612,9 +622,9 @@
612 ;; complains about "Invalid face reference: t" in org-mode buffers, because 622 ;; complains about "Invalid face reference: t" in org-mode buffers, because
613 ;; `compose-region' returns t. 623 ;; `compose-region' returns t.
614 ("^ *\\([-]\\) " 624 ("^ *\\([-]\\) "
615 (0 (progn (compose-region (match-beginning 1) (match-end 1) "โˆ™") 'default))) 625 (0 (progn (compose-region (match-beginning 1) (match-end 1) "โ€บ") 'default)))
616 ("^ *\\([+]\\) " 626 ("^ *\\([+]\\) "
617 (0 (progn (compose-region (match-beginning 1) (match-end 1) "โ—ฆ") 'default))))) 627 (0 (progn (compose-region (match-beginning 1) (match-end 1) "ยป") 'default)))))
618 (with-eval-after-load 'form-feed 628 (with-eval-after-load 'form-feed
619 ;; Horizontal lines 629 ;; Horizontal lines
620 (font-lock-add-keywords 630 (font-lock-add-keywords
@@ -715,6 +725,13 @@
715 (with-eval-after-load 'user-save 725 (with-eval-after-load 'user-save
716 (advice-add 'org-export-dispatch :before 'user-save-run-hooks))) 726 (advice-add 'org-export-dispatch :before 'user-save-run-hooks)))
717 727
728(setup org-id
729 (:load-after org)
730 ;; https://helpdeskheadesk.net/2022-03-13/
731 (:option org-id-method 'ts
732 org-attach-id-to-path-function-list '(org-attach-id-ts-folder-format
733 org-attach-id-uuid-folder-format)))
734
718(setup password-cache 735(setup password-cache
719 (:option password-cache t 736 (:option password-cache t
720 password-cache-expiry (* 60 60))) 737 password-cache-expiry (* 60 60)))
@@ -746,8 +763,9 @@
746 tab-bar-tab-name-ellipsis truncate-string-ellipsis 763 tab-bar-tab-name-ellipsis truncate-string-ellipsis
747 tab-bar-show t 764 tab-bar-show t
748 tab-bar-close-button-show t 765 tab-bar-close-button-show t
749 +tab-bar-menu-bar-icon " โ˜ฐ " 766 tab-bar-new-button-show nil
750 tab-bar-close-button (propertize " ยฌ " 767 +tab-bar-menu-bar-icon " ; "
768 tab-bar-close-button (propertize "(x)"
751 'display t 769 'display t
752 'close-tab t) 770 'close-tab t)
753 tab-bar-new-button (propertize "+ " 'display t)) 771 tab-bar-new-button (propertize "+ " 'display t))
@@ -755,7 +773,7 @@
755 (:option display-time-format "%H:%M" 773 (:option display-time-format "%H:%M"
756 display-time-mail-file :disable 774 display-time-mail-file :disable
757 display-time-load-average-threshold 50) 775 display-time-load-average-threshold 50)
758 (:option tab-bar-format '(+tab-bar-format-menu-bar 776 (:option tab-bar-format '(;;+tab-bar-format-menu-bar
759 tab-bar-format-history 777 tab-bar-format-history
760 tab-bar-format-tabs 778 tab-bar-format-tabs
761 tab-bar-separator 779 tab-bar-separator
@@ -821,7 +839,7 @@ They are completed by \"M-x TAB\" only in Tramp debug buffers."
821 (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input _type) 839 (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input _type)
822 (setq input (orderless-pattern-compiler input)) 840 (setq input (orderless-pattern-compiler input))
823 (cons input (lambda (str) (orderless--highlight input str))))) 841 (cons input (lambda (str) (orderless--highlight input str)))))
824 (with-eval-after-load 'affe 842 (+with-eval-after-loads (affe vertico-multiform)
825 (setf (alist-get 'affe-grep vertico-multiform-commands) '(buffer) 843 (setf (alist-get 'affe-grep vertico-multiform-commands) '(buffer)
826 (alist-get 'affe-find vertico-multiform-commands) '(buffer)) 844 (alist-get 'affe-find vertico-multiform-commands) '(buffer))
827 (:+key "M-s g" #'affe-grep 845 (:+key "M-s g" #'affe-grep
@@ -926,7 +944,7 @@ They are completed by \"M-x TAB\" only in Tramp debug buffers."
926 '(cape-file 944 '(cape-file
927 cape-dabbrev 945 cape-dabbrev
928 cape-keyword 946 cape-keyword
929 cape-abbrev 947 ;;cape-abbrev
930 cape-ispell 948 cape-ispell
931 ;;cape-dict 949 ;;cape-dict
932 )) 950 ))
@@ -1100,6 +1118,11 @@ They are completed by \"M-x TAB\" only in Tramp debug buffers."
1100 1118
1101 (:with-mode tracking-mode 1119 (:with-mode tracking-mode
1102 (:option tracking-position 'before-modes) 1120 (:option tracking-position 'before-modes)
1121 (:bind "C-c C-SPC" (lambda () (interactive)
1122 (if (and (fboundp 'org-clocking-p)
1123 (org-clocking-p))
1124 (message "Bro, get back to work!")
1125 (call-interactively #'tracking-next-buffer))))
1103 (add-to-list 'mode-line-misc-info 1126 (add-to-list 'mode-line-misc-info
1104 '(tracking-mode 1127 '(tracking-mode
1105 tracking-mode-line-buffers))) 1128 tracking-mode-line-buffers)))
@@ -1122,7 +1145,7 @@ They are completed by \"M-x TAB\" only in Tramp debug buffers."
1122(setup (:straight clhs)) 1145(setup (:straight clhs))
1123 1146
1124(setup (:straight consult) 1147(setup (:straight consult)
1125 (:also-load +consult) 1148 (:require consult +consult)
1126 ;; from Consult wiki 1149 ;; from Consult wiki
1127 (:option register-preview-delay 0 1150 (:option register-preview-delay 0
1128 register-preview-function #'consult-register-format 1151 register-preview-function #'consult-register-format
@@ -1352,7 +1375,8 @@ See also `crux-reopen-as-root-mode'."
1352 (:with-mode elfeed-search-mode 1375 (:with-mode elfeed-search-mode
1353 (:bind "&" #'+elfeed-search-browse-generic 1376 (:bind "&" #'+elfeed-search-browse-generic
1354 "w" #'elfeed-search-yank 1377 "w" #'elfeed-search-yank
1355 "y" nil) 1378 "y" nil
1379 "a" #'+elfeed-show-mark-read-and-advance)
1356 (:hook #'hl-line-mode) 1380 (:hook #'hl-line-mode)
1357 ;; https://old.reddit.com/r/emacs/comments/rlli0u/whats_your_favorite_defadvice/hphfh4e/ 1381 ;; https://old.reddit.com/r/emacs/comments/rlli0u/whats_your_favorite_defadvice/hphfh4e/
1358 (advice-add #'elfeed-search-update--force :after #'elfeed-db-save) 1382 (advice-add #'elfeed-search-update--force :after #'elfeed-db-save)
@@ -1367,7 +1391,8 @@ See also `crux-reopen-as-root-mode'."
1367 (:hook #'reading-mode) 1391 (:hook #'reading-mode)
1368 (:option +elfeed--update-repeat (* 60 30) ; 1/2 hour 1392 (:option +elfeed--update-repeat (* 60 30) ; 1/2 hour
1369 +elfeed--update-first-time 60)) 1393 +elfeed--update-first-time 60))
1370 (+elfeed-update-async-mode +1)) 1394 (+elfeed-update-async-mode -1) ; It really messes with stuff for work
1395 )
1371 1396
1372(setup (:straight elfeed-org) 1397(setup (:straight elfeed-org)
1373 (:also-load +org-capture) 1398 (:also-load +org-capture)
@@ -1735,9 +1760,9 @@ See also `crux-reopen-as-root-mode'."
1735 (require 'modus-themes (.etc "straight/build/modus-themes/modus-themes")) 1760 (require 'modus-themes (.etc "straight/build/modus-themes/modus-themes"))
1736 (:also-load dawn) 1761 (:also-load dawn)
1737 (:option modus-themes-mixed-fonts t 1762 (:option modus-themes-mixed-fonts t
1738 modus-themes-bold-constructs t 1763 modus-themes-bold-constructs nil
1739 modus-themes-italic-constructs t 1764 modus-themes-italic-constructs t
1740 modus-themes-headings '((t . (background)))) 1765 modus-themes-headings '((t . (background regular rainbow))))
1741 (dotimes (facen-1 8) 1766 (dotimes (facen-1 8)
1742 (let ((facen (1+ facen-1))) 1767 (let ((facen (1+ facen-1)))
1743 (custom-set-faces 1768 (custom-set-faces
@@ -1746,6 +1771,8 @@ See also `crux-reopen-as-root-mode'."
1746 (,(intern (format "modus-themes-heading-%s" facen)) 1771 (,(intern (format "modus-themes-heading-%s" facen))
1747 fixed-pitch)) 1772 fixed-pitch))
1748 :now))))) 1773 :now)))))
1774 (:face modus-themes-tab-active ((t :bold nil))
1775 modus-themes-tab-inactive ((t :italic t)))
1749 (dawn-schedule #'modus-themes-load-operandi 1776 (dawn-schedule #'modus-themes-load-operandi
1750 #'modus-themes-load-vivendi)) 1777 #'modus-themes-load-vivendi))
1751 1778
@@ -1862,6 +1889,9 @@ See also `crux-reopen-as-root-mode'."
1862 lisp-interaction-mode 1889 lisp-interaction-mode
1863 scheme-mode)) 1890 scheme-mode))
1864 1891
1892(setup (:straight pdf-tools)
1893 (pdf-tools-install))
1894
1865;; (setup (:straight-when pdf-tools 1895;; (setup (:straight-when pdf-tools
1866;; ;; Ensure we can build `pdf-tools' 1896;; ;; Ensure we can build `pdf-tools'
1867;; (or (executable-find "gcc") 1897;; (or (executable-find "gcc")
@@ -1905,11 +1935,17 @@ See also `crux-reopen-as-root-mode'."
1905 :host github :repo "gexplorer/simple-modeline" 1935 :host github :repo "gexplorer/simple-modeline"
1906 :fork (:host github :repo "duckwork/simple-modeline"))) 1936 :fork (:host github :repo "duckwork/simple-modeline")))
1907 (:require +modeline) 1937 (:require +modeline)
1908 (:option +modeline-modified-icon-alist '((ephemeral . "๐Ÿฅž") 1938 (:option +modeline-modified-icon-alist '((ephemeral . "~")
1909 (special . "๐Ÿฅ") 1939 (special . "*")
1910 (readonly . "๐Ÿฆž") 1940 (readonly . "=")
1911 (modified . "๐Ÿฅช") 1941 (modified . "+")
1912 (t . "๐Ÿž")) 1942 (t . "-"))
1943 ;; '((ephemeral . "๐Ÿฅž")
1944 ;; (special . "๐Ÿฅ")
1945 ;; (readonly . "๐Ÿฆž")
1946 ;; (modified . "๐Ÿฅช")
1947 ;; (t . "๐Ÿž"))
1948
1913 +modeline-minions-icon ";" 1949 +modeline-minions-icon ";"
1914 simple-modeline-segments 1950 simple-modeline-segments
1915 `(( ; left 1951 `(( ; left
@@ -1950,10 +1986,14 @@ See also `crux-reopen-as-root-mode'."
1950 slack-buffer-emojify t 1986 slack-buffer-emojify t
1951 slack-buffer-create-on-notify t 1987 slack-buffer-create-on-notify t
1952 slack-enable-wysiwyg t 1988 slack-enable-wysiwyg t
1953 slack-file-dir "~/var/download/" 1989 slack-file-dir (xdg-user-dir "DOWNLOAD")
1954 slack-display-team-name nil) 1990 slack-display-team-name nil)
1955 (with-eval-after-load '+slack 1991 (with-eval-after-load '+slack
1956 (+slack-register-teams))) 1992 (+slack-register-teams))
1993 (with-eval-after-load 'alert
1994 ;; Don't notify for Slack messages
1995 (alert-add-rule :category "slack"
1996 :style 'ignore)))
1957 1997
1958(setup (:straight-when sly 1998(setup (:straight-when sly
1959 (defvar +lisp-bin (executable-find "sbcl"))) 1999 (defvar +lisp-bin (executable-find "sbcl")))
@@ -2055,6 +2095,9 @@ See also `crux-reopen-as-root-mode'."
2055 2095
2056(setup (:straight unfill)) 2096(setup (:straight unfill))
2057 2097
2098(setup (:straight valign)
2099 (:hook-into org-mode))
2100
2058(setup (:straight valign) (:quit "Doesn't work with narrowed tables.") 2101(setup (:straight valign) (:quit "Doesn't work with narrowed tables.")
2059 (:option valign-fancy-bar t) 2102 (:option valign-fancy-bar t)
2060 (:hook-into org-mode 2103 (:hook-into org-mode
@@ -2065,7 +2108,7 @@ See also `crux-reopen-as-root-mode'."
2065 :repo "minad/vertico" 2108 :repo "minad/vertico"
2066 :files ("*" "extensions/*" 2109 :files ("*" "extensions/*"
2067 (:exclude ".git")))) 2110 (:exclude ".git"))))
2068 (:also-load +vertico) 2111 (:require vertico +vertico)
2069 (:option resize-mini-windows 'grow-only 2112 (:option resize-mini-windows 'grow-only
2070 vertico-count-format nil 2113 vertico-count-format nil
2071 vertico-cycle t) 2114 vertico-cycle t)
diff --git a/lisp/+consult.el b/lisp/+consult.el index 0f5bf45..dc06ad5 100644 --- a/lisp/+consult.el +++ b/lisp/+consult.el
@@ -12,7 +12,7 @@
12;;; Cribbed functions 12;;; Cribbed functions
13;; https://github.com/minad/consult/wiki 13;; https://github.com/minad/consult/wiki
14 14
15(defun consult--orderless-regexp-compiler (input type) 15(defun consult--orderless-regexp-compiler (input type &rest _)
16 (setq input (orderless-pattern-compiler input)) 16 (setq input (orderless-pattern-compiler input))
17 (cons 17 (cons
18 (mapcar (lambda (r) (consult--convert-regexp r type)) input) 18 (mapcar (lambda (r) (consult--convert-regexp r type)) input)
diff --git a/lisp/+elfeed.el b/lisp/+elfeed.el index 8f7f17a..7f9e193 100644 --- a/lisp/+elfeed.el +++ b/lisp/+elfeed.el
@@ -31,6 +31,14 @@
31 (interactive) 31 (interactive)
32 (elfeed-show-visit t)) 32 (elfeed-show-visit t))
33 33
34(defun +elfeed-show-mark-read-and-advance ()
35 "Mark an item as read and advance to the next item.
36If multiple items are selected, don't advance."
37 (interactive)
38 (call-interactively #'elfeed-search-untag-all-unread)
39 (unless (region-active-p)
40 (call-interactively #'next-line)))
41
34;;; Fetch feeds async 42;;; Fetch feeds async
35;; https://github.com/skeeto/elfeed/issues/367 43;; https://github.com/skeeto/elfeed/issues/367
36 44
diff --git a/lisp/+modeline.el b/lisp/+modeline.el index 7bef5c6..3cc8806 100644 --- a/lisp/+modeline.el +++ b/lisp/+modeline.el
@@ -93,12 +93,13 @@ This function makes a lambda, so you can throw it straight into
93(defun +modeline-major-mode (&optional spacer) 93(defun +modeline-major-mode (&optional spacer)
94 "Display the current `major-mode'." 94 "Display the current `major-mode'."
95 (concat (or spacer +modeline-default-spacer) 95 (concat (or spacer +modeline-default-spacer)
96 (propertize (+string-truncate (format-mode-line mode-name) 16) 96 (propertize ;; (+string-truncate (format-mode-line mode-name) 16)
97 'face 'bold 97 (format-mode-line mode-name)
98 'keymap mode-line-major-mode-keymap 98 'face 'font-lock-keyword-face
99 'help-echo (concat (format-mode-line mode-name) 99 'keymap mode-line-major-mode-keymap
100 " mode\nmouse-1: show menu.") 100 'help-echo (concat (format-mode-line mode-name)
101 'mouse-face 'mode-line-highlight))) 101 " mode\nmouse-1: show menu.")
102 'mouse-face 'mode-line-highlight)))
102 103
103(defcustom +modeline-modified-icon-alist '((ephemeral . "*") 104(defcustom +modeline-modified-icon-alist '((ephemeral . "*")
104 (readonly . "=") 105 (readonly . "=")
diff --git a/lisp/acdw.el b/lisp/acdw.el index de2b8e7..764a246 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -374,5 +374,17 @@ the `format' call in a list."
374 (prog1 (progn ,@body) 374 (prog1 (progn ,@body)
375 (progress-reporter-done ,reporter))))) 375 (progress-reporter-done ,reporter)))))
376 376
377(defmacro +with-eval-after-loads (features &rest body)
378 "Execute BODY after all FEATURES are loaded."
379 (declare (indent 1) (debug (form def-body)))
380 (unless (listp features)
381 (setq features (list features)))
382 (if (null features)
383 (macroexp-progn body)
384 (let* ((this (car features))
385 (rest (cdr features)))
386 `(with-eval-after-load ',this
387 (+with-eval-after-loads ,rest ,@body)))))
388
377(provide 'acdw) 389(provide 'acdw)
378;;; acdw.el ends here 390;;; acdw.el ends here
diff --git a/lisp/user-save.el b/lisp/user-save.el index 8e01af1..33b6f4c 100644 --- a/lisp/user-save.el +++ b/lisp/user-save.el
@@ -8,6 +8,8 @@
8 8
9;;; Code: 9;;; Code:
10 10
11(require 'cl-lib)
12
11(defgroup user-save nil 13(defgroup user-save nil
12 "Group for `user-save-mode' customizations." 14 "Group for `user-save-mode' customizations."
13 :group 'emacs 15 :group 'emacs
@@ -19,11 +21,16 @@ This option is only useful is `user-save-mode' is active when
19Emacs is killed." 21Emacs is killed."
20 :type 'boolean) 22 :type 'boolean)
21 23
24(defcustom user-save-inhibit '(special-mode)
25 "List of modes to inhibit `user-save-mode' from activation in."
26 :type '(repeat symbol))
27
22(defvar user-save-hook nil 28(defvar user-save-hook nil
23 "Hook to run when the user, not Emacs, saves the buffer.") 29 "Hook to run when the user, not Emacs, saves the buffer.")
24 30
25(defvar user-save-mode-map (let ((map (make-sparse-keymap))) 31(defvar user-save-mode-map (let ((map (make-sparse-keymap)))
26 (define-key map (kbd "C-x C-s") #'user-save-buffer) 32 (define-key map (kbd "C-x C-s") #'user-save-buffer)
33 (define-key map (kbd "C-x s") #'user-save-some-buffers)
27 map) 34 map)
28 "Keymap for `user-save-mode'. 35 "Keymap for `user-save-mode'.
29This map shadows the default map for `save-buffer'.") 36This map shadows the default map for `save-buffer'.")
@@ -81,7 +88,16 @@ whether the buffer needs to be saved."
81 (user-save-mode -1)) 88 (user-save-mode -1))
82 89
83;;;###autoload 90;;;###autoload
84(define-globalized-minor-mode user-save-global-mode user-save-mode user-save-mode 91(defun user-save-mode-in-some-buffers ()
92 "Enable `user-save-mode', but only in some buffers.
93The mode will not be enabled in buffers derived from modes in
94`user-save-inhibit', or in the minibuffer."
95 (unless (or (cl-some #'derived-mode-p user-save-inhibit)
96 (minibufferp))
97 (user-save-mode +1)))
98
99;;;###autoload
100(define-globalized-minor-mode user-save-global-mode user-save-mode user-save-mode-in-some-buffers
85 (if user-save-global-mode 101 (if user-save-global-mode
86 (when user-save-hook-into-kill-emacs 102 (when user-save-hook-into-kill-emacs
87 (add-hook 'kill-emacs-hook #'user-save-some-buffers)) 103 (add-hook 'kill-emacs-hook #'user-save-some-buffers))
diff --git a/machines/bob.el b/machines/bob.el index 3455c44..77034d2 100644 --- a/machines/bob.el +++ b/machines/bob.el
@@ -10,29 +10,31 @@
10;; Other ideas: [[https://twitter.com/NPRougier/status/1488570192561160195][from Nic Rougier]] 10;; Other ideas: [[https://twitter.com/NPRougier/status/1488570192561160195][from Nic Rougier]]
11(add-function :after machine-after-load-theme 11(add-function :after machine-after-load-theme
12 (defun +bob-set-faces (&rest _) 12 (defun +bob-set-faces (&rest _)
13 (let ((base-face "Roboto Mono") 13 (let ((base-face "IBM Plex Mono")
14 (base-size 105)
14 (italic-face nil) 15 (italic-face nil)
15 ;; (bold-face nil) 16 ;; (bold-face nil)
16 (mono-face nil) 17 (mono-face nil)
17 (var-face "Lato") 18 (var-face "IBM Plex Serif")
18 (base-size 110)) 19 (var-size 1.0))
19 (+set-faces 20 (+set-faces
20 `((default :family ,base-face 21 `((default
21 :weight regular 22 :family ,base-face
22 :height ,base-size) 23 :height ,base-size
24 :weight normal)
23 ;; (bold :family ,(or bold-face base-face) 25 ;; (bold :family ,(or bold-face base-face)
24 ;; :weight bold) 26 ;; :weight bold)
25 ;; (italic :family ,(or italic-face base-face) 27 (italic :family ,(or italic-face base-face)
26 ;; :weight medium 28 :weight normal
27 ;; :slant italic 29 :slant italic)
28 ;; :height ,base-size)
29 (fixed-pitch :family ,(or mono-face base-face) 30 (fixed-pitch :family ,(or mono-face base-face)
30 :weight regular
31 :height ,base-size) 31 :height ,base-size)
32 (variable-pitch :family ,(or var-face base-face) 32 (variable-pitch
33 :height 1.2) 33 :family ,(or var-face base-face)
34 (org-italic :family ,(or var-face base-face) 34 :height ,var-size)
35 :slant italic)))) 35 (org-italic
36 :family ,(or var-face base-face)
37 :slant italic))))
36 )) 38 ))
37 39
38;;; bob.el ends here 40;; bob.el ends here
diff --git a/snippets/org-mode/sc b/snippets/org-mode/sc index 977fe22..afc7faf 100644 --- a/snippets/org-mode/sc +++ b/snippets/org-mode/sc
@@ -1,4 +1,4 @@
1# key: sc 1# key: sc
2# name: sc 2# name: sc
3# -- 3# --
4[sc="${1: $(yas-choose-value '("total-recovery" "br-location-page" "_locationnameslisted" "organizations-helped" "other-results" "truck-accident-results" "car-wreck-results" "personal-injury-results" "number-locations" "experience" "employees" "mon-number" "mon-address" "lc-number" "lc-address" "ham-number" "ham-address" "zac-number" "zac-address" "liv-number" "liv-address" "asc-number" "asc-address" "shrev-number" "shrev-address" "alx-address" "alx-number" "laf-number" "laf-address" "toll-free" "br-number" "br-address" "gmia"))}"][/sc] $0 \ No newline at end of file 4[sc name="${1: $(yas-choose-value '("total-recovery" "br-location-page" "_locationnameslisted" "organizations-helped" "other-results" "truck-accident-results" "car-wreck-results" "personal-injury-results" "number-locations" "experience" "employees" "mon-number" "mon-address" "lc-number" "lc-address" "ham-number" "ham-address" "zac-number" "zac-address" "liv-number" "liv-address" "asc-number" "asc-address" "shrev-number" "shrev-address" "alx-address" "alx-number" "laf-number" "laf-address" "toll-free" "br-number" "br-address" "gmia"))}"][/sc] $0 \ No newline at end of file