mu4e config continues
This commit is contained in:
parent
cab192d15a
commit
9f140d48d6
4 changed files with 78 additions and 20 deletions
77
config.el
77
config.el
|
@ -258,10 +258,56 @@
|
|||
(user-mail-address . "matt@emenel.ca") ;; only needed for mu < 1.4
|
||||
(smtpmail-default-smtp-server . "smtp.fastmail.com")
|
||||
(smtpmail-smtp-server . "smtp.fastmail.com")
|
||||
(smtpmail-local-domain . "fastmail.com")
|
||||
(mu4e-compose-signature . "---"))
|
||||
t)
|
||||
(smtpmail-local-domain . "fastmail.com"))
|
||||
t)
|
||||
|
||||
(defun message-insert-signature-at-point ()
|
||||
"Insert signature at point."
|
||||
(interactive)
|
||||
(setq message-signature "Matt Nish-Lapidus\nhttps://emenel.ca")
|
||||
(save-restriction
|
||||
(narrow-to-region (point) (point))
|
||||
(message-insert-signature)
|
||||
(newline))
|
||||
(setq message-signature nil))
|
||||
|
||||
(use-package! consult-mu
|
||||
:custom
|
||||
;;maximum number of results shown in minibuffer
|
||||
(consult-mu-maxnum 200)
|
||||
;;show preview when pressing any keys
|
||||
(consult-mu-preview-key 'any)
|
||||
;;do not mark email as read when previewed. If you turn this to t, be aware that the auto-loaded preview if the preview-key above is 'any would also get marked as read!
|
||||
(consult-mu-mark-previewed-as-read nil)
|
||||
;;mark email as read when selected.
|
||||
;; (consult-mu-mark-viewed-as-read t)
|
||||
;;use reply to all when composing reply emails
|
||||
(consult-mu-use-wide-reply t)
|
||||
;; define a template for headers view in minibuffer. The example below adjusts the width based on the width of the screen.
|
||||
(consult-mu-headers-template (lambda () (concat "%f" (number-to-string (floor (* (frame-width) 0.15))) "%s" (number-to-string (floor (* (frame-width) 0.5))) "%d13" "%g" "%x")))
|
||||
(consult-mu-action #'consult-mu--view-action)
|
||||
|
||||
:config
|
||||
;;create a list of saved searches for quick access using `histroy-next-element' with `M-n' in minibuffer. Note the "#" character at the beginning of each query! Change these according to
|
||||
(setq consult-mu-saved-searches-dynamics '("#flag:unread"))
|
||||
(setq consult-mu-saved-searches-async '("#flag:unread"))
|
||||
;; require embark actions for marking, replying, forwarding, etc. directly from minibuffer
|
||||
(require 'consult-mu-embark)
|
||||
;; require extra module for composing (e.g. for interactive attachment) as well as embark actions
|
||||
(require 'consult-mu-compose)
|
||||
(require 'consult-mu-compose-embark)
|
||||
;; require extra module for searching contacts and runing embark actions on contacts
|
||||
(require 'consult-mu-contacts)
|
||||
(require 'consult-mu-contacts-embark)
|
||||
;; change the prefiew key for compose so you don't open a preview of every file when selecting files to attach
|
||||
(setq consult-mu-compose-preview-key "M-o")
|
||||
;; pick a key to bind to consult-mu-compose-attach in embark-file-map
|
||||
(setq consult-mu-embark-attach-file-key "C-a")
|
||||
(setq consult-mu-contacts-ignore-list '("^.*no.*reply.*"))
|
||||
(setq consult-mu-contacts-ignore-case-fold-search t)
|
||||
(consult-mu-compose-embark-bind-attach-file-key)
|
||||
;; choose if you want to use dired for attaching files (choice of 'always, 'in-dired, or nil)
|
||||
(setq consult-mu-compose-use-dired-attachment 'in-dired))
|
||||
|
||||
|
||||
(after! mu4e
|
||||
|
@ -269,7 +315,14 @@
|
|||
mu4e-index-cleanup t
|
||||
mu4e-index-lazy-check nil
|
||||
mu4e-show-images t
|
||||
message-kill-buffer-on-exit t)
|
||||
message-kill-buffer-on-exit t
|
||||
mu4e-enable-async-operations t)
|
||||
|
||||
(setq message-citation-line-format "On %e %B %Y at %R %Z, %f wrote:\n")
|
||||
(setq message-citation-line-function 'message-insert-formatted-citation-line)
|
||||
|
||||
(setq message-signature nil)
|
||||
|
||||
(setq mu4e-bookmarks nil)
|
||||
|
||||
(setq sendmail-program "/opt/homebrew/bin/msmtp"
|
||||
|
@ -278,19 +331,27 @@
|
|||
message-sendmail-extra-arguments '("--read-envelope-from")
|
||||
message-send-mail-function 'message-send-mail-with-sendmail)
|
||||
|
||||
;; spam
|
||||
(setq mu4e-compose-format-flowed t)
|
||||
|
||||
(add-hook! 'mu4e-compose-mode-hook
|
||||
(use-hard-newlines -1)
|
||||
(message-goto-body)
|
||||
(message-insert-signature-at-point)
|
||||
(message-goto-body))
|
||||
|
||||
;; spam
|
||||
(mu4e-bookmark-define
|
||||
"maildir:/matt@emenel.ca/Spam"
|
||||
"Spam mail"
|
||||
?S)
|
||||
|
||||
;; sent
|
||||
;; sent
|
||||
(mu4e-bookmark-define
|
||||
"maildir:/matt@emenel.ca/Sent"
|
||||
"Sent mail"
|
||||
?s)
|
||||
|
||||
;; unread
|
||||
;; unread
|
||||
(mu4e-bookmark-define
|
||||
(concat "flag:unread"
|
||||
" and not maildir:/matt@emenel.ca/Spam"
|
||||
|
@ -298,7 +359,7 @@
|
|||
"All Unread"
|
||||
?u)
|
||||
|
||||
;; inboxes
|
||||
;; inboxes
|
||||
(mu4e-bookmark-define
|
||||
"maildir:/matt@emenel.ca/Inbox"
|
||||
"All Inboxes"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue