diff options
author | Case Duckworth | 2021-05-04 09:11:17 -0500 |
---|---|---|
committer | Case Duckworth | 2021-05-04 09:11:17 -0500 |
commit | a274ec49c5b3b60f3837e2feaa7b15c04b772ff2 (patch) | |
tree | 66ad9d3b49632d5b930d7d1d7800de8cfe3acf92 | |
parent | Add slime-repl-return-at-end (diff) | |
parent | Only update packages with C-u (diff) | |
download | emacs-a274ec49c5b3b60f3837e2feaa7b15c04b772ff2.tar.gz emacs-a274ec49c5b3b60f3837e2feaa7b15c04b772ff2.zip |
Merge branch 'main' of https://tildegit.org/acdw/emacs
-rw-r--r-- | gnus.el | 13 | ||||
-rw-r--r-- | init.el | 46 | ||||
-rw-r--r-- | lisp/acdw-modeline.el | 5 |
3 files changed, 58 insertions, 6 deletions
diff --git a/gnus.el b/gnus.el index 846966d..db7b0c9 100644 --- a/gnus.el +++ b/gnus.el | |||
@@ -25,12 +25,15 @@ | |||
25 | (nnimap-server-port 993) | 25 | (nnimap-server-port 993) |
26 | (nnimap-stream ssl) | 26 | (nnimap-stream ssl) |
27 | (nnir-search-engine imap)) | 27 | (nnir-search-engine imap)) |
28 | (nntp "news.tilde.club"))) | 28 | (nntp "news.tilde.club") |
29 | (nntp "news.gwene.org"))) | ||
29 | 30 | ||
30 | ;;; Gnus cloud | 31 | ;;; Gnus cloud |
31 | (setq gnus-cloud-method "nnimap:fastmail.com" | 32 | (setq gnus-cloud-method "nnimap:fastmail.com" |
32 | gnus-cloud-storage-method 'base64 ; Don't always have GPG or gzip | 33 | gnus-cloud-storage-method 'base64 ; Don't always have GPG or gzip |
33 | ) | 34 | ) |
35 | (add-hook 'gnus-started-hook #'gnus-cloud-download-all-data) | ||
36 | (add-hook 'gnus-exit-gnus-hook #'gnus-cloud-upload-all-data) | ||
34 | 37 | ||
35 | ;;; Gnus subscriptions | 38 | ;;; Gnus subscriptions |
36 | (setq gnus-options-subscribe (rx (or ;; all alternatives go under this | 39 | (setq gnus-options-subscribe (rx (or ;; all alternatives go under this |
@@ -83,7 +86,8 @@ | |||
83 | message-signature (or (file-exists-p message-signature-file) | 86 | message-signature (or (file-exists-p message-signature-file) |
84 | "~ acdw") | 87 | "~ acdw") |
85 | gnus-save-newsrc-file nil | 88 | gnus-save-newsrc-file nil |
86 | gnus-read-newsrc-file nil) | 89 | gnus-read-newsrc-file nil |
90 | gnus-interactive-exit nil) | ||
87 | 91 | ||
88 | ;;; Other parameters | 92 | ;;; Other parameters |
89 | (setq gnus-parameters | 93 | (setq gnus-parameters |
@@ -129,6 +133,11 @@ | |||
129 | (setq mm-discouraged-alternatives '("text/html" | 133 | (setq mm-discouraged-alternatives '("text/html" |
130 | "text/richtext")) | 134 | "text/richtext")) |
131 | 135 | ||
136 | ;;; Composing mail | ||
137 | (hook-defun setup-message-mode message-mode-hook | ||
138 | (flyspell-mode +1) | ||
139 | (local-set-key (kbd "TAB") #'bbdb-complete-mail)) | ||
140 | |||
132 | ;;; Sending mail | 141 | ;;; Sending mail |
133 | (setq send-mail-function #'smtpmail-send-it | 142 | (setq send-mail-function #'smtpmail-send-it |
134 | message-send-mail-function #'smtpmail-send-it | 143 | message-send-mail-function #'smtpmail-send-it |
diff --git a/init.el b/init.el index 5452a0d..a528896 100644 --- a/init.el +++ b/init.el | |||
@@ -53,6 +53,10 @@ | |||
53 | no-littering-var-directory (acdw/dir)) | 53 | no-littering-var-directory (acdw/dir)) |
54 | (require 'no-littering)) | 54 | (require 'no-littering)) |
55 | 55 | ||
56 | ;;;; `idle-require' | ||
57 | (setup (:straight idle-require) | ||
58 | (idle-require-mode +1)) | ||
59 | |||
56 | ;;;; My packages | 60 | ;;;; My packages |
57 | (when-let ((default-directory | 61 | (when-let ((default-directory |
58 | (expand-file-name-exists-p "pkg/" user-emacs-directory))) | 62 | (expand-file-name-exists-p "pkg/" user-emacs-directory))) |
@@ -263,6 +267,8 @@ | |||
263 | (:option eshell-directory-name (acdw/dir "eshell/" t) | 267 | (:option eshell-directory-name (acdw/dir "eshell/" t) |
264 | eshell-aliases-file (acdw/dir "eshell/aliases" t)) | 268 | eshell-aliases-file (acdw/dir "eshell/aliases" t)) |
265 | 269 | ||
270 | (idle-require 'eshell) | ||
271 | |||
266 | (defun eshell-quit-or-delete-char (arg) | 272 | (defun eshell-quit-or-delete-char (arg) |
267 | "Delete the character to the right, or quit eshell on an empty line." | 273 | "Delete the character to the right, or quit eshell on an empty line." |
268 | (interactive "p") | 274 | (interactive "p") |
@@ -337,8 +343,12 @@ | |||
337 | (:option gnus-home-directory (expand-file-name "gnus" user-emacs-directory) | 343 | (:option gnus-home-directory (expand-file-name "gnus" user-emacs-directory) |
338 | gnus-directory (expand-file-name "gnus/News" user-emacs-directory) | 344 | gnus-directory (expand-file-name "gnus/News" user-emacs-directory) |
339 | gnus-init-file (expand-file-name "gnus.el" user-emacs-directory)) | 345 | gnus-init-file (expand-file-name "gnus.el" user-emacs-directory)) |
346 | |||
340 | (when (not (file-exists-p gnus-directory)) | 347 | (when (not (file-exists-p gnus-directory)) |
341 | (make-directory gnus-directory :parents)) | 348 | (make-directory gnus-directory :parents)) |
349 | |||
350 | (idle-require 'gnus) | ||
351 | |||
342 | (:leader "m" gnus)) | 352 | (:leader "m" gnus)) |
343 | 353 | ||
344 | (setup imenu | 354 | (setup imenu |
@@ -740,7 +750,9 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
740 | (require 'gemini-write)))) | 750 | (require 'gemini-write)))) |
741 | 751 | ||
742 | (setup (:straight expand-region) | 752 | (setup (:straight expand-region) |
743 | (:global "C-=" er/expand-region)) | 753 | (:global "C-=" er/expand-region) |
754 | |||
755 | (idle-require 'expand-region)) | ||
744 | 756 | ||
745 | (setup (:straight fennel-mode) | 757 | (setup (:straight fennel-mode) |
746 | (:needs "fennel") | 758 | (:needs "fennel") |
@@ -812,6 +824,9 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
812 | "<help> o" helpful-symbol | 824 | "<help> o" helpful-symbol |
813 | "C-c C-d" helpful-at-point)) | 825 | "C-c C-d" helpful-at-point)) |
814 | 826 | ||
827 | (setup (:straight ledger-mode) | ||
828 | (:needs "ledger")) | ||
829 | |||
815 | (setup (:straight lua-mode) | 830 | (setup (:straight lua-mode) |
816 | (:file-match "\\.lua\\'")) | 831 | (:file-match "\\.lua\\'")) |
817 | 832 | ||
@@ -897,6 +912,8 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
897 | org-startup-truncated nil | 912 | org-startup-truncated nil |
898 | org-tags-column (- 0 fill-column -3) | 913 | org-tags-column (- 0 fill-column -3) |
899 | org-directory "~/org") | 914 | org-directory "~/org") |
915 | |||
916 | (idle-require 'org) | ||
900 | 917 | ||
901 | (:bind "RET" acdw-org/return-dwim | 918 | (:bind "RET" acdw-org/return-dwim |
902 | "<S-return>" acdw-org/org-table-copy-down) | 919 | "<S-return>" acdw-org/org-table-copy-down) |
@@ -928,10 +945,11 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
928 | (add-hook (intern (concat (symbol-name mode) "-hook")) #'paren-face-mode))) | 945 | (add-hook (intern (concat (symbol-name mode) "-hook")) #'paren-face-mode))) |
929 | 946 | ||
930 | (setup (:straight restart-emacs) | 947 | (setup (:straight restart-emacs) |
931 | (defun emacs-upgrade () | 948 | (defun emacs-upgrade (&optional update-packages) |
932 | "Pull config, upgrade packages, restart Emacs." | 949 | "Pull config, upgrade packages, restart Emacs." |
933 | (interactive) | 950 | (interactive "P") |
934 | (straight-pull-all) | 951 | (when update-packages |
952 | (straight-pull-all)) | ||
935 | (emacs-git-pull-config) | 953 | (emacs-git-pull-config) |
936 | (restart-emacs))) | 954 | (restart-emacs))) |
937 | 955 | ||
@@ -944,6 +962,7 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
944 | simple-modeline-segment-position | 962 | simple-modeline-segment-position |
945 | simple-modeline-segment-word-count) | 963 | simple-modeline-segment-word-count) |
946 | (simple-modeline-segment-misc-info | 964 | (simple-modeline-segment-misc-info |
965 | acdw-modeline/winum | ||
947 | acdw-modeline/text-scale | 966 | acdw-modeline/text-scale |
948 | simple-modeline-segment-process | 967 | simple-modeline-segment-process |
949 | acdw-modeline/god-mode-indicator | 968 | acdw-modeline/god-mode-indicator |
@@ -1005,6 +1024,25 @@ if ripgrep is installed, otherwise `consult-grep'." | |||
1005 | (which-key-setup-minibuffer) | 1024 | (which-key-setup-minibuffer) |
1006 | (which-key-mode +1)) | 1025 | (which-key-mode +1)) |
1007 | 1026 | ||
1027 | (setup (:straight winum) | ||
1028 | (:option winum-auto-setup-mode-line nil | ||
1029 | winum-ignored-buffers '(" *which-key*")) | ||
1030 | |||
1031 | (when (display-graphic-p) | ||
1032 | (:with-map winum-keymap | ||
1033 | (:bind "M-0" winum-select-window-0-or-10 | ||
1034 | "M-1" winum-select-window-1 | ||
1035 | "M-2" winum-select-window-2 | ||
1036 | "M-3" winum-select-window-3 | ||
1037 | "M-4" winum-select-window-4 | ||
1038 | "M-5" winum-select-window-5 | ||
1039 | "M-6" winum-select-window-6 | ||
1040 | "M-7" winum-select-window-7 | ||
1041 | "M-8" winum-select-window-8 | ||
1042 | "M-9" winum-select-window-9))) | ||
1043 | |||
1044 | (winum-mode +1)) | ||
1045 | |||
1008 | (setup (:straight zzz-to-char) | 1046 | (setup (:straight zzz-to-char) |
1009 | (defun acdw/zzz-up-to-char (prefix) | 1047 | (defun acdw/zzz-up-to-char (prefix) |
1010 | "Call `zzz-up-to-char', unless issued a PREFIX, in which case | 1048 | "Call `zzz-up-to-char', unless issued a PREFIX, in which case |
diff --git a/lisp/acdw-modeline.el b/lisp/acdw-modeline.el index 7eca143..81b808d 100644 --- a/lisp/acdw-modeline.el +++ b/lisp/acdw-modeline.el | |||
@@ -88,4 +88,9 @@ indicator in the mode-line." | |||
88 | (if-let ((backend (vc-backend buffer-file-name))) | 88 | (if-let ((backend (vc-backend buffer-file-name))) |
89 | (substring vc-mode (+ (if (eq backend 'Hg) 2 3) 2)))) | 89 | (substring vc-mode (+ (if (eq backend 'Hg) 2 3) 2)))) |
90 | 90 | ||
91 | (defun acdw-modeline/winum () | ||
92 | (when (and (bound-and-true-p winum-mode) | ||
93 | (> winum--window-count 1)) | ||
94 | (format winum-format (winum-get-number-string)))) | ||
95 | |||
91 | (provide 'acdw-modeline) | 96 | (provide 'acdw-modeline) |