From 0370b2ae645467182a066228a5f9abb488636b8b Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 25 Aug 2023 05:56:49 +0200 Subject: Emacs: move mail config to private submodule --- private | 2 +- user/emacs/init.el | 53 ++++------------------------------------------------- 2 files changed, 5 insertions(+), 50 deletions(-) diff --git a/private b/private index 1bcebfb0..9a32e732 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit 1bcebfb0da1546d2413c87e12f41e07981048a43 +Subproject commit 9a32e73228ec4a25323a49b3445c1e4088f6c40b diff --git a/user/emacs/init.el b/user/emacs/init.el index 39232eac..ff423f94 100644 --- a/user/emacs/init.el +++ b/user/emacs/init.el @@ -1126,54 +1126,6 @@ _p_rev _u_pper _=_: upper/lower _r_esolve :init (progn (apheleia-global-mode +1))) -;;; E-mail - -(declare-function sendmail-send-it "sendmail") -(setq send-mail-function #'sendmail-send-it) - -(use-package mu4e - :if (executable-find "mu") - :commands (mu4e) - :defines (mu4e-contexts) - :general (:keymaps 'mu4e-headers-mode-map - :states 'normal - "d" #'mu4e-headers-mark-for-trash - "T" #'mu4e-headers-mark-thread) - (:keymaps 'mu4e-view-mode-map - :states 'normal - "d" #'mu4e-view-mark-for-trash) - :init (progn - (with-eval-after-load 'evil-ex - (evil-ex-define-cmd "mu[4e]" #'mu4e))) - :config (progn - (setq mail-user-agent #'mu4e-user-agent - mu4e-maildir "~/mail" - mu4e-context-policy 'pick-first - mu4e-update-interval 600 - mu4e-change-filenames-when-moving t - mu4e-index-lazy-check t - mu4e-hide-index-messages t - mu4e-compose-format-flowed t - mu4e-contexts (list - (make-mu4e-context - :name "SatoshiPay" - :match-func (lambda (msg) - (if msg - (mu4e-message-contact-field-matches - msg :to ".*@satoshipay.io") - (string-equal (system-name) "satoshipad"))) - :vars '((user-mail-address . "alan@satoshipay.io") - (mu4e-sent-messages-behavior . delete) - (mu4e-drafts-folder . "/satoshipay/[Gmail]/Drafts") - (mu4e-sent-folder . "/satoshipay/[Gmail]/Sent Mail") - (mu4e-refile-folder . "/satoshipay/[Gmail]/All Mail") - (mu4e-trash-folder . "/satoshipay/[Gmail]/Bin") - (mu4e-maildir-shortcuts . (("/satoshipay/INBOX" . ?i) - ("/satoshipay/[Gmail]/All Mail" . ?a) - ("/satoshipay/[Gmail]/Sent Mail" . ?s) - ("/satoshipay/[Gmail]/Spam" . ?p) - ("/satoshipay/[Gmail]/Spam" . ?j))))))))) - ;;; Take me to my leader (my-leader-def @@ -1219,7 +1171,10 @@ _p_rev _u_pper _=_: upper/lower _r_esolve "xx" #'eval-defun "xi" #'consult-imenu) -(load (expand-file-name "mail.el" user-emacs-directory) :noerror :nomessage) +(let ((mail-config (expand-file-name "mail.el" user-emacs-directory))) + (if (file-readable-p mail-config) + (load mail-config :noerror :nomessage))) + ;; # Local Variables: ;; # flycheck-disabled-checkers: 'emacs-lisp-checkdoc -- cgit 1.4.1