diff options
author | Kyle Meyer <kyle@kyleam.com> | 2020-09-20 23:22:14 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2020-09-21 23:26:02 -0400 |
commit | e1201395d3aaecc00f15d5b354da72ff0ce4ce7e (patch) | |
tree | 0113d94367eb2f71e4e5c4465663f0f888b27a69 | |
parent | 087ed89c30fe96fc7ff1ed13c0895317d180c4d1 (diff) | |
download | piem-e1201395d3aaecc00f15d5b354da72ff0ce4ce7e.tar.gz |
piem-name-branch-who-what-v: Relax sender name extraction
Let-bind mail-extr-ignore-realname-equals-mailbox-name to nil
(defaults to t) so that a sender name is returned for addresses like
"name <name@a.com>" and "name@a.com".
Also, let-bind mail-extr-ignore-single-names to its default value of
nil so that a user setting this option to t doesn't interfere with
piem-name-branch-who-what-v.
Message-Id: <20200921032214.16940-1-kyle@kyleam.com>
-rw-r--r-- | piem.el | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -38,6 +38,7 @@ ;;; Code: (require 'cl-lib) +(require 'mail-extr) (require 'message) (require 'piem-maildir) (require 'rfc2047) @@ -611,7 +612,9 @@ indicated in the subject. INFO is a plist with properties documented in `piem-default-branch-function'." (when-let ((from (plist-get info :from)) - (sender (car (mail-extract-address-components from))) + (sender (let ((mail-extr-ignore-single-names nil) + (mail-extr-ignore-realname-equals-mailbox-name nil)) + (car (mail-extract-address-components from)))) (subject (plist-get info :subject))) (let* ((subnames (split-string sender)) (initials (mapconcat |