From 929483d1ade11de5485c4377c4660ed99ea21d50 Mon Sep 17 00:00:00 2001 From: Daniel <89086143+BardofSprites@users.noreply.github.com> Date: Tue, 23 Jul 2024 17:47:56 -0400 Subject: update to usable state --- bard-emacs-modules/bard-emacs-email.el | 77 ++++++++++++++++++++++++++++------ 1 file changed, 64 insertions(+), 13 deletions(-) diff --git a/bard-emacs-modules/bard-emacs-email.el b/bard-emacs-modules/bard-emacs-email.el index 24ccad5..e898fa3 100644 --- a/bard-emacs-modules/bard-emacs-email.el +++ b/bard-emacs-modules/bard-emacs-email.el @@ -6,17 +6,39 @@ (define-key global-map (kbd "C-c m") #'notmuch)) (use-package notmuch-indicator - :ensure t) + :ensure t + :after notmuch + :config + (setq notmuch-indicator-args + '(( :terms "tag:unread and tag:inbox" + :label "[U] " + :label-face prot-modeline-indicator-green + :counter-face prot-modeline-indicator-green) + ( :terms "tag:unread and tag:linux" + :label "[L] " + :label-face prot-modeline-indicator-cyan + :counter-face prot-modeline-indicator-cyan) + ( :terms "tag:unread and tag:emacs" + :label "[E] " + :label-face prot-modeline-indicator-blue + :counter-face prot-modeline-indicator-blue)) -(use-package mbsync - :ensure t) + notmuch-indicator-refresh-count (* 60 3) + notmuch-indicator-hide-empty-counters t + notmuch-indicator-force-refresh-commands '(notmuch-refresh-this-buffer)) + (setq notmuch-indicator-add-to-mode-line-misc-info nil) + (notmuch-indicator-mode t)) -(setq notmuch-show-logo nil +;; use msmtp +(setq message-send-mail-function 'message-send-mail-with-sendmail) +(setq sendmail-program "/usr/bin/msmtp") + +(setq notmuch-show-logo t notmuch-column-control 1.0 notmuch-hello-auto-refresh t notmuch-hello-recent-searches-max 20 notmuch-hello-thousands-separator "" - notmuch-hello-sections '(notmuch-hello-insert-saved-searches) + notmuch-hello-sections '(notmuch-hello-insert-header notmuch-hello-insert-saved-searches notmuch-hello-insert-search notmuch-hello-insert-alltags) notmuch-show-all-tags-list t) (setq notmuch-search-oldest-first nil) @@ -29,16 +51,43 @@ (error "Sending message cancelled: empty subject"))) (add-hook 'message-send-hook 'bard/notmuch-mua-empty-subject-check) +(setq notmuch-show-empty-saved-searches t) (setq notmuch-saved-searches - `(( :name "📥 inbox" - :query "tag:inbox" - :sort-order newest-first - :key ,(kbd "i")) - ( :name "💬 unread (inbox)" - :query "tag:unread and tag:inbox" - :sort-order newest-first - :key ,(kbd "u")))) + `(( :name "📥 inbox" + :query "tag:inbox" + :sort-order newest-first + :key ,(kbd "i")) + ( :name "💬 unread (inbox)" + :query "tag:unread and tag:inbox" + :sort-order newest-first + :key ,(kbd "u")) + ( :name "🐃 contrib" + :query "tag:unread and tag:contrib" + :sort-order newest-first + :key ,(kbd "c")) + ( :name "🐧 linux" + :query "tag:unread and tag:linux" + :sort-order newest-first + :key ,(kbd "l")) + ( :name "🚂 emacs devel" + :query "tag:unread and tag:contrib" + :sort-order newest-first + :key ,(kbd "ed")) + ( :name "🎨 emacs humanities" + :query "tag:unread and tag:emacs-humanities" + :sort-order newest-first + :key ,(kbd "eh")) + ( :name "🦄 emacs org" + :query "tag:unread and tag:emacs-org" + :sort-order newest-first + :key ,(kbd "eo")))) +(setq notmuch-tagging-keys + `((,(kbd "d") prot-notmuch-mark-delete-tags "💥 Mark for deletion") + (,(kbd "f") prot-notmuch-mark-flag-tags "🚩 Flag as important") + (,(kbd "s") prot-notmuch-mark-spam-tags "🔥 Mark as spam") + (,(kbd "r") ("-unread") "👁️‍🗨️ Mark as read") + (,(kbd "u") ("+unread") "🗨️ Mark as unread"))) (setq notmuch-archive-tags '("+archive") notmuch-message-replied-tags '("+replied") @@ -47,3 +96,5 @@ notmuch-draft-tags '("+draft") notmuch-draft-folder "drafts" notmuch-draft-save-plaintext 'ask) + +(provide 'bard-emacs-email) -- cgit v1.2.3