From 4f64ab29423e81748cf179e6dab4fc049bb7a803 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 6 Jun 2018 10:24:27 +0200 Subject: chore(mail): Rename file to match provides --- init/mail-setup.el | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ init/mail.el | 53 ----------------------------------------------------- 2 files changed, 53 insertions(+), 53 deletions(-) create mode 100644 init/mail-setup.el delete mode 100644 init/mail.el diff --git a/init/mail-setup.el b/init/mail-setup.el new file mode 100644 index 000000000000..ecc6aa4648e9 --- /dev/null +++ b/init/mail-setup.el @@ -0,0 +1,53 @@ +(require 'notmuch) + +(global-set-key (kbd "C-c m") 'notmuch-hello) +(global-set-key (kbd "C-c C-e n") 'notmuch-mua-new-mail) + +(setq notmuch-cache-dir "~/.cache/notmuch") +(make-directory notmuch-cache-dir t) + +;; Mark things as read when archiving them: +(setq notmuch-archive-tags '("-inbox" "-unread" "+archive")) + +;; Cache addresses for completion: +(setq notmuch-address-save-filename (concat notmuch-cache-dir "/addresses")) + +;; Don't spam my home folder with drafts: +(setq notmuch-draft-folder notmuch-cache-dir) + +;; Show me saved searches that I care about: +(setq notmuch-saved-searches + '((:name "inbox" :query "tag:inbox" :key "i") + (:name "gitlab" :query "tag:gitlab" :key "g") + (:name "sent" :query "tag:sent" :key "t") + (:name "drafts" :query "tag:draft" :key "d"))) +(setq notmuch-show-empty-saved-searches t) + +;; Mail sending configuration +(setq notmuch-always-prompt-for-sender t) +(setq notmuch-mua-user-agent-function + (lambda () (format "Emacs %s; notmuch.el %s" emacs-version notmuch-emacs-version))) + +;; Ensure sender is correctly passed to msmtp +(setq mail-specify-envelope-from t + message-sendmail-envelope-from 'header + mail-envelope-from 'header) + +;; Store sent mail in the correct folder per account +(setq notmuch-maildir-use-notmuch-insert nil) +(setq notmuch-fcc-dirs '(("mail@tazj.in" . "tazjin/Sent") + ;; Not a mistake, Office365 apparently + ;; renames IMAP folders (!) to your local + ;; language instead of providing translations + ;; in the UI m( + ("vincent@aprila.no" . "aprila/Sende element"))) + +;; MSMTP decrypts passwords using pass, but pinentry doesn't work +;; correctly in that setup. This forces a warmup of the GPG agent +;; before sending the message. +;; +;; Note that the sending function is advised because the provided hook +;; for this seems to run at the wrong time. +(advice-add 'notmuch-mua-send-common :before 'warmup-gpg-agent) + +(provide 'mail-setup) diff --git a/init/mail.el b/init/mail.el deleted file mode 100644 index ecc6aa4648e9..000000000000 --- a/init/mail.el +++ /dev/null @@ -1,53 +0,0 @@ -(require 'notmuch) - -(global-set-key (kbd "C-c m") 'notmuch-hello) -(global-set-key (kbd "C-c C-e n") 'notmuch-mua-new-mail) - -(setq notmuch-cache-dir "~/.cache/notmuch") -(make-directory notmuch-cache-dir t) - -;; Mark things as read when archiving them: -(setq notmuch-archive-tags '("-inbox" "-unread" "+archive")) - -;; Cache addresses for completion: -(setq notmuch-address-save-filename (concat notmuch-cache-dir "/addresses")) - -;; Don't spam my home folder with drafts: -(setq notmuch-draft-folder notmuch-cache-dir) - -;; Show me saved searches that I care about: -(setq notmuch-saved-searches - '((:name "inbox" :query "tag:inbox" :key "i") - (:name "gitlab" :query "tag:gitlab" :key "g") - (:name "sent" :query "tag:sent" :key "t") - (:name "drafts" :query "tag:draft" :key "d"))) -(setq notmuch-show-empty-saved-searches t) - -;; Mail sending configuration -(setq notmuch-always-prompt-for-sender t) -(setq notmuch-mua-user-agent-function - (lambda () (format "Emacs %s; notmuch.el %s" emacs-version notmuch-emacs-version))) - -;; Ensure sender is correctly passed to msmtp -(setq mail-specify-envelope-from t - message-sendmail-envelope-from 'header - mail-envelope-from 'header) - -;; Store sent mail in the correct folder per account -(setq notmuch-maildir-use-notmuch-insert nil) -(setq notmuch-fcc-dirs '(("mail@tazj.in" . "tazjin/Sent") - ;; Not a mistake, Office365 apparently - ;; renames IMAP folders (!) to your local - ;; language instead of providing translations - ;; in the UI m( - ("vincent@aprila.no" . "aprila/Sende element"))) - -;; MSMTP decrypts passwords using pass, but pinentry doesn't work -;; correctly in that setup. This forces a warmup of the GPG agent -;; before sending the message. -;; -;; Note that the sending function is advised because the provided hook -;; for this seems to run at the wrong time. -(advice-add 'notmuch-mua-send-common :before 'warmup-gpg-agent) - -(provide 'mail-setup) -- cgit 1.4.1