From f5d4b71b78949772b7ad60538ce9d5b921788b3b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 2 May 2021 14:15:10 -0500 Subject: Add ledger-mode --- init.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.el b/init.el index d6e8fc8..61fbdc4 100644 --- a/init.el +++ b/init.el @@ -792,6 +792,9 @@ if ripgrep is installed, otherwise `consult-grep'." " o" helpful-symbol "C-c C-d" helpful-at-point)) +(setup (:straight ledger-mode) + (:needs "ledger")) + (setup (:straight lua-mode) (:file-match "\\.lua\\'")) -- cgit 1.4.1-21-gabe81 From 2e53f03bb03e663298f1f098b47b75c2ce2ece56 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 May 2021 11:45:50 -0500 Subject: Add hooks to download and upload gnus data to the cloud Gnus Cloud ... sort of works? I'm honestly not sure about it, lol. --- gnus.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnus.el b/gnus.el index 846966d..eacce0f 100644 --- a/gnus.el +++ b/gnus.el @@ -139,6 +139,10 @@ smtpmail-smtp-user "acdw@fastmail.com" message-kill-buffer-on-exit t) +;;; Hooks +(add-hook 'gnus-started-hook #'gnus-cloud-download-all-data) +(add-hook 'gnus-exit-gnus-hook #'gnus-cloud-upload-all-data) + ;;; Packages ;; searching (?) -- cgit 1.4.1-21-gabe81 From eaf4eb54085fbe5134663e6f2413c700328ae0b3 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 May 2021 15:10:45 -0500 Subject: Add Gwene I still need to import my OPML using one of these: - https://wpc.io/blog/posts/bulk-import-rss-feeds-to-gnus-via-gwene.html - http://gwene.org/opml.php ... when I get home. --- gnus.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnus.el b/gnus.el index eacce0f..e3a0f49 100644 --- a/gnus.el +++ b/gnus.el @@ -25,7 +25,8 @@ (nnimap-server-port 993) (nnimap-stream ssl) (nnir-search-engine imap)) - (nntp "news.tilde.club"))) + (nntp "news.tilde.club") + (nntp "news.gwene.org"))) ;;; Gnus cloud (setq gnus-cloud-method "nnimap:fastmail.com" -- cgit 1.4.1-21-gabe81 From cadba81fbf31c04c48487e2897972bbeb36e5024 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 May 2021 15:12:14 -0500 Subject: Add `idle-require' Not sure how useful it'll be, but hopefully it'll help make some things a little faster... --- init.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index b3b6396..4e11921 100644 --- a/init.el +++ b/init.el @@ -53,6 +53,10 @@ no-littering-var-directory (acdw/dir)) (require 'no-littering)) +;;;; `idle-require' +(setup (:straight idle-require) + (idle-require-mode +1)) + ;;;; My packages (when-let ((default-directory (expand-file-name-exists-p "pkg/" user-emacs-directory))) @@ -263,6 +267,8 @@ (:option eshell-directory-name (acdw/dir "eshell/" t) eshell-aliases-file (acdw/dir "eshell/aliases" t)) + (idle-require 'eshell) + (defun eshell-quit-or-delete-char (arg) "Delete the character to the right, or quit eshell on an empty line." (interactive "p") @@ -337,8 +343,12 @@ (:option gnus-home-directory (expand-file-name "gnus" user-emacs-directory) gnus-directory (expand-file-name "gnus/News" user-emacs-directory) gnus-init-file (expand-file-name "gnus.el" user-emacs-directory)) + (when (not (file-exists-p gnus-directory)) (make-directory gnus-directory :parents)) + + (idle-require 'gnus) + (:leader "m" gnus)) (setup imenu @@ -740,7 +750,9 @@ if ripgrep is installed, otherwise `consult-grep'." (require 'gemini-write)))) (setup (:straight expand-region) - (:global "C-=" er/expand-region)) + (:global "C-=" er/expand-region) + + (idle-require 'expand-region)) (setup (:straight fennel-mode) (:needs "fennel") @@ -889,6 +901,8 @@ if ripgrep is installed, otherwise `consult-grep'." org-startup-truncated nil org-tags-column (- 0 fill-column -3) org-directory "~/org") + + (idle-require 'org) (:bind "RET" acdw-org/return-dwim "" acdw-org/org-table-copy-down) -- cgit 1.4.1-21-gabe81 From ddda04e26f3fc8bec0a82704dbbbf8ac352dce8e Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 May 2021 15:12:44 -0500 Subject: Add `winum' I only rebind winum-select-window-* in graphical buffers because that's apparently the only place where C-[n] is the same as M-[n]. --- init.el | 20 ++++++++++++++++++++ lisp/acdw-modeline.el | 5 +++++ 2 files changed, 25 insertions(+) diff --git a/init.el b/init.el index 4e11921..9f5fd13 100644 --- a/init.el +++ b/init.el @@ -950,6 +950,7 @@ if ripgrep is installed, otherwise `consult-grep'." simple-modeline-segment-position simple-modeline-segment-word-count) (simple-modeline-segment-misc-info + acdw-modeline/winum acdw-modeline/text-scale simple-modeline-segment-process acdw-modeline/god-mode-indicator @@ -1011,6 +1012,25 @@ if ripgrep is installed, otherwise `consult-grep'." (which-key-setup-minibuffer) (which-key-mode +1)) +(setup (:straight winum) + (:option winum-auto-setup-mode-line nil + winum-ignored-buffers '(" *which-key*")) + + (when (display-graphic-p) + (:with-map winum-keymap + (:bind "M-0" winum-select-window-0-or-10 + "M-1" winum-select-window-1 + "M-2" winum-select-window-2 + "M-3" winum-select-window-3 + "M-4" winum-select-window-4 + "M-5" winum-select-window-5 + "M-6" winum-select-window-6 + "M-7" winum-select-window-7 + "M-8" winum-select-window-8 + "M-9" winum-select-window-9))) + + (winum-mode +1)) + (setup (:straight zzz-to-char) (defun acdw/zzz-up-to-char (prefix) "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." (if-let ((backend (vc-backend buffer-file-name))) (substring vc-mode (+ (if (eq backend 'Hg) 2 3) 2)))) +(defun acdw-modeline/winum () + (when (and (bound-and-true-p winum-mode) + (> winum--window-count 1)) + (format winum-format (winum-get-number-string)))) + (provide 'acdw-modeline) -- cgit 1.4.1-21-gabe81 From 47868840de23c85d89e171565b89c3c84dca03dd Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 May 2021 17:11:59 -0500 Subject: Move hooks to a better spot for Gnus Cloud --- gnus.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gnus.el b/gnus.el index e3a0f49..59275fd 100644 --- a/gnus.el +++ b/gnus.el @@ -32,6 +32,8 @@ (setq gnus-cloud-method "nnimap:fastmail.com" gnus-cloud-storage-method 'base64 ; Don't always have GPG or gzip ) +(add-hook 'gnus-started-hook #'gnus-cloud-download-all-data) +(add-hook 'gnus-exit-gnus-hook #'gnus-cloud-upload-all-data) ;;; Gnus subscriptions (setq gnus-options-subscribe (rx (or ;; all alternatives go under this @@ -140,10 +142,6 @@ smtpmail-smtp-user "acdw@fastmail.com" message-kill-buffer-on-exit t) -;;; Hooks -(add-hook 'gnus-started-hook #'gnus-cloud-download-all-data) -(add-hook 'gnus-exit-gnus-hook #'gnus-cloud-upload-all-data) - ;;; Packages ;; searching (?) -- cgit 1.4.1-21-gabe81 From e4439dad96c9425d6c5713c5076d7c1963e47d11 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 May 2021 17:12:24 -0500 Subject: Add hook to message mode --- gnus.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnus.el b/gnus.el index 59275fd..540fed4 100644 --- a/gnus.el +++ b/gnus.el @@ -132,6 +132,11 @@ (setq mm-discouraged-alternatives '("text/html" "text/richtext")) +;;; Composing mail +(hook-defun setup-message-mode message-mode-hook + (flyspell-mode +1) + (local-set-key (kbd "TAB") #'bbdb-complete-mail)) + ;;; Sending mail (setq send-mail-function #'smtpmail-send-it message-send-mail-function #'smtpmail-send-it -- cgit 1.4.1-21-gabe81 From 30f9b880a58a44976b6f30b871d61dd543e9f0ea Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 May 2021 17:12:53 -0500 Subject: Stop asking to exit Gnus --- gnus.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnus.el b/gnus.el index 540fed4..db7b0c9 100644 --- a/gnus.el +++ b/gnus.el @@ -86,7 +86,8 @@ message-signature (or (file-exists-p message-signature-file) "~ acdw") gnus-save-newsrc-file nil - gnus-read-newsrc-file nil) + gnus-read-newsrc-file nil + gnus-interactive-exit nil) ;;; Other parameters (setq gnus-parameters -- cgit 1.4.1-21-gabe81 From fa189fa1b6efbfd978f375715b445d0856377e67 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 May 2021 21:31:29 -0500 Subject: Only update packages with C-u --- init.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/init.el b/init.el index 9f5fd13..aa284dd 100644 --- a/init.el +++ b/init.el @@ -934,10 +934,11 @@ if ripgrep is installed, otherwise `consult-grep'." (add-hook (intern (concat (symbol-name mode) "-hook")) #'paren-face-mode))) (setup (:straight restart-emacs) - (defun emacs-upgrade () + (defun emacs-upgrade (&optional update-packages) "Pull config, upgrade packages, restart Emacs." - (interactive) - (straight-pull-all) + (interactive "P") + (when update-packages + (straight-pull-all)) (emacs-git-pull-config) (restart-emacs))) -- cgit 1.4.1-21-gabe81