mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Mu4e: Select reply account when multiple addrs set
Modify +mu4e-set-from-address-h to account for messages with multiple to/from headers by finding the intersection between the headers and registered accounts. While I'm at it, there was a rather silly typo in the when-let line that's been corrected.
This commit is contained in:
@ -340,10 +340,9 @@ preferred alias"
|
||||
(mu4e-personal-addresses))))
|
||||
(setq user-mail-address
|
||||
(if mu4e-compose-parent-message
|
||||
(let ((to (cdr (car (mu4e-message-field mu4e-compose-parent-message :to))))
|
||||
(from (cdr (car (mu4e-message-field mu4e-compose-parent-message :from)))))
|
||||
(cond
|
||||
((member to addresses) to)
|
||||
((member from addresses) from)
|
||||
(t (completing-read "From: " addresses))))
|
||||
(let ((to (mapcar #'cdr (mu4e-message-field mu4e-compose-parent-message :to)))
|
||||
(from (mapcar #'cdr (mu4e-message-field mu4e-compose-parent-message :from))))
|
||||
(or (car (seq-intersection to addresses))
|
||||
(car (seq-intersection from addresses))
|
||||
(completing-read "From: " addresses)))
|
||||
(completing-read "From: " addresses)))))
|
||||
|
Reference in New Issue
Block a user