[emacs] Fix mu4e-change-from-to-catchall to access message fields via plist
This commit is contained in:
parent
e56c6b3bd4
commit
df32aeaa2b
|
@ -209,12 +209,12 @@
|
|||
(magit-status-setup-buffer))))
|
||||
|
||||
(defun bascht/mu4e-change-from-to-catchall (msg)
|
||||
"Set the From address based on the To address of the original message."
|
||||
(when msg
|
||||
(setq user-mail-address
|
||||
(cond
|
||||
((mu4e-message-contact-field-matches msg :to "bascht.com") (cdr-safe (car-safe (mu4e-message-field msg :to))))
|
||||
(t user-mail-address)))))
|
||||
"Set the From address based on the To address of the original message if I reply."
|
||||
(setq user-mail-address
|
||||
(if (and msg (mu4e-message-contact-field-matches msg :to "bascht.com"))
|
||||
(plist-get (car-safe (mu4e-message-field msg :to)) :email)
|
||||
(cdr-safe (assoc 'user-mail-address (mu4e-context-vars (mu4e-context-current)))))))
|
||||
|
||||
(after! mu4e
|
||||
(setq
|
||||
org-msg-signature (with-current-buffer (find-file-noselect "/home/bascht/.signature") (buffer-string))
|
||||
|
|
Loading…
Reference in New Issue