From 5300330a27ce64f43b0ed36a9fa0a49158d19c6a Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 10 Nov 2022 21:33:14 +0000 Subject: email adjustments, and fcc in notmuch based on current folder --- custom/jao-custom-email.el | 10 +++++++++- custom/jao-custom-gnus.el | 12 +++++++----- custom/jao-custom-notmuch.el | 4 ++-- 3 files changed, 18 insertions(+), 8 deletions(-) (limited to 'custom') diff --git a/custom/jao-custom-email.el b/custom/jao-custom-email.el index a315c25..46fdd12 100644 --- a/custom/jao-custom-email.el +++ b/custom/jao-custom-email.el @@ -1,10 +1,16 @@ ;; -*- lexical-binding: t; -*- +;;; main email system +(require 'jao-afio) +(setq jao-afio-mail-function 'gnus) +(setq jao-afio-mail-function 'notmuch) + +(defvar jao-notmuch-enabled (eq jao-afio-mail-function 'notmuch)) + ;;; personal emails and others (defvar jao-mails) (defvar jao-extra-mails) (defvar jao-mails-regexp (regexp-opt jao-mails)) -(defvar jao-notmuch-enabled (eq jao-afio-mail-function 'notmuch)) ;;; gnus (setq gnus-init-file "~/.emacs.d/gnus.el" @@ -305,5 +311,7 @@ (jao-consult-add-buffer-source 'jao-mail-consult-source) +(require 'jao-custom-notmuch) + ;;; . (provide 'jao-custom-email) diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index 2d074b5..f5f0c10 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -183,7 +183,7 @@ ;;;; nnml (setq mail-sources - (when jao-gnus-use-nnml + (when (and jao-gnus-use-nnml (not jao-notmuch-enabled)) (let ((fix (regexp-opt '("feeds" "local" "trash" "spam")))) (mapcar (lambda (d) `(maildir :path ,(concat d "/"))) (directory-files "~/var/mail/" t @@ -733,10 +733,12 @@ (define-key gnus-summary-save-map "-" 'gnus/randomsig-summary-read-sig))) ;;;; recoll -(with-eval-after-load "org" - (org-link-set-parameters "message" :follow #'jao-gnus-goto-file)) -(with-eval-after-load "consult-recoll" - (add-to-list 'consult-recoll-open-fns '("message/rfc822" . jao-gnus-goto-file))) +(unless jao-notmuch-enabled + (with-eval-after-load "org" + (org-link-set-parameters "message" :follow #'jao-gnus-goto-file)) + (with-eval-after-load "consult-recoll" + (add-to-list 'consult-recoll-open-fns + '("message/rfc822" . jao-gnus-goto-file)))) ;;; Keyboard shortcuts (define-key gnus-article-mode-map "i" 'jao-gnus-show-images) (define-key gnus-summary-mode-map "i" 'jao-gnus-show-images) diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el index 492da2d..1135ec7 100644 --- a/custom/jao-custom-notmuch.el +++ b/custom/jao-custom-notmuch.el @@ -231,8 +231,8 @@ notmuch-draft-quoted-tags '("part") notmuch-fcc-dirs '(("\\(support\\|education\\)@bigml.com" . nil) - (".*@bigml.com" . "bigml/trove -new -unread +sent +bigml +trove") - (".*" . "trove/jao -new -unread +sent +jao +trove")) + (".*@bigml.com" . "bigml.inbox -new -unread +sent +bigml") + (".*" . "jao.inbox -new -unread +sent +jao")) notmuch-maildir-use-notmuch-insert t) :custom ((notmuch-address-internal-completion '(sent nil))) -- cgit v1.2.3