From 23e0ce59dd3b52e13bc3358db33f5bf4cc28a921 Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 8 Oct 2022 02:13:49 +0100 Subject: mail tweaks --- custom/jao-custom-gnus.el | 76 +++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 36 deletions(-) (limited to 'custom/jao-custom-gnus.el') diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index f24d20a..d0ca3d4 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -47,6 +47,10 @@ gnus-tree-minimize-window nil) (when jao-gnus-use-three-panes + + ;; (dolist (m '(calendar-mode org-agenda-mode gnus-group-mode)) + ;; (add-to-list 'display-buffer-alist `((major-mode . ,m) (dedicated t)))) + (let ((side-bar '(vertical 1.0 ("inbox.org" 0.4) ("*Org Agenda*" 1.0) @@ -210,7 +214,7 @@ ("nnml:jao\\.hacking" (posting-style ("Bcc" "hacking@jao.io") ("Gcc" "nnml:jao.hacking") - ("address" "jao@gnu.org"))) + (address "jao@gnu.org"))) ("nnml:jao\\.drivel" (auto-expire . t) (total-expire . t) @@ -232,12 +236,6 @@ (total-expire . t) (expiry-wait . 7) (expiry-target . "nnml:bigml.trove")) - ("nnml:bigml\\.support" - (gcc-self . t) - (auto-expire . t) - (total-expire . t) - (expiry-wait . 7) - (expiry-target . delete)) ("nnml:bigml\\.alba" (gcc-self . t) (auto-expire . nil) @@ -250,6 +248,8 @@ (expiry-target . delete) (expiry-wait . 365)) ("nnml:feeds\\.\\(.*\\)" + (posting-style ("Gcc" "nnml:feeds.trove") + (address "jao@gnu.org")) (auto-expire . t) (total-expire . t) (expiry-wait . 7) @@ -287,26 +287,20 @@ '(nnimap "gandi" (nnimap-address "mail.gandi.net")))) ;;; Demons and notifications -(setq mail-user-agent 'gnus-user-agent) -(setq gnus-asynchronous t) -(setq gnus-use-article-prefetch nil) -(setq gnus-save-killed-list nil) -(setq gnus-check-new-newsgroups nil) - +;;;; minibuffer notifications (defvar jao-gnus-tracked-groups (let ((feeds (thread-first - (directory-files mail-source-directory nil "feeds") + (directory-files mail-source-directory nil "feeds\\.[^e]") (seq-difference '("feeds.trove"))))) - `(("nnml:bigml.inbox" "B" jao-themes-f00) - ("nnml:bigml.alba" "A" jao-themes-f00) - ("nnml:bigml.bugs" "b" jao-themes-error) - ("nnml:bigml.support" "S" default) - ("nnml:jao.inbox" "I" jao-themes-f01) - ("nnml:bigml.[^ibs]" "W" jao-themes-dimm) + `(("nnml:bigml\\.inbox" "B" jao-themes-f00) + ("nnml:bigml\\.alba" "A" jao-themes-f00) + ("nnml:bigml\\.bugs" "b" jao-themes-error) + ("nnml:bigml\\.support" "S" default) + ("nnml:jao\\.inbox" "I" jao-themes-f01) + ("nnml:bigml\\.[^ibs]" "W" jao-themes-dimm) ("nnml:jao.[^ist]" "J" jao-themes-dimm) (,(format "^nnml:%s" (regexp-opt feeds)) "F" jao-themes-dimm) - ("^gmane\\.[^e]" "G" jao-themes-dimm) - ("^gmane\\.e" "E" jao-themes-dimm) + ("feeds\\.e" "E" jao-themes-dimm) ("nnml:local" "l" jao-themes-dimm)))) (defun jao-gnus--unread-counts () @@ -339,25 +333,28 @@ (setq jao-gnus--notify-strs (jao-gnus--notify-strs)) (jao-minibuffer-refresh)) -(require 'gnus-demon) -(gnus-demon-add-handler 'gnus-demon-scan-news 5 1) -;; (gnus-demon-remove-handler 'gnus-demon-scan-news) +(with-eval-after-load "jao-minibuffer" + (jao-minibuffer-add-variable 'jao-gnus--notify-strs -20)) (add-hook 'gnus-started-hook #'jao-gnus--notify) (add-hook 'gnus-summary-exit-hook #'jao-gnus--notify) (add-hook 'gnus-after-getting-new-news-hook #'jao-gnus--notify) -(with-eval-after-load "jao-minibuffer" - (jao-minibuffer-add-variable 'jao-gnus--notify-strs -20)) +;;;; gnus daemon +(setq mail-user-agent 'gnus-user-agent) +(setq gnus-asynchronous t) +(setq gnus-use-article-prefetch nil) +(setq gnus-save-killed-list nil) +(setq gnus-check-new-newsgroups nil) -;; delayed messages -(require 'gnus-util) -(gnus-delay-initialize) -(setq gnus-delay-default-delay "3h") -(eval-after-load "message" - '(setq message-draft-headers (remove 'Date message-draft-headers))) +(require 'gnus-demon) +(gnus-demon-add-handler 'gnus-demon-scan-news 5 1) +;; (gnus-demon-remove-handler 'gnus-demon-scan-news) -;;; Groups buffer +;;;; agenda updates +(add-hook 'gnus-summary-exit-hook #'org-agenda-list) + +;;; Groups (setq gnus-group-line-format " %m%S%p%3y%P%* %~(pad-right 30)G %B\n" ;; " %m%S%p%P:%~(pad-right 35)c %3y %B\n" @@ -370,7 +367,7 @@ (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp) (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) -;;; Summary buffer +;;; Summary ;;;; configuration (setq gnus-face-1 'jao-gnus-face-tree gnus-show-threads t @@ -548,7 +545,7 @@ (goto-char (point-max)) (org-capture nil "X")) -;;; Article buffer +;;; Article ;;;; config, headers (setq mail-source-delete-incoming t) (setq gnus-gcc-mark-as-read t) @@ -654,6 +651,13 @@ (when-let ((url (thing-at-point-url-at-point))) (jao-mpc-add-or-play-url url)))))) +;;;; delayed messages +(require 'gnus-util) +(gnus-delay-initialize) +(setq gnus-delay-default-delay "3h") +(eval-after-load "message" + '(setq message-draft-headers (remove 'Date message-draft-headers))) + ;;; Add-ons ;;;; open mail file in gnus (defun jao-gnus-file-to-group (file &optional maildir newsdir m-server n-server) -- cgit v1.2.3