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:
parent
6b690547b0
commit
896f7dd3df
1 changed files with 6 additions and 7 deletions
|
@ -340,10 +340,9 @@ preferred alias"
|
||||||
(mu4e-personal-addresses))))
|
(mu4e-personal-addresses))))
|
||||||
(setq user-mail-address
|
(setq user-mail-address
|
||||||
(if mu4e-compose-parent-message
|
(if mu4e-compose-parent-message
|
||||||
(let ((to (cdr (car (mu4e-message-field mu4e-compose-parent-message :to))))
|
(let ((to (mapcar #'cdr (mu4e-message-field mu4e-compose-parent-message :to)))
|
||||||
(from (cdr (car (mu4e-message-field mu4e-compose-parent-message :from)))))
|
(from (mapcar #'cdr (mu4e-message-field mu4e-compose-parent-message :from))))
|
||||||
(cond
|
(or (car (seq-intersection to addresses))
|
||||||
((member to addresses) to)
|
(car (seq-intersection from addresses))
|
||||||
((member from addresses) from)
|
(completing-read "From: " addresses)))
|
||||||
(t (completing-read "From: " addresses))))
|
|
||||||
(completing-read "From: " addresses)))))
|
(completing-read "From: " addresses)))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue